diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml new file mode 100644 index 00000000..cb8208d2 --- /dev/null +++ b/.github/workflows/benchmarks.yml @@ -0,0 +1,202 @@ +name: Benchmarking + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + benchmarks_candidate: + runs-on: [matterlabs-ci-runner] + container: + image: matterlabs/llvm_runner:latest + credentials: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + options: -m 110g + steps: + - uses: AutoModality/action-clean@492b2d2e2e77247bfd0b17eaa89a371b2f3430ee # v1 + - name: Preparing workspace. Setting environment. + run: | + echo "BENCHMARK_MODE=${{ github.event.inputs.compiler_llvm_benchmark_mode || '^M^B3' }}" >> $GITHUB_ENV + echo "BENCHMARK_PATH=${{ github.event.inputs.compiler_llvm_benchmark_path || '' }}" >> $GITHUB_ENV + echo "CANDIDATE_BRANCH_NAME=${{ github.event.inputs.compiler_tester_candidate_branch }}" >> $GITHUB_ENV + + - name: Get branch name (pull request) + if: github.event_name == 'pull_request' + shell: bash + run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV + + - name: Preparing workspace. Checkout compiler-tester candidate (pull request) + if: github.event_name == 'pull_request' + uses: actions/checkout@v4 + with: + submodules: recursive + path: compiler-tester + + - name: Preparing workspace. Checkout compiler-tester candidate (workflow dispatch) + if: github.event_name == 'workflow_dispatch' + uses: actions/checkout@v4 + with: + path: compiler-tester + submodules: recursive + ref: ${{ env.CANDIDATE_BRANCH_NAME }} + + - name: Testing. Benchmarking LLVM framework candidate. + id: compiler_tester_run + run: | + cd compiler-tester + cargo install compiler-llvm-builder + /usr/local/cargo/bin/zkevm-llvm clone && /usr/local/cargo/bin/zkevm-llvm build + + 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/' + cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-vyper-*/*/Cargo.toml --target-dir './target-zkvyper/' + + ./target/release/compiler-tester \ + --zksolc './target-zksolc/release/zksolc' \ + --zkvyper './target-zkvyper/release/zkvyper' \ + --path=${{ env.BENCHMARK_PATH || '' }} \ + --mode=${{ env.BENCHMARK_MODE || '' }} \ + --benchmark='candidate.json' + + - uses: actions/upload-artifact@v4 + with: + name: candidate-benchmark + path: compiler-tester/candidate.json + + benchmarks_reference: + runs-on: [matterlabs-ci-runner] + container: + image: matterlabs/llvm_runner:latest + credentials: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + options: -m 110g + steps: + - uses: AutoModality/action-clean@492b2d2e2e77247bfd0b17eaa89a371b2f3430ee # v1 + - name: Preparing workspace. Setting environment. + run: | + echo "BENCHMARK_MODE=${{ github.event.inputs.compiler_llvm_benchmark_mode || '^M^B3' }}" >> $GITHUB_ENV + echo "BENCHMARK_PATH=${{ github.event.inputs.compiler_llvm_benchmark_path || '' }}" >> $GITHUB_ENV + echo "REFERENCE_BRANCH_NAME=${{ github.event.inputs.compiler_tester_reference_branch }}" >> $GITHUB_ENV + + - name: Get branch name (pull request) + if: github.event_name == 'pull_request' + shell: bash + run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV + + - name: Preparing workspace. Checkout compiler-tester reference (pull request) + if: github.event_name == 'pull_request' + uses: actions/checkout@v4 + with: + path: compiler-tester + submodules: recursive + ref: ${{ env.BRANCH_NAME }} + + - name: Preparing workspace. Checkout compiler-tester reference (workflow dispatch) + if: github.event_name == 'workflow_dispatch' + uses: actions/checkout@v4 + with: + path: compiler-tester + submodules: recursive + ref: ${{ env.REFERENCE_BRANCH_NAME }} + + - name: Testing. Benchmarking LLVM framework reference. + id: compiler_tester_run + run: | + cd compiler-tester + cargo install compiler-llvm-builder + /usr/local/cargo/bin/zkevm-llvm clone && /usr/local/cargo/bin/zkevm-llvm build + + 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/' + cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-vyper-*/*/Cargo.toml --target-dir './target-zkvyper/' + + ./target/release/compiler-tester \ + --zksolc './target-zksolc/release/zksolc' \ + --zkvyper './target-zkvyper/release/zkvyper' \ + --path=${{ env.BENCHMARK_PATH || '' }} \ + --mode=${{ env.BENCHMARK_MODE || '' }} \ + --benchmark='reference.json' + + - uses: actions/upload-artifact@v4 + with: + name: reference-benchmark + path: compiler-tester/reference.json + + benchmarks_analysis: + runs-on: [matterlabs-ci-runner] + needs: [benchmarks_candidate, benchmarks_reference] + container: + image: matterlabs/llvm_runner:latest + credentials: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + steps: + - uses: AutoModality/action-clean@492b2d2e2e77247bfd0b17eaa89a371b2f3430ee # v1 + - name: Get branch name (pull request) + if: github.event_name == 'pull_request' + shell: bash + run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV + + - name: Preparing workspace. Checkout compiler-tester candidate (pull request) + if: github.event_name == 'pull_request' + uses: actions/checkout@v4 + with: + path: compiler-tester + submodules: recursive + + - name: Preparing workspace. Checkout compiler-tester candidate (workflow dispatch) + if: github.event_name == 'workflow_dispatch' + uses: actions/checkout@v4 + with: + path: compiler-tester + ref: ${{ env.CANDIDATE_BRANCH_NAME }} + + - uses: actions/download-artifact@v4 + with: + name: candidate-benchmark + path: compiler-tester + + - uses: actions/download-artifact@v4 + with: + name: reference-benchmark + path: compiler-tester + + - name: Testing. Comparing LLVM framework results. + id: compiler_tester_run + run: | + cd compiler-tester && \ + export RUST_BACKTRACE=full && \ + cargo run --release --bin benchmark-analyzer -- --reference reference.json --candidate candidate.json --output-file result.txt && \ + chown 1000:1000 result.txt + + - name: Testing. Posting LLVM benchmark results to 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 > ./compiler-tester/result.txt + + - name: Testing. Posting LLVM benchmark results to PR comment. + if: github.event_name == 'pull_request' + uses: mshick/add-pr-comment@v2 + with: + message-path: ./compiler-tester/result.txt + + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,commit,author,action,eventName,ref,workflow,job,took,pullRequest # selectable (default: repo,message) + env: + SLACK_WEBHOOK_URL: ${{ secrets.COMPILER_CI_MATTERMOST_WEBHOOK }} # required + if: ${{ failure() || success() }} # Skip canceled jobs + diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 00000000..d61c886a --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,56 @@ +name: Testing + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + testing: + runs-on: [self-hosted, ci-runner-compiler] + timeout-minutes: 720 + container: + image: matterlabs/llvm_runner:latest + credentials: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + options: -m 110g + steps: + # Add safe.directory per https://github.com/actions/checkout/issues/766 + - name: Setting all dirs as safe safe.directory + run: | + git config --system --add safe.directory '*' + git config --global --add safe.directory '*' + + - name: Preparing workspace. Checkout compiler-tester repository. + uses: actions/checkout@v4 + with: + path: compiler-tester + submodules: recursive + + - name: Testing. Building and running compiler tester. + id: compiler_tester_run + run: | + cd compiler-tester + cargo install compiler-llvm-builder + /usr/local/cargo/bin/zkevm-llvm clone && /usr/local/cargo/bin/zkevm-llvm build + + 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/' + cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-vyper-*/*/Cargo.toml --target-dir './target-zkvyper/' + + ./target/release/compiler-tester \ + --zksolc './target-zksolc/release/zksolc' \ + --zkvyper './target-zkvyper/release/zkvyper' + + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,commit,author,action,eventName,ref,workflow,job,took,pullRequest # selectable (default: repo,message) + env: + SLACK_WEBHOOK_URL: ${{ secrets.COMPILER_CI_MATTERMOST_WEBHOOK }} # required + if: ${{ failure() || success() }} # Skip canceled jobs diff --git a/.gitignore b/.gitignore index 22f443a9..04abd624 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,18 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ +# Compiled files and executables +/target*/ # These are backup files generated by rustfmt **/*.rs.bk -# The LLVM framework source and build +# MacOS +/**/.DS_Store + +# IDE +/.idea/ +/.vscode/ + +# The LLVM framework source /llvm/ -/target-llvm*/ # External compilers /solc-bin/* @@ -20,7 +25,3 @@ # The dependency locks # /Cargo.lock # /LLVM.lock - -# IDE -/.idea/ -/.vscode/ diff --git a/.gitmodules b/.gitmodules index aade9503..b777b4bc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ path = solidity url = https://github.com/ethereum/solidity branch = develop -[submodule "system-contracts"] - path = system-contracts - url = https://github.com/matter-labs/era-system-contracts - branch = main +[submodule "era-contracts"] + path = era-contracts + url = https://github.com/matter-labs/era-contracts + branch = release-v20-1.4.1-short-term-fee-model diff --git a/Cargo.lock b/Cargo.lock index 16d09e8f..a167fa83 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "arrayvec" @@ -44,11 +44,22 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -72,15 +83,15 @@ dependencies = [ [[package]] name = "base16ct" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -90,7 +101,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "benchmark-analyzer" -version = "1.3.2" +version = "1.4.1" dependencies = [ "anyhow", "colored", @@ -117,9 +128,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -139,7 +150,8 @@ dependencies = [ [[package]] name = "blake2" version = "0.10.6" -source = "git+https://github.com/RustCrypto/hashes.git?rev=1f727ce37ff40fa0cce84eb8543a45bdd3ca4a4e#1f727ce37ff40fa0cce84eb8543a45bdd3ca4a4e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ "digest", ] @@ -155,9 +167,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-slice-cast" @@ -179,12 +191,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.84" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856" -dependencies = [ - "libc", -] +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -205,88 +214,27 @@ dependencies = [ [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", - "windows-sys", -] - -[[package]] -name = "compiler-common" -version = "1.3.3" -source = "git+https://github.com/matter-labs/era-compiler-common?branch=main#8635dbadff6727ed76b7aebea7a10ffe7690698c" -dependencies = [ - "anyhow", - "serde", - "serde_json", - "serde_stacker", -] - -[[package]] -name = "compiler-llvm-context" -version = "1.3.3" -source = "git+https://github.com/matter-labs/era-compiler-llvm-context?branch=main#a5dd76f6d6d5a1df0e68da481926adfd56b65a78" -dependencies = [ - "anyhow", - "compiler-common", - "hex", - "inkwell", - "itertools", - "md5", - "num", - "once_cell", - "regex", - "semver", - "serde", - "sha2 0.10.8", - "sha3 0.10.8", - "zkevm-assembly", - "zkevm_opcode_defs", -] - -[[package]] -name = "compiler-solidity" -version = "1.3.17" -source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=main#1650bde7f23592a75062385f52edf17da2522150" -dependencies = [ - "anyhow", - "colored", - "compiler-common", - "compiler-llvm-context", - "hex", - "inkwell", - "md5", - "mimalloc", - "num", - "once_cell", - "rand 0.8.5", - "rayon", - "regex", - "semver", - "serde", - "serde_json", - "sha3 0.10.8", - "structopt", - "thiserror", - "which", - "zkevm-assembly", + "windows-sys 0.48.0", ] [[package]] name = "compiler-tester" -version = "1.3.3" +version = "1.4.1" dependencies = [ "anyhow", "benchmark-analyzer", "bincode", "colored", - "compiler-common", - "compiler-llvm-context", - "compiler-solidity", - "compiler-vyper", + "era-compiler-common", + "era-compiler-llvm-context", + "era-compiler-solidity", + "era-compiler-vyper", + "evm", "glob", "hex", "inkwell", @@ -302,46 +250,20 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "sha3 0.10.8", + "sha3", "solidity-adapter", "structopt", - "tokio", "web3", "zkevm-assembly", "zkevm_opcode_defs", "zkevm_tester", ] -[[package]] -name = "compiler-vyper" -version = "1.3.13" -source = "git+https://github.com/matter-labs/era-compiler-vyper?branch=main#701ca3db3e09705f4b69595d52325ecbecf63fd1" -dependencies = [ - "anyhow", - "colored", - "compiler-common", - "compiler-llvm-context", - "hex", - "inkwell", - "lazy_static", - "mimalloc", - "once_cell", - "rayon", - "semver", - "serde", - "serde_json", - "sha3 0.10.8", - "structopt", - "which", - "zkevm-assembly", - "zkevm_opcode_defs", -] - [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "convert_case" @@ -351,9 +273,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -361,16 +283,16 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "coverage-watcher" -version = "1.3.3" +version = "1.4.1" dependencies = [ "anyhow", - "compiler-common", + "era-compiler-common", "serde", "serde_yaml", "structopt", @@ -378,45 +300,37 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -426,9 +340,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -448,9 +362,9 @@ dependencies = [ [[package]] name = "der" -version = "0.6.1" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -476,37 +390,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", + "digest", "elliptic-curve", "rfc6979", "signature", + "spki", ] [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "der", "digest", "ff", "generic-array", @@ -546,14 +462,102 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "era-compiler-common" +version = "1.5.0" +source = "git+https://github.com/matter-labs/era-compiler-common?branch=main#6781681145a37d9809057cf6fc3fa667abd545af" +dependencies = [ + "anyhow", + "serde", + "serde_json", + "serde_stacker", +] + +[[package]] +name = "era-compiler-llvm-context" +version = "1.4.1" +source = "git+https://github.com/matter-labs/era-compiler-llvm-context?branch=main#f1ae37a655c55ddc9c0bf08f3fbd00f99d38809e" +dependencies = [ + "anyhow", + "era-compiler-common", + "hex", + "inkwell", + "itertools", + "md5", + "num", + "once_cell", + "regex", + "semver", + "serde", + "sha2", + "sha3", + "zkevm-assembly", + "zkevm_opcode_defs", +] + +[[package]] +name = "era-compiler-solidity" +version = "1.4.1" +source = "git+https://github.com/matter-labs/era-compiler-solidity?branch=main#25ef5438bcfbf5cfb773214830d56cec52f0aabd" +dependencies = [ + "anyhow", + "colored", + "era-compiler-common", + "era-compiler-llvm-context", + "hex", + "inkwell", + "md5", + "mimalloc", + "num", + "once_cell", + "path-slash", + "rand 0.8.5", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "sha3", + "structopt", + "thiserror", + "which", + "zkevm-assembly", +] + +[[package]] +name = "era-compiler-vyper" +version = "1.4.0" +source = "git+https://github.com/matter-labs/era-compiler-vyper?branch=main#f60d8409b42e8da3f0999e862338f3961045629a" +dependencies = [ + "anyhow", + "colored", + "era-compiler-common", + "era-compiler-llvm-context", + "hex", + "inkwell", + "lazy_static", + "mimalloc", + "once_cell", + "path-slash", + "rayon", + "semver", + "serde", + "serde_json", + "sha3", + "structopt", + "which", + "zkevm-assembly", + "zkevm_opcode_defs", +] + [[package]] name = "errno" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -568,7 +572,7 @@ dependencies = [ "regex", "serde", "serde_json", - "sha3 0.10.8", + "sha3", "thiserror", "uint", ] @@ -600,11 +604,35 @@ dependencies = [ "uint", ] +[[package]] +name = "evm" +version = "1.0.0-dev" +source = "git+https://github.com/rust-ethereum/evm?branch=master#f7a23df6c478ca6a151af5f60e62944800529a61" +dependencies = [ + "evm-interpreter", + "primitive-types", + "sha3", +] + +[[package]] +name = "evm-interpreter" +version = "1.0.0-dev" +source = "git+https://github.com/rust-ethereum/evm?branch=master#f7a23df6c478ca6a151af5f60e62944800529a61" +dependencies = [ + "auto_impl", + "parity-scale-codec", + "primitive-types", + "rlp", + "scale-info", + "serde", + "sha3", +] + [[package]] name = "ff" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", "subtle", @@ -630,9 +658,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -651,9 +679,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -666,9 +694,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -676,15 +704,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -693,44 +721,44 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -752,13 +780,14 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -767,9 +796,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -779,9 +808,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", @@ -790,9 +819,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -800,7 +829,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", @@ -809,15 +838,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "headers" @@ -861,12 +884,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" - [[package]] name = "hex" version = "0.4.3" @@ -884,18 +901,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -904,9 +921,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -933,9 +950,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -948,7 +965,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2", "tokio", "tower-service", "tracing", @@ -979,6 +996,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "impl-codec" version = "0.6.0" @@ -1019,28 +1046,18 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.1.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown", ] [[package]] name = "inkwell" version = "0.1.0" -source = "git+https://github.com/matter-labs-forks/inkwell?branch=llvm-15#aeeada43db7fd6375ebe2929baeda1934d751cd6" +source = "git+https://github.com/matter-labs-forks/inkwell?branch=llvm-15#98a023834492fe59b4ae97c405f75626437fced0" dependencies = [ "either", "inkwell_internals", @@ -1054,7 +1071,7 @@ dependencies = [ [[package]] name = "inkwell_internals" version = "0.6.0" -source = "git+https://github.com/matter-labs-forks/inkwell?branch=llvm-15#aeeada43db7fd6375ebe2929baeda1934d751cd6" +source = "git+https://github.com/matter-labs-forks/inkwell?branch=llvm-15#98a023834492fe59b4ae97c405f75626437fced0" dependencies = [ "proc-macro2", "quote", @@ -1067,37 +1084,26 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi 0.3.3", - "rustix", - "windows-sys", -] - [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1119,21 +1125,23 @@ dependencies = [ [[package]] name = "k256" -version = "0.11.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.8", + "once_cell", + "sha2", + "signature", ] [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -1146,9 +1154,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libmath" @@ -1171,14 +1179,14 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "llvm-sys" version = "150.0.5" -source = "git+https://github.com/matter-labs-forks/llvm-sys.rs?branch=llvm-15.0#4d5196cde1825d14028788d0ffa6202ea5f98db6" +source = "git+https://github.com/matter-labs-forks/llvm-sys.rs?branch=llvm-15.0#049dba7d1a8154f01c6267e8612504d56e651088" dependencies = [ "cc", "lazy_static", @@ -1199,9 +1207,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "md5" @@ -1211,18 +1219,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mimalloc" @@ -1247,22 +1246,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1302,28 +1301,27 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ "num-traits", ] [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", @@ -1344,43 +1342,54 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] [[package]] -name = "num_cpus" -version = "1.16.0" +name = "num_enum" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" dependencies = [ - "hermit-abi 0.3.3", - "libc", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.52", ] [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec", "bitvec", @@ -1392,11 +1401,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", "syn 1.0.109", @@ -1422,33 +1431,39 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -1465,9 +1480,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", "spki", @@ -1499,7 +1514,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -1528,9 +1553,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -1546,9 +1571,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1629,9 +1654,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" dependencies = [ "either", "rayon-core", @@ -1639,9 +1664,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -1667,9 +1692,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -1679,9 +1704,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -1696,9 +1721,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "0eea5a9eb898d3783f17c6407670e3592fd174cb81a10e51d4c37f49450b9946" dependencies = [ "base64", "bytes", @@ -1722,6 +1747,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-rustls", @@ -1736,27 +1762,27 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", "hmac", - "zeroize", + "subtle", ] [[package]] name = "ring" -version = "0.17.5" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1776,7 +1802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64", - "bitflags 2.4.1", + "bitflags 2.4.2", "serde", "serde_derive", ] @@ -1804,22 +1830,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.8" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring", @@ -1848,9 +1874,34 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "scale-info" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "scopeguard" @@ -1870,9 +1921,9 @@ dependencies = [ [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -1902,38 +1953,38 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.192" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -1942,9 +1993,9 @@ dependencies = [ [[package]] name = "serde_stacker" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f5321e680f77e7b5cfccc78708ff86a814d39aba030610aee67bd5eaf8a1c30" +checksum = "babfccff5773ff80657f0ecf553c7c516bdc2eb16389c0918b36b73e7015276e" dependencies = [ "serde", "stacker", @@ -1964,11 +2015,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" dependencies = [ - "indexmap 2.1.0", + "indexmap", "itoa", "ryu", "serde", @@ -1986,16 +2037,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha2" -version = "0.10.6" -source = "git+https://github.com/RustCrypto/hashes.git?rev=1731ced4a116d61ba9dc6ee6d0f38fb8102e357a#1731ced4a116d61ba9dc6ee6d0f38fb8102e357a" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha2" version = "0.10.8" @@ -2007,15 +2048,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha3" -version = "0.10.6" -source = "git+https://github.com/RustCrypto/hashes.git?rev=7a187e934c1f6c68e4b4e5cf37541b7a0d64d303#7a187e934c1f6c68e4b4e5cf37541b7a0d64d303" -dependencies = [ - "digest", - "keccak", -] - [[package]] name = "sha3" version = "0.10.8" @@ -2028,9 +2060,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", "rand_core 0.6.4", @@ -2047,37 +2079,27 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "solidity-adapter" -version = "1.3.3" +version = "1.4.1" dependencies = [ "anyhow", "colored", - "compiler-common", + "era-compiler-common", "md5", "regex", "semver", @@ -2095,9 +2117,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -2165,31 +2187,37 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -2203,9 +2231,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -2221,22 +2249,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -2265,18 +2293,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", - "socket2 0.5.5", - "windows-sys", + "socket2", + "windows-sys 0.48.0", ] [[package]] @@ -2305,9 +2332,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" @@ -2315,7 +2342,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap", "toml_datetime", "winnow", ] @@ -2345,7 +2383,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -2359,9 +2397,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" @@ -2383,9 +2421,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -2395,18 +2433,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" @@ -2416,9 +2454,9 @@ checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -2428,12 +2466,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", ] @@ -2466,9 +2504,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2476,24 +2514,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -2503,9 +2541,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2513,28 +2551,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -2556,7 +2594,7 @@ dependencies = [ "futures-timer", "headers", "hex", - "idna", + "idna 0.4.0", "jsonrpc-core", "log", "once_cell", @@ -2573,20 +2611,21 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "which" -version = "4.4.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" dependencies = [ "either", "home", "once_cell", "rustix", + "windows-sys 0.48.0", ] [[package]] @@ -2626,7 +2665,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", ] [[package]] @@ -2635,13 +2683,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -2650,47 +2713,89 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -2702,7 +2807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2716,14 +2821,14 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zk_evm" -version = "1.3.3" -source = "git+https://github.com/matter-labs/era-zk_evm?tag=v1.3.3-rc0#c08a8581421d2a0cf1fc8cbbdcd06c00da01fe0e" +version = "1.4.1" +source = "git+https://github.com/matter-labs/era-zk_evm?branch=v1.4.1#6250dbf64b2d14ced87a127735da559f27a432d5" dependencies = [ "anyhow", "lazy_static", @@ -2737,10 +2842,11 @@ dependencies = [ [[package]] name = "zk_evm_abstractions" -version = "0.1.0" -source = "git+https://github.com/matter-labs/era-zk_evm_abstractions.git#7502a661d7d38906d849dcd3e7a15e5848af6581" +version = "1.4.1" +source = "git+https://github.com/matter-labs/era-zk_evm_abstractions?branch=v1.4.1#0aac08c3b097ee8147e748475117ac46bddcdcef" dependencies = [ "anyhow", + "num_enum", "serde", "static_assertions", "zkevm_opcode_defs", @@ -2748,8 +2854,8 @@ dependencies = [ [[package]] name = "zkevm-assembly" -version = "1.3.2" -source = "git+https://github.com/matter-labs/era-zkEVM-assembly?branch=v1.3.2#3c61d450cbe6548068be8f313ed02f1bd229a865" +version = "1.4.1" +source = "git+https://github.com/matter-labs/era-zkEVM-assembly?branch=v1.4.1#e59d5da67f18f8829c3cfaebb967265d73c168ed" dependencies = [ "env_logger", "hex", @@ -2758,7 +2864,7 @@ dependencies = [ "nom", "num-bigint", "num-traits", - "sha3 0.10.8", + "sha3", "smallvec", "structopt", "thiserror", @@ -2767,22 +2873,22 @@ dependencies = [ [[package]] name = "zkevm_opcode_defs" -version = "1.3.2" -source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs?branch=v1.3.2#dffacadeccdfdbff4bc124d44c595c4a6eae5013" +version = "1.4.1" +source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs?branch=v1.4.1#ba8228ff0582d21f64d6a319d50d0aec48e9e7b6" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "blake2", "ethereum-types", "k256", "lazy_static", - "sha2 0.10.6", - "sha3 0.10.6", + "sha2", + "sha3", ] [[package]] name = "zkevm_tester" -version = "1.3.3" -source = "git+https://github.com/matter-labs/era-zkevm_tester?branch=v1.3.3#7915461d7657c9d17758535554e3633783af576f" +version = "1.4.1" +source = "git+https://github.com/matter-labs/era-zkevm_tester?branch=v1.4.1#aab8cdc167402558e8eb47c2b2701057eee4c33d" dependencies = [ "anyhow", "futures", @@ -2791,9 +2897,10 @@ dependencies = [ "num-traits", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "tracing", "vlog", "zk_evm", + "zk_evm_abstractions", "zkevm-assembly", ] diff --git a/LLVM.lock b/LLVM.lock index 41258726..e59e9c5e 100644 --- a/LLVM.lock +++ b/LLVM.lock @@ -1,2 +1,2 @@ url = "https://github.com/matter-labs/era-compiler-llvm" -branch = "v1.3.7" +branch = "v1.4.1" diff --git a/README.md b/README.md index 85c8dedc..35afb3cf 100644 --- a/README.md +++ b/README.md @@ -28,27 +28,39 @@ made, and there is no point in running tests in all LLVM optimization modes. 2. [Install Rust](https://www.rust-lang.org/tools/install). -3. Check out or clone the appropriate branch of this repository using the `--recursive` option. - -4. Install the LLVM building tool: `cargo install compiler-llvm-builder`. +3. Check out or clone the appropriate branch of this repository: + 3.a. If you have not cloned this repository yet: + ``` + git clone --recursive + ``` + 3.b. If you have already cloned this repository: + ``` + git submodule update --init --recursive --remote + ``` -5. Pull and build the LLVM framework: - 5.a. If you have not cloned the LLVM repository yet: +4. Pull, build, or specify the path to your LLVM framework build: + 4.a. If you have not cloned the LLVM repository yet: ``` + cargo install compiler-llvm-builder zkevm-llvm clone && zkevm-llvm build ``` - 5.b. If you have already cloned the LLVM repository: + 4.b. If you have already cloned the LLVM repository: ``` + cargo install compiler-llvm-builder zkevm-llvm checkout git -C './llvm/' pull zkevm-llvm build ``` + 4.c. If you would like to use your local LLVM build: + ``` + export LLVM_SYS_150_PREFIX='' + ``` -6. Build [zksolc](https://github.com/matter-labs/era-compiler-solidity) and [zkvyper](https://github.com/matter-labs/era-compiler-vyper) compilers and add the binaries to `$PATH`, or use the `--zksolc` or `--zkvyper` options to specify their paths. +5. Build [zksolc](https://github.com/matter-labs/era-compiler-solidity) and [zkvyper](https://github.com/matter-labs/era-compiler-vyper) compilers and add the binaries to `$PATH`, or use the `--zksolc` or `--zkvyper` options to specify their paths. -7. Build the Tester with `cargo build --release`. +6. Build the Tester with `cargo build --release`. -8. Run the tests using the examples below under “Usage”. +7. Run the tests using [the examples below](#usage). ## What is supported @@ -62,8 +74,8 @@ made, and there is no point in running tests in all LLVM optimization modes. ### Optimizers -- LLVM middle-end optimizer (levels 0 to 3, s, z, e.g. `M0`, `M1` etc.) -- LLVM back-end optimizer (levels 0 to 3, e.g. `B0`, `B1` etc.) +- LLVM middle-end optimizer (levels 0 to 3, s, z, e.g. `M0`, `Mz` etc.) +- LLVM back-end optimizer (levels 0 and 3, i.e. `B0` and `B3`) - `solc` optimizer (`-` or `+`) - `vyper` optimizer (`-` or `+`) @@ -71,7 +83,8 @@ made, and there is no point in running tests in all LLVM optimization modes. - Yul pure (`Y`) - EVM assembly from Yul (`y`) -- EVM assembly (`E`) +- EVM assembly pure (`E`) +- Vyper LLL (`V`) ### Compiler versions @@ -116,7 +129,7 @@ Use: - Yul optimizations enabled (`+`) - level 3 optimizations in LLVM middle-end (`M3`) - level 3 optimizations in LLVM back-end (`B3`) -- Solidity compiler version (`0.8.20`) +- Solidity compiler version (`0.8.24`) Output: @@ -127,8 +140,8 @@ Output: ```bash cargo run --release --bin compiler-tester -- -DT \ --path='tests/solidity/simple/default.sol' \ - --mode='Y+M3B3 0.8.20' \ - --zksolc '../compiler-solidity/target/release/zksolc' + --mode='Y+M3B3 0.8.24' \ + --zksolc '../era-compiler-solidity/target/release/zksolc' ``` ### Example 2 @@ -158,8 +171,8 @@ This takes a few hours on the CI server, and probably much longer on your person ```bash cargo run --release --bin compiler-tester -- \ - --zksolc '../compiler-solidity/target/release/zksolc' \ - --zkvyper '../compiler-vyper/target/release/zkvyper' + --zksolc '../era-compiler-solidity/target/release/zksolc' \ + --zkvyper '../era-compiler-vyper/target/release/zkvyper' ``` ## Tracing @@ -178,7 +191,7 @@ zkevm-llvm checkout && zkevm-llvm build ``` ./target/release/compiler-tester \ --path='tests/solidity/simple/default.sol' \ - --mode='Y+M^B3 0.8.20' \ + --mode='Y+M^B3 0.8.24' \ --benchmark='reference.json' ``` @@ -191,7 +204,7 @@ zkevm-llvm checkout && zkevm-llvm build ``` ./target/release/compiler-tester \ --path='tests/solidity/simple/default.sol' \ - --mode='Y+M^B3 0.8.20' \ + --mode='Y+M^B3 0.8.24' \ --benchmark='candidate.json' ``` @@ -212,7 +225,7 @@ may help. ## License -The Solidity compiler is distributed under the terms of either +The Compiler Tester is distributed under the terms of either - Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or ) - MIT license ([LICENSE-MIT](LICENSE-MIT) or ) diff --git a/benchmark_analyzer/Cargo.toml b/benchmark_analyzer/Cargo.toml index 74c8926d..8eda70c3 100644 --- a/benchmark_analyzer/Cargo.toml +++ b/benchmark_analyzer/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "benchmark-analyzer" -version = "1.3.2" +version = "1.4.1" authors = [ - "Alex Zarudnyy ", + "Oleksandr Zarudnyi ", ] license = "MIT OR Apache-2.0" edition = "2021" -description = "The zkEVM benchmarks analyzer" +description = "The analyzer of benchmark reports" [[bin]] name = "benchmark-analyzer" diff --git a/compiler_tester/Cargo.toml b/compiler_tester/Cargo.toml index 3a28859f..e7f03cb7 100644 --- a/compiler_tester/Cargo.toml +++ b/compiler_tester/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "compiler-tester" -version = "1.3.3" +version = "1.4.1" authors = [ "Oleksandr Zarudnyi ", "Anton Dyadyuk ", ] license = "MIT OR Apache-2.0" edition = "2021" -description = "EraVM Compiler Integration Testing Framework" +description = "Matter Labs Compiler Integration Testing Framework" [[bin]] name = "compiler-tester" @@ -19,7 +19,7 @@ doctest = false [dependencies] structopt = { version = "0.3", default-features = false } anyhow = "1.0" -colored = "2.0" +colored = "2.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -28,32 +28,28 @@ md5 = "0.7" hex = "0.4" sha3 = "0.10" ron = "0.8" -regex = "1.8" +regex = "1.9" glob = "0.3" semver = { version = "1.0", features = ["serde"] } -itertools = "0.10" -once_cell = "1.17" -rayon = "1.7" +itertools = "0.12" +once_cell = "1.19" +rayon = "1.8" lazy_static = "1.4" bincode = "1.3" +evm = { git = "https://github.com/rust-ethereum/evm", branch = "master" } -zkevm-assembly = { git = "https://github.com/matter-labs/era-zkEVM-assembly", branch = "v1.3.2" } -zkevm_opcode_defs = { git = "https://github.com/matter-labs/era-zkevm_opcode_defs", branch = "v1.3.2" } -zkevm_tester = { git = "https://github.com/matter-labs/era-zkevm_tester", branch = "v1.3.3" } +zkevm-assembly = { git = "https://github.com/matter-labs/era-zkEVM-assembly", branch = "v1.4.1" } +zkevm_opcode_defs = { git = "https://github.com/matter-labs/era-zkevm_opcode_defs", branch = "v1.4.1" } +zkevm_tester = { git = "https://github.com/matter-labs/era-zkevm_tester", branch = "v1.4.1" } -compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" } -compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" } -compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" } -compiler-vyper = { git = "https://github.com/matter-labs/era-compiler-vyper", branch = "main" } +era-compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" } +era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" } +era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" } +era-compiler-vyper = { git = "https://github.com/matter-labs/era-compiler-vyper", branch = "main" } solidity-adapter = { path = "../solidity_adapter" } benchmark-analyzer = { path = "../benchmark_analyzer" } -[dependencies.tokio] -version = "1.28" -default-features = false -features = ["rt-multi-thread"] - [dependencies.web3] version = "0.19" default-features = false @@ -68,4 +64,4 @@ features = ["blocking"] git = "https://github.com/matter-labs-forks/inkwell" branch = "llvm-15" default-features = false -features = ["llvm15-0", "no-libffi-linking", "target-eravm"] +features = ["llvm15-0", "no-libffi-linking", "target-eravm", "target-evm"] diff --git a/compiler_tester/src/compiler_tester/arguments.rs b/compiler_tester/src/compiler_tester/arguments.rs index bb2e2300..b42bb078 100644 --- a/compiler_tester/src/compiler_tester/arguments.rs +++ b/compiler_tester/src/compiler_tester/arguments.rs @@ -74,6 +74,12 @@ pub struct Arguments { #[structopt(long = "zkvyper")] pub zkvyper: Option, + /// Specify the target machine. + /// Available arguments: `eravm`, `evm`. + /// The default is `eravm`. + #[structopt(long = "target")] + pub target: Option, + /// Path to the default `solc` binaries download configuration file. #[structopt(long = "solc-bin-config-path")] pub solc_bin_config_path: Option, @@ -84,11 +90,11 @@ pub struct Arguments { /// Whether to load the system contracts builds from the specified file. #[structopt(long = "load-system-contracts")] - pub load_system_contracts: Option, + pub system_contracts_load_path: Option, /// Whether to save the system contracts builds to the specified file. #[structopt(long = "save-system-contracts")] - pub save_system_contracts: Option, + pub system_contracts_save_path: Option, /// Sets the `verify each` option in LLVM. #[structopt(long = "llvm-verify-each")] diff --git a/compiler_tester/src/compiler_tester/main.rs b/compiler_tester/src/compiler_tester/main.rs index b8b31b3a..cedd9ae5 100644 --- a/compiler_tester/src/compiler_tester/main.rs +++ b/compiler_tester/src/compiler_tester/main.rs @@ -40,32 +40,37 @@ fn main_inner(arguments: Arguments) -> anyhow::Result<()> { inkwell::support::get_commit_id().to_string(), ); + let target = match arguments.target { + Some(target) => era_compiler_llvm_context::Target::from_str(target.as_str())?, + None => era_compiler_llvm_context::Target::EraVM, + }; + inkwell::support::enable_llvm_pretty_stack_trace(); - compiler_llvm_context::initialize_target(compiler_llvm_context::Target::EraVM); + era_compiler_llvm_context::initialize_target(target); compiler_tester::LLVMOptions::initialize( arguments.llvm_verify_each, arguments.llvm_debug_logging, )?; - compiler_solidity::EXECUTABLE + era_compiler_solidity::EXECUTABLE .set( arguments .zksolc - .unwrap_or_else(|| PathBuf::from(compiler_solidity::DEFAULT_EXECUTABLE_NAME)), + .unwrap_or_else(|| PathBuf::from(era_compiler_solidity::DEFAULT_EXECUTABLE_NAME)), ) .expect("Always valid"); - compiler_vyper::EXECUTABLE + era_compiler_vyper::EXECUTABLE .set( arguments .zkvyper - .unwrap_or_else(|| PathBuf::from(compiler_vyper::DEFAULT_EXECUTABLE_NAME)), + .unwrap_or_else(|| PathBuf::from(era_compiler_vyper::DEFAULT_EXECUTABLE_NAME)), ) .expect("Always valid"); let debug_config = if arguments.debug { std::fs::create_dir_all(compiler_tester::DEBUG_DIRECTORY)?; - Some(compiler_llvm_context::DebugConfig::new(PathBuf::from_str( - compiler_tester::DEBUG_DIRECTORY, - )?)) + Some(era_compiler_llvm_context::DebugConfig::new( + PathBuf::from_str(compiler_tester::DEBUG_DIRECTORY)?, + )) } else { None }; @@ -73,10 +78,6 @@ fn main_inner(arguments: Arguments) -> anyhow::Result<()> { if arguments.trace > 0 { std::fs::create_dir_all(compiler_tester::TRACE_DIRECTORY)?; } - zkevm_tester::runners::compiler_tests::set_tracing_mode( - zkevm_tester::runners::compiler_tests::VmTracingOptions::from_u64(arguments.trace as u64), - ); - zkevm_assembly::set_encoding_mode(zkevm_assembly::RunningVmEncodingMode::Testing); let mut thread_pool_builder = rayon::ThreadPoolBuilder::new(); if let Some(threads) = arguments.threads { @@ -90,29 +91,18 @@ fn main_inner(arguments: Arguments) -> anyhow::Result<()> { let summary = compiler_tester::Summary::new(arguments.verbosity, arguments.quiet).wrap(); let filters = compiler_tester::Filters::new(arguments.paths, arguments.modes, arguments.groups); - let system_contract_debug_config = if arguments.dump_system { - debug_config.clone() - } else { - None - }; - let compiler_tester = compiler_tester::CompilerTester::new( - summary.clone(), - filters, - debug_config, - vec![ - arguments - .solc_bin_config_path - .unwrap_or_else(|| PathBuf::from("./configs/solc-bin-default.json")), - arguments - .vyper_bin_config_path - .unwrap_or_else(|| PathBuf::from("./configs/vyper-bin-default.json")), - ], - PathBuf::from("./configs/solc-bin-system-contracts.json"), - system_contract_debug_config, - arguments.load_system_contracts, - arguments.save_system_contracts, - )?; + let compiler_tester = + compiler_tester::CompilerTester::new(summary.clone(), filters, debug_config.clone())?; + + let binary_download_config_paths = vec![ + arguments + .solc_bin_config_path + .unwrap_or_else(|| PathBuf::from("./configs/solc-bin-default.json")), + arguments + .vyper_bin_config_path + .unwrap_or_else(|| PathBuf::from("./configs/vyper-bin-default.json")), + ]; let run_time_start = Instant::now(); println!( @@ -121,14 +111,48 @@ fn main_inner(arguments: Arguments) -> anyhow::Result<()> { rayon::current_num_threads(), ); - match ( - arguments.disable_deployer, - arguments.disable_value_simulator, - ) { - (true, true) => compiler_tester.run::()?, - (true, false) => compiler_tester.run::()?, - (false, true) => compiler_tester.run::()?, - (false, false) => compiler_tester.run::()?, + match target { + era_compiler_llvm_context::Target::EraVM => { + zkevm_tester::runners::compiler_tests::set_tracing_mode( + zkevm_tester::runners::compiler_tests::VmTracingOptions::from_u64( + arguments.trace as u64, + ), + ); + zkevm_assembly::set_encoding_mode(zkevm_assembly::RunningVmEncodingMode::Testing); + + let system_contract_debug_config = if arguments.dump_system { + debug_config + } else { + None + }; + let vm = compiler_tester::EraVM::new( + binary_download_config_paths, + PathBuf::from("./configs/solc-bin-system-contracts.json"), + system_contract_debug_config, + arguments.system_contracts_load_path, + arguments.system_contracts_save_path, + )?; + + match ( + arguments.disable_deployer, + arguments.disable_value_simulator, + ) { + (true, true) => { + compiler_tester.run_eravm::(vm)? + } + (true, false) => { + compiler_tester.run_eravm::(vm)? + } + (false, true) => compiler_tester + .run_eravm::(vm)?, + (false, false) => compiler_tester + .run_eravm::(vm)?, + } + } + era_compiler_llvm_context::Target::EVM => { + compiler_tester::EVM::download(binary_download_config_paths)?; + compiler_tester.run_evm()?; + } } let summary = compiler_tester::Summary::unwrap_arc(summary); @@ -175,12 +199,15 @@ mod tests { dump_system: false, disable_deployer: false, disable_value_simulator: false, - zksolc: Some(PathBuf::from(compiler_solidity::DEFAULT_EXECUTABLE_NAME)), - zkvyper: Some(PathBuf::from(compiler_vyper::DEFAULT_EXECUTABLE_NAME)), + zksolc: Some(PathBuf::from( + era_compiler_solidity::DEFAULT_EXECUTABLE_NAME, + )), + zkvyper: Some(PathBuf::from(era_compiler_vyper::DEFAULT_EXECUTABLE_NAME)), + target: Some(era_compiler_llvm_context::Target::EraVM.to_string()), solc_bin_config_path: Some(PathBuf::from("./configs/solc-bin-default.json")), vyper_bin_config_path: Some(PathBuf::from("./configs/vyper-bin-default.json")), - load_system_contracts: None, - save_system_contracts: None, + system_contracts_load_path: None, + system_contracts_save_path: None, llvm_verify_each: false, llvm_debug_logging: false, }; diff --git a/compiler_tester/src/compilers/downloader/config/mod.rs b/compiler_tester/src/compilers/downloader/config/mod.rs index 1f6ffd95..d925dee7 100644 --- a/compiler_tester/src/compilers/downloader/config/mod.rs +++ b/compiler_tester/src/compilers/downloader/config/mod.rs @@ -32,18 +32,29 @@ impl Config { None => anyhow::bail!("Platforms are not defined"), }; - Ok(if cfg!(target_os = "linux") { - platforms - .get("linux") - .cloned() - .ok_or_else(|| anyhow::anyhow!("Linux platform directory is not defined"))? - } else if cfg!(target_os = "macos") { - platforms - .get("macos") - .cloned() - .ok_or_else(|| anyhow::anyhow!("MacOS platform directory is not defined"))? + let platform = if cfg!(target_arch = "x86_64") { + if cfg!(target_os = "linux") { + "linux-amd64" + } else if cfg!(target_os = "macos") { + "macos-amd64" + } else { + anyhow::bail!("This platform is not supported in `solc`!"); + } + } else if cfg!(target_arch = "aarch64") { + if cfg!(target_os = "linux") { + "linux-arm64" + } else if cfg!(target_os = "macos") { + "macos-arm64" + } else { + anyhow::bail!("This platform is not supported in `solc`!"); + } } else { - anyhow::bail!("Unsupported platform!") - }) + anyhow::bail!("This platform is not supported in `solc`!"); + }; + + platforms + .get(platform) + .cloned() + .ok_or_else(|| anyhow::anyhow!("Directory for platform `{}` is not defined", platform)) } } diff --git a/compiler_tester/src/compilers/downloader/mod.rs b/compiler_tester/src/compilers/downloader/mod.rs index efd1539d..3781c1b5 100644 --- a/compiler_tester/src/compilers/downloader/mod.rs +++ b/compiler_tester/src/compilers/downloader/mod.rs @@ -67,10 +67,13 @@ impl Downloader { let source_path = binary .source - .replace("${PLATFORM}", platform_directory.as_str()); + .replace("${PLATFORM}", platform_directory.as_str()) + .replace("${VERSION}", version.as_str()); - let destination_path = PathBuf::from_str(binary.destination.as_str()) - .map_err(|_| anyhow::anyhow!("Binary `{}` destination is invalid", source_path))?; + let destination_path = binary.destination.replace("${VERSION}", version.as_str()); + let destination_path = PathBuf::from_str(destination_path.as_str()).map_err(|_| { + anyhow::anyhow!("Binary `{}` destination is invalid", destination_path) + })?; let data = match binary.protocol { Protocol::File => { @@ -79,10 +82,10 @@ impl Downloader { } println!( - " {} binary `{}` => `{}`", + " {} binary `{}` => {:?}", "Copying".bright_green().bold(), source_path, - binary.destination, + destination_path, ); std::fs::copy(source_path.as_str(), binary.destination.as_str()).map_err( @@ -104,10 +107,10 @@ impl Downloader { let source_url = reqwest::Url::from_str(source_path.as_str()).expect("Always valid"); println!( - " {} binary `{}` => `{}`", + " {} binary `{}` => {:?}", "Downloading".bright_green().bold(), source_url, - binary.destination, + destination_path, ); self.http_client.get(source_url).send()?.bytes()? } @@ -141,10 +144,10 @@ impl Downloader { reqwest::Url::from_str(source_path.to_str().expect("Always valid")) .expect("Always valid"); println!( - " {} binary `{}` => `{}`", + " {} binary `{}` => {:?}", "Downloading".bright_green().bold(), source_url, - binary.destination, + destination_path, ); self.http_client.get(source_url).send()?.bytes()? } diff --git a/compiler_tester/src/compilers/eravm.rs b/compiler_tester/src/compilers/eravm.rs index 936f3c97..fc9e9fd3 100644 --- a/compiler_tester/src/compilers/eravm.rs +++ b/compiler_tester/src/compilers/eravm.rs @@ -7,31 +7,20 @@ use std::collections::HashMap; use super::mode::eravm::Mode as EraVMMode; use super::mode::Mode; -use super::output::build::Build as EraVMContractBuild; -use super::output::Output; use super::Compiler; +use crate::vm::eravm::input::build::Build as EraVMBuild; +use crate::vm::eravm::input::Input as EraVMInput; +use crate::vm::evm::input::Input as EVMInput; /// /// The EraVM compiler. /// +#[derive(Default)] #[allow(non_camel_case_types)] pub struct EraVMCompiler; -impl EraVMCompiler { - /// - /// A shortcut constructor. - /// - pub fn new() -> Self { - Self - } -} - impl Compiler for EraVMCompiler { - fn modes(&self) -> Vec { - vec![EraVMMode::default().into()] - } - - fn compile( + fn compile_for_eravm( &self, _test_path: String, sources: Vec<(String, String)>, @@ -39,17 +28,17 @@ impl Compiler for EraVMCompiler { _mode: &Mode, _is_system_mode: bool, _is_system_contracts_mode: bool, - _debug_config: Option, - ) -> anyhow::Result { + _debug_config: Option, + ) -> anyhow::Result { let builds = sources .iter() .map(|(path, source_code)| { zkevm_assembly::Assembly::try_from(source_code.to_owned()) .map_err(anyhow::Error::new) - .and_then(EraVMContractBuild::new) + .and_then(EraVMBuild::new) .map(|build| (path.to_string(), build)) }) - .collect::>>()?; + .collect::>>()?; let last_contract = sources .last() @@ -57,10 +46,25 @@ impl Compiler for EraVMCompiler { .0 .clone(); - Ok(Output::new(builds, None, last_contract)) + Ok(EraVMInput::new(builds, None, last_contract)) + } + + fn compile_for_evm( + &self, + _test_path: String, + _sources: Vec<(String, String)>, + _libraries: BTreeMap>, + _mode: &Mode, + _debug_config: Option, + ) -> anyhow::Result { + anyhow::bail!("EraVM compiler does not support EVM compilation"); + } + + fn modes(&self) -> Vec { + vec![EraVMMode::default().into()] } - fn has_many_contracts(&self) -> bool { + fn has_multiple_contracts(&self) -> bool { false } } diff --git a/compiler_tester/src/compilers/llvm.rs b/compiler_tester/src/compilers/llvm.rs index 447e600c..902f452a 100644 --- a/compiler_tester/src/compilers/llvm.rs +++ b/compiler_tester/src/compilers/llvm.rs @@ -9,13 +9,16 @@ use sha3::Digest; use super::mode::llvm::Mode as LLVMMode; use super::mode::Mode; -use super::output::build::Build as EraVMContractBuild; -use super::output::Output; use super::Compiler; +use crate::vm::eravm::input::build::Build as EraVMBuild; +use crate::vm::eravm::input::Input as EraVMInput; +use crate::vm::evm::input::build::Build as EVMBuild; +use crate::vm::evm::input::Input as EVMInput; /// /// The LLVM compiler. /// +#[derive(Default)] pub struct LLVMCompiler; lazy_static::lazy_static! { @@ -23,76 +26,110 @@ lazy_static::lazy_static! { /// The LLVM compiler supported modes. /// static ref MODES: Vec = { - compiler_llvm_context::OptimizerSettings::combinations() + era_compiler_llvm_context::OptimizerSettings::combinations() .into_iter() .map(|llvm_optimizer_settings| LLVMMode::new(llvm_optimizer_settings).into()) .collect::>() }; } -impl LLVMCompiler { - /// - /// A shortcut constructor. - /// - pub fn new() -> Self { - Self - } +impl Compiler for LLVMCompiler { + fn compile_for_eravm( + &self, + _test_path: String, + sources: Vec<(String, String)>, + _libraries: BTreeMap>, + mode: &Mode, + _is_system_mode: bool, + _is_system_contracts_mode: bool, + debug_config: Option, + ) -> anyhow::Result { + let mode = LLVMMode::unwrap(mode); - /// - /// Compiles the source. - /// - fn compile_source( - source_code: &str, - name: &str, - mode: &LLVMMode, - debug_config: Option, - ) -> anyhow::Result { - let llvm = inkwell::context::Context::create(); - let memory_buffer = inkwell::memory_buffer::MemoryBuffer::create_from_memory_range_copy( - source_code.as_bytes(), - name, - ); - let module = llvm - .create_module_from_ir(memory_buffer) - .map_err(|error| anyhow::anyhow!(error.to_string()))?; - let optimizer = compiler_llvm_context::Optimizer::new(mode.llvm_optimizer_settings.clone()); - let source_hash = sha3::Keccak256::digest(source_code.as_bytes()).into(); - - let context = compiler_llvm_context::EraVMContext::< - compiler_llvm_context::EraVMDummyDependency, - >::new(&llvm, module, optimizer, None, true, debug_config); - let build = context.build(name, Some(source_hash))?; - let assembly = - zkevm_assembly::Assembly::from_string(build.assembly_text, build.metadata_hash)?; - - EraVMContractBuild::new(assembly) - } -} + let builds = sources + .iter() + .map(|(path, source)| { + let llvm = inkwell::context::Context::create(); + let memory_buffer = + inkwell::memory_buffer::MemoryBuffer::create_from_memory_range_copy( + source.as_bytes(), + path, + ); + let module = llvm + .create_module_from_ir(memory_buffer) + .map_err(|error| anyhow::anyhow!(error.to_string()))?; + let optimizer = + era_compiler_llvm_context::Optimizer::new(mode.llvm_optimizer_settings.clone()); + let source_hash = sha3::Keccak256::digest(source.as_bytes()).into(); -impl Compiler for LLVMCompiler { - fn modes(&self) -> Vec { - MODES.clone() + let context = era_compiler_llvm_context::EraVMContext::< + era_compiler_llvm_context::EraVMDummyDependency, + >::new( + &llvm, module, optimizer, None, true, debug_config.clone() + ); + let build = context.build(path, Some(source_hash))?; + let assembly = zkevm_assembly::Assembly::from_string( + build.assembly_text, + build.metadata_hash, + )?; + let build = EraVMBuild::new(assembly)?; + + Ok((path.to_owned(), build)) + }) + .collect::>>()?; + + let last_contract = sources + .last() + .ok_or_else(|| anyhow::anyhow!("Sources is empty"))? + .0 + .clone(); + + Ok(EraVMInput::new(builds, None, last_contract)) } - fn compile( + fn compile_for_evm( &self, _test_path: String, sources: Vec<(String, String)>, _libraries: BTreeMap>, mode: &Mode, - _is_system_mode: bool, - _is_system_contracts_mode: bool, - debug_config: Option, - ) -> anyhow::Result { + debug_config: Option, + ) -> anyhow::Result { let mode = LLVMMode::unwrap(mode); let builds = sources .iter() .map(|(path, source)| { - Self::compile_source(source, path, mode, debug_config.clone()) - .map(|build| (path.to_owned(), build)) + let llvm = inkwell::context::Context::create(); + let memory_buffer = + inkwell::memory_buffer::MemoryBuffer::create_from_memory_range_copy( + source.as_bytes(), + path, + ); + let module = llvm + .create_module_from_ir(memory_buffer) + .map_err(|error| anyhow::anyhow!(error.to_string()))?; + let optimizer = + era_compiler_llvm_context::Optimizer::new(mode.llvm_optimizer_settings.clone()); + let source_hash = sha3::Keccak256::digest(source.as_bytes()).into(); + + let context = era_compiler_llvm_context::EVMContext::< + era_compiler_llvm_context::EVMDummyDependency, + >::new( + &llvm, + module, + era_compiler_llvm_context::CodeType::Runtime, + optimizer, + None, + true, + debug_config.clone(), + ); + let build = context.build(path, Some(source_hash))?; + let build = EVMBuild::new(era_compiler_llvm_context::EVMBuild::default(), build); + + Ok((path.to_owned(), build)) }) - .collect::>>()?; + .collect::>>()?; let last_contract = sources .last() @@ -100,10 +137,14 @@ impl Compiler for LLVMCompiler { .0 .clone(); - Ok(Output::new(builds, None, last_contract)) + Ok(EVMInput::new(builds, None, last_contract)) + } + + fn modes(&self) -> Vec { + MODES.clone() } - fn has_many_contracts(&self) -> bool { + fn has_multiple_contracts(&self) -> bool { false } } diff --git a/compiler_tester/src/compilers/mod.rs b/compiler_tester/src/compilers/mod.rs index a8dbc19d..fc1025fa 100644 --- a/compiler_tester/src/compilers/mod.rs +++ b/compiler_tester/src/compilers/mod.rs @@ -7,7 +7,6 @@ pub mod downloader; pub mod eravm; pub mod llvm; pub mod mode; -pub mod output; pub mod solidity; pub mod vyper; pub mod yul; @@ -15,22 +14,19 @@ pub mod yul; use std::collections::BTreeMap; use self::mode::Mode; -use self::output::Output; + +use crate::vm::eravm::input::Input as EraVMInput; +use crate::vm::evm::input::Input as EVMInput; /// /// The compiler trait. /// pub trait Compiler: Send + Sync + 'static { /// - /// Returns supported compiler modes. - /// - fn modes(&self) -> Vec; - - /// - /// Compile all the sources. + /// Compile all sources for EraVM. /// #[allow(clippy::too_many_arguments)] - fn compile( + fn compile_for_eravm( &self, test_path: String, sources: Vec<(String, String)>, @@ -38,11 +34,28 @@ pub trait Compiler: Send + Sync + 'static { mode: &Mode, is_system_mode: bool, is_system_contracts_mode: bool, - debug_config: Option, - ) -> anyhow::Result; + debug_config: Option, + ) -> anyhow::Result; + + /// + /// Compile all sources for EVM. + /// + fn compile_for_evm( + &self, + test_path: String, + sources: Vec<(String, String)>, + libraries: BTreeMap>, + mode: &Mode, + debug_config: Option, + ) -> anyhow::Result; + + /// + /// Returns supported compiler modes. + /// + fn modes(&self) -> Vec; /// - /// Returns true if the one source file can contains many contracts, false otherwise. + /// Whether one source file can contains multiple contracts. /// - fn has_many_contracts(&self) -> bool; + fn has_multiple_contracts(&self) -> bool; } diff --git a/compiler_tester/src/compilers/mode/llvm.rs b/compiler_tester/src/compilers/mode/llvm.rs index b1896dae..c8053e2b 100644 --- a/compiler_tester/src/compilers/mode/llvm.rs +++ b/compiler_tester/src/compilers/mode/llvm.rs @@ -12,14 +12,14 @@ use super::Mode as ModeWrapper; #[derive(Debug, Clone)] pub struct Mode { /// The optimizer settings. - pub llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings, + pub llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings, } impl Mode { /// /// A shortcut constructor. /// - pub fn new(mut llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings) -> Self { + pub fn new(mut llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings) -> Self { let llvm_options = LLVMOptions::get(); llvm_optimizer_settings.is_verify_each_enabled = llvm_options.is_verify_each_enabled(); llvm_optimizer_settings.is_debug_logging_enabled = llvm_options.is_debug_logging_enabled(); diff --git a/compiler_tester/src/compilers/mode/mod.rs b/compiler_tester/src/compilers/mode/mod.rs index 25a60ee4..3b494a32 100644 --- a/compiler_tester/src/compilers/mode/mod.rs +++ b/compiler_tester/src/compilers/mode/mod.rs @@ -109,7 +109,7 @@ impl Mode { /// /// Returns the LLVM optimizer settings. /// - pub fn llvm_optimizer_settings(&self) -> Option<&compiler_llvm_context::OptimizerSettings> { + pub fn llvm_optimizer_settings(&self) -> Option<&era_compiler_llvm_context::OptimizerSettings> { match self { Mode::Solidity(mode) => Some(&mode.llvm_optimizer_settings), Mode::Yul(mode) => Some(&mode.llvm_optimizer_settings), diff --git a/compiler_tester/src/compilers/mode/solidity.rs b/compiler_tester/src/compilers/mode/solidity.rs index 085447ab..dea07392 100644 --- a/compiler_tester/src/compilers/mode/solidity.rs +++ b/compiler_tester/src/compilers/mode/solidity.rs @@ -16,13 +16,13 @@ pub struct Mode { /// The Solidity compiler version. pub solc_version: semver::Version, /// The Solidity compiler output type. - pub solc_pipeline: compiler_solidity::SolcPipeline, + pub solc_pipeline: era_compiler_solidity::SolcPipeline, /// Whether to enable the EVMLA codegen via Yul IR. pub via_ir: bool, /// Whether to run the Solidity compiler optimizer. pub solc_optimize: bool, /// The optimizer settings. - pub llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings, + pub llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings, } impl Mode { @@ -31,10 +31,10 @@ impl Mode { /// pub fn new( solc_version: semver::Version, - solc_pipeline: compiler_solidity::SolcPipeline, + solc_pipeline: era_compiler_solidity::SolcPipeline, via_ir: bool, solc_optimize: bool, - mut llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings, + mut llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings, ) -> Self { let llvm_options = LLVMOptions::get(); llvm_optimizer_settings.is_verify_each_enabled = llvm_options.is_verify_each_enabled(); @@ -98,20 +98,21 @@ impl Mode { solidity_adapter::EVM::London, solidity_adapter::EVM::Paris, solidity_adapter::EVM::Shanghai, + solidity_adapter::EVM::Cancun, ]) { return false; } match self.solc_pipeline { - compiler_solidity::SolcPipeline::Yul => { + era_compiler_solidity::SolcPipeline::Yul => { params.compile_via_yul != solidity_adapter::CompileViaYul::False && params.abi_encoder_v1_only != solidity_adapter::ABIEncoderV1Only::True } - compiler_solidity::SolcPipeline::EVMLA if self.via_ir => { + era_compiler_solidity::SolcPipeline::EVMLA if self.via_ir => { params.compile_via_yul != solidity_adapter::CompileViaYul::False && params.abi_encoder_v1_only != solidity_adapter::ABIEncoderV1Only::True } - compiler_solidity::SolcPipeline::EVMLA => { + era_compiler_solidity::SolcPipeline::EVMLA => { params.compile_via_yul != solidity_adapter::CompileViaYul::True } } @@ -124,9 +125,9 @@ impl std::fmt::Display for Mode { f, "{}{}{} {}", match self.solc_pipeline { - compiler_solidity::SolcPipeline::Yul => "Y", - compiler_solidity::SolcPipeline::EVMLA if self.via_ir => "y", - compiler_solidity::SolcPipeline::EVMLA => "E", + era_compiler_solidity::SolcPipeline::Yul => "Y", + era_compiler_solidity::SolcPipeline::EVMLA if self.via_ir => "y", + era_compiler_solidity::SolcPipeline::EVMLA => "E", }, if self.solc_optimize { '+' } else { '-' }, self.llvm_optimizer_settings, diff --git a/compiler_tester/src/compilers/mode/vyper.rs b/compiler_tester/src/compilers/mode/vyper.rs index 57022692..03cafae4 100644 --- a/compiler_tester/src/compilers/mode/vyper.rs +++ b/compiler_tester/src/compilers/mode/vyper.rs @@ -16,7 +16,7 @@ pub struct Mode { /// Whether to run the Vyper compiler optimizer. pub vyper_optimize: bool, /// The optimizer settings. - pub llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings, + pub llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings, } impl Mode { @@ -26,7 +26,7 @@ impl Mode { pub fn new( vyper_version: semver::Version, vyper_optimize: bool, - mut llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings, + mut llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings, ) -> Self { let llvm_options = LLVMOptions::get(); llvm_optimizer_settings.is_verify_each_enabled = llvm_options.is_verify_each_enabled(); diff --git a/compiler_tester/src/compilers/mode/yul.rs b/compiler_tester/src/compilers/mode/yul.rs index 5ff0fb5e..30dc2197 100644 --- a/compiler_tester/src/compilers/mode/yul.rs +++ b/compiler_tester/src/compilers/mode/yul.rs @@ -12,14 +12,14 @@ use super::Mode as ModeWrapper; #[derive(Debug, Clone)] pub struct Mode { /// The optimizer settings. - pub llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings, + pub llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings, } impl Mode { /// /// A shortcut constructor. /// - pub fn new(mut llvm_optimizer_settings: compiler_llvm_context::OptimizerSettings) -> Self { + pub fn new(mut llvm_optimizer_settings: era_compiler_llvm_context::OptimizerSettings) -> Self { let llvm_options = LLVMOptions::get(); llvm_optimizer_settings.is_verify_each_enabled = llvm_options.is_verify_each_enabled(); llvm_optimizer_settings.is_debug_logging_enabled = llvm_options.is_debug_logging_enabled(); diff --git a/compiler_tester/src/compilers/solidity/mod.rs b/compiler_tester/src/compilers/solidity/mod.rs index 21ee521b..3a84918c 100644 --- a/compiler_tester/src/compilers/solidity/mod.rs +++ b/compiler_tester/src/compilers/solidity/mod.rs @@ -13,9 +13,11 @@ use itertools::Itertools; use super::cache::Cache; use super::mode::solidity::Mode as SolidityMode; use super::mode::Mode; -use super::output::build::Build as EraVMContractBuild; -use super::output::Output; use super::Compiler; +use crate::vm::eravm::input::build::Build as EraVMBuild; +use crate::vm::eravm::input::Input as EraVMInput; +use crate::vm::evm::input::build::Build as EVMBuild; +use crate::vm::evm::input::Input as EVMInput; use self::solc_cache_key::SolcCacheKey; @@ -24,7 +26,7 @@ use self::solc_cache_key::SolcCacheKey; /// pub struct SolidityCompiler { /// The `solc` process output cache. - cache: Cache, + cache: Cache, } lazy_static::lazy_static! { @@ -36,18 +38,18 @@ lazy_static::lazy_static! { static ref MODES: Vec = { let mut solc_pipeline_versions = Vec::new(); for (pipeline, optimize, via_ir) in [ - (compiler_solidity::SolcPipeline::Yul, false, true), - (compiler_solidity::SolcPipeline::Yul, true, true), - (compiler_solidity::SolcPipeline::EVMLA, false, false), - (compiler_solidity::SolcPipeline::EVMLA, true, false), - (compiler_solidity::SolcPipeline::EVMLA, true, true), + (era_compiler_solidity::SolcPipeline::Yul, false, true), + (era_compiler_solidity::SolcPipeline::Yul, true, true), + (era_compiler_solidity::SolcPipeline::EVMLA, false, false), + (era_compiler_solidity::SolcPipeline::EVMLA, true, false), + (era_compiler_solidity::SolcPipeline::EVMLA, true, true), ] { for version in SolidityCompiler::all_versions(pipeline, via_ir).expect("`solc` versions analysis error") { solc_pipeline_versions.push((pipeline, optimize, via_ir, version)); } } - compiler_llvm_context::OptimizerSettings::combinations() + era_compiler_llvm_context::OptimizerSettings::combinations() .into_iter() .cartesian_product(solc_pipeline_versions) .map( @@ -85,22 +87,27 @@ impl SolidityCompiler { /// /// Returns the `solc` compiler path by version. /// - pub fn get_solc_by_version(version: &semver::Version) -> compiler_solidity::SolcCompiler { - compiler_solidity::SolcCompiler::new(format!("{}/solc-{}", Self::DIRECTORY, version)) + pub fn get_solc_by_version( + version: &semver::Version, + ) -> anyhow::Result { + era_compiler_solidity::SolcCompiler::new(format!("{}/solc-{}", Self::DIRECTORY, version)) } /// /// Returns the system contract `solc` compiler path. /// - pub fn get_system_contract_solc() -> compiler_solidity::SolcCompiler { - compiler_solidity::SolcCompiler::new(format!("{}/solc-system-contracts", Self::DIRECTORY)) + pub fn get_system_contract_solc() -> anyhow::Result { + era_compiler_solidity::SolcCompiler::new(format!( + "{}/solc-system-contracts", + Self::DIRECTORY + )) } /// /// Returns the compiler versions downloaded for the specified compilation pipeline. /// pub fn all_versions( - pipeline: compiler_solidity::SolcPipeline, + pipeline: era_compiler_solidity::SolcPipeline, via_ir: bool, ) -> anyhow::Result> { let mut versions = Vec::new(); @@ -130,12 +137,12 @@ impl SolidityCompiler { Ok(version) => version, Err(_) => continue, }; - if compiler_solidity::SolcPipeline::Yul == pipeline && version.minor < 8 { + if era_compiler_solidity::SolcPipeline::Yul == pipeline && version.minor < 8 { continue; } - if compiler_solidity::SolcPipeline::EVMLA == pipeline + if era_compiler_solidity::SolcPipeline::EVMLA == pipeline && via_ir - && version < compiler_solidity::SolcCompiler::FIRST_VIA_IR_VERSION + && version < era_compiler_solidity::SolcCompiler::FIRST_VIA_IR_VERSION { continue; } @@ -153,24 +160,34 @@ impl SolidityCompiler { libraries: &BTreeMap>, mode: &SolidityMode, is_system_contracts_mode: bool, - ) -> anyhow::Result { + ) -> anyhow::Result { let mut solc = if is_system_contracts_mode { Self::get_system_contract_solc() } else { Self::get_solc_by_version(&mode.solc_version) - }; + }?; let output_selection = - compiler_solidity::SolcStandardJsonInputSettingsSelection::new_required( + era_compiler_solidity::SolcStandardJsonInputSettingsSelection::new_required( mode.solc_pipeline, ); - let optimizer = compiler_solidity::SolcStandardJsonInputSettingsOptimizer::new( + let optimizer = era_compiler_solidity::SolcStandardJsonInputSettingsOptimizer::new( mode.solc_optimize, None, + &mode.solc_version, + false, + false, ); - let solc_input = compiler_solidity::SolcStandardJsonInput::try_from_sources( + let evm_version = if mode.solc_version == semver::Version::new(0, 8, 24) { + Some(era_compiler_common::EVMVersion::Cancun) + } else { + None + }; + + let solc_input = era_compiler_solidity::SolcStandardJsonInput::try_from_sources( + evm_version, sources.iter().cloned().collect(), libraries.clone(), None, @@ -207,7 +224,7 @@ impl SolidityCompiler { libraries: &BTreeMap>, mode: &SolidityMode, is_system_contracts_mode: bool, - ) -> anyhow::Result { + ) -> anyhow::Result { let cache_key = SolcCacheKey::new( test_path, mode.solc_version.clone(), @@ -225,72 +242,11 @@ impl SolidityCompiler { self.cache.get_cloned(&cache_key) } - /// - /// Compile the contracts for a given solc output. - /// - fn compile( - mut solc_output: compiler_solidity::SolcStandardJsonOutput, - sources: Vec<(String, String)>, - libraries: BTreeMap>, - mode: &SolidityMode, - is_system_mode: bool, - debug_config: Option, - ) -> anyhow::Result> { - let project = solc_output.try_to_project( - sources.into_iter().collect::>(), - libraries, - mode.solc_pipeline, - &mode.solc_version, - debug_config.as_ref(), - )?; - - let build = project.compile( - mode.llvm_optimizer_settings.to_owned(), - is_system_mode, - false, - zkevm_assembly::get_encoding_mode(), - debug_config, - )?; - build.write_to_standard_json( - &mut solc_output, - &compiler_solidity::SolcVersion::new( - mode.solc_version.to_string(), - mode.solc_version.to_owned(), - None, - ), - &semver::Version::new(0, 0, 0), - )?; // TODO: set versions - Ok(solc_output - .contracts - .expect("Always exists") - .into_iter() - .flat_map(|(file_name, file)| { - file.into_iter() - .filter_map(|(contract_name, contract)| { - let name = format!("{}:{}", file_name, contract_name); - let evm = contract.evm.expect("Always exists"); - let assembly = - zkevm_assembly::Assembly::from_string(evm.assembly_text?, None) - .expect("Always valid"); - let build = match contract.hash { - Some(bytecode_hash) => { - EraVMContractBuild::new_with_hash(assembly, bytecode_hash) - .expect("Always valid") - } - None => EraVMContractBuild::new(assembly).expect("Always valid"), - }; - Some((name, build)) - }) - .collect::>() - }) - .collect()) - } - /// /// Get the method identifiers from the solc output. /// fn get_method_identifiers( - solc_output: &compiler_solidity::SolcStandardJsonOutput, + solc_output: &era_compiler_solidity::SolcStandardJsonOutput, ) -> anyhow::Result>> { let files = solc_output .contracts @@ -316,13 +272,14 @@ impl SolidityCompiler { })? .iter() { - let selector = u32::from_str_radix(selector, compiler_common::BASE_HEXADECIMAL) - .map_err(|error| { - anyhow::anyhow!( - "Invalid selector from the Solidity compiler: {}", - error - ) - })?; + let selector = + u32::from_str_radix(selector, era_compiler_common::BASE_HEXADECIMAL) + .map_err(|error| { + anyhow::anyhow!( + "Invalid selector from the Solidity compiler: {}", + error + ) + })?; contract_identifiers.insert(entry.clone(), selector); } method_identifiers.insert(format!("{path}:{name}"), contract_identifiers); @@ -335,7 +292,7 @@ impl SolidityCompiler { /// Get the last contract from the solc output. /// fn get_last_contract( - solc_output: &compiler_solidity::SolcStandardJsonOutput, + solc_output: &era_compiler_solidity::SolcStandardJsonOutput, sources: &[(String, String)], ) -> anyhow::Result { solc_output @@ -366,11 +323,7 @@ impl SolidityCompiler { } impl Compiler for SolidityCompiler { - fn modes(&self) -> Vec { - MODES.clone() - } - - fn compile( + fn compile_for_eravm( &self, test_path: String, sources: Vec<(String, String)>, @@ -378,11 +331,11 @@ impl Compiler for SolidityCompiler { mode: &Mode, is_system_mode: bool, is_system_contracts_mode: bool, - debug_config: Option, - ) -> anyhow::Result { + debug_config: Option, + ) -> anyhow::Result { let mode = SolidityMode::unwrap(mode); - let solc_output = self + let mut solc_output = self .run_solc_cached( test_path, &sources, @@ -414,20 +367,131 @@ impl Compiler for SolidityCompiler { let last_contract = Self::get_last_contract(&solc_output, &sources) .map_err(|error| anyhow::anyhow!("Failed to get last contract: {}", error))?; - let builds = Self::compile( - solc_output, - sources, + let project = solc_output.try_to_project( + sources.into_iter().collect::>(), libraries, - mode, + mode.solc_pipeline, + &era_compiler_solidity::SolcVersion::new_simple(mode.solc_version.to_owned()), + debug_config.as_ref(), + )?; + + let build = project.compile_to_eravm( + mode.llvm_optimizer_settings.to_owned(), is_system_mode, + false, + zkevm_assembly::get_encoding_mode(), debug_config, - ) - .map_err(|error| anyhow::anyhow!("Failed to compile the contracts: {}", error))?; + )?; + build.write_to_standard_json( + &mut solc_output, + &era_compiler_solidity::SolcVersion::new( + mode.solc_version.to_string(), + mode.solc_version.to_owned(), + None, + ), + &semver::Version::new(0, 0, 0), + )?; - Ok(Output::new(builds, Some(method_identifiers), last_contract)) + let builds: HashMap = solc_output + .contracts + .expect("Always exists") + .into_iter() + .flat_map(|(file_name, file)| { + file.into_iter() + .filter_map(|(contract_name, contract)| { + let name = format!("{}:{}", file_name, contract_name); + let evm = contract.evm.expect("Always exists"); + let assembly = + zkevm_assembly::Assembly::from_string(evm.assembly_text?, None) + .expect("Always valid"); + let build = match contract.hash { + Some(bytecode_hash) => { + EraVMBuild::new_with_hash(assembly, bytecode_hash) + .expect("Always valid") + } + None => EraVMBuild::new(assembly).expect("Always valid"), + }; + Some((name, build)) + }) + .collect::>() + }) + .collect(); + + Ok(EraVMInput::new( + builds, + Some(method_identifiers), + last_contract, + )) + } + + fn compile_for_evm( + &self, + test_path: String, + sources: Vec<(String, String)>, + libraries: BTreeMap>, + mode: &Mode, + debug_config: Option, + ) -> anyhow::Result { + let mode = SolidityMode::unwrap(mode); + + let mut solc_output = self + .run_solc_cached(test_path, &sources, &libraries, mode, false) + .map_err(|error| anyhow::anyhow!("Failed to run solc: {}", error))?; + + if let Some(errors) = solc_output.errors.as_deref() { + let mut has_errors = false; + let mut error_messages = Vec::with_capacity(errors.len()); + + for error in errors.iter() { + if error.severity.as_str() == "error" { + has_errors = true; + error_messages.push(error.formatted_message.to_owned()); + } + } + + if has_errors { + anyhow::bail!("Errors found: {:?}", error_messages); + } + } + + let method_identifiers = Self::get_method_identifiers(&solc_output) + .map_err(|error| anyhow::anyhow!("Failed to get method identifiers: {}", error))?; + + let last_contract = Self::get_last_contract(&solc_output, &sources) + .map_err(|error| anyhow::anyhow!("Failed to get last contract: {}", error))?; + + let project = solc_output.try_to_project( + sources.into_iter().collect::>(), + libraries, + mode.solc_pipeline, + &era_compiler_solidity::SolcVersion::new_simple(mode.solc_version.to_owned()), + debug_config.as_ref(), + )?; + + let build = + project.compile_to_evm(mode.llvm_optimizer_settings.to_owned(), false, debug_config)?; + + let builds: HashMap = build + .contracts + .into_iter() + .map(|(path, contract)| { + let build = EVMBuild::new(contract.deploy_build, contract.runtime_build); + (path, build) + }) + .collect::>(); + + Ok(EVMInput::new( + builds, + Some(method_identifiers), + last_contract, + )) + } + + fn modes(&self) -> Vec { + MODES.clone() } - fn has_many_contracts(&self) -> bool { + fn has_multiple_contracts(&self) -> bool { true } } diff --git a/compiler_tester/src/compilers/solidity/solc_cache_key.rs b/compiler_tester/src/compilers/solidity/solc_cache_key.rs index 4860d539..a2a047ba 100644 --- a/compiler_tester/src/compilers/solidity/solc_cache_key.rs +++ b/compiler_tester/src/compilers/solidity/solc_cache_key.rs @@ -12,7 +12,7 @@ pub struct SolcCacheKey { /// The Solidity compiler version. pub version: semver::Version, /// The Solidity compiler output type. - pub pipeline: compiler_solidity::SolcPipeline, + pub pipeline: era_compiler_solidity::SolcPipeline, /// Whether to enable the EVMLA codegen via Yul IR. pub via_ir: bool, /// Whether to run the Solidity compiler optimizer. @@ -26,7 +26,7 @@ impl SolcCacheKey { pub fn new( test_path: String, version: semver::Version, - pipeline: compiler_solidity::SolcPipeline, + pipeline: era_compiler_solidity::SolcPipeline, via_ir: bool, optimize: bool, ) -> Self { diff --git a/compiler_tester/src/compilers/vyper/mod.rs b/compiler_tester/src/compilers/vyper/mod.rs index 42e0bc6f..1bba62d1 100644 --- a/compiler_tester/src/compilers/vyper/mod.rs +++ b/compiler_tester/src/compilers/vyper/mod.rs @@ -15,9 +15,9 @@ use itertools::Itertools; use super::cache::Cache; use super::mode::vyper::Mode as VyperMode; use super::mode::Mode; -use super::output::build::Build as EraVMContractBuild; -use super::output::Output; use super::Compiler; +use crate::vm::eravm::input::build::Build as EraVMBuild; +use crate::vm::eravm::input::Input as EraVMInput; use self::vyper_cache_key::VyperCacheKey; @@ -26,7 +26,7 @@ use self::vyper_cache_key::VyperCacheKey; /// pub struct VyperCompiler { /// The vyper process output cache. - cache: Cache, + cache: Cache, } lazy_static::lazy_static! { @@ -36,7 +36,7 @@ lazy_static::lazy_static! { static ref MODES: Vec = { let vyper_versions = VyperCompiler::all_versions().expect("`vyper` versions analysis error"); - compiler_llvm_context::OptimizerSettings::combinations() + era_compiler_llvm_context::OptimizerSettings::combinations() .into_iter() .cartesian_product(vyper_versions) .cartesian_product(vec![false, true]) @@ -65,8 +65,12 @@ impl VyperCompiler { /// /// Returns the Vyper compiler instance by version. /// - fn get_vyper_by_version(version: &semver::Version) -> compiler_vyper::VyperCompiler { - compiler_vyper::VyperCompiler::new(format!("{}/vyper-{}", Self::DIRECTORY, version)) + fn get_vyper_by_version( + version: &semver::Version, + ) -> anyhow::Result { + era_compiler_vyper::VyperCompiler::new( + format!("{}/vyper-{}", Self::DIRECTORY, version).as_str(), + ) } /// @@ -111,8 +115,8 @@ impl VyperCompiler { fn run_vyper( sources: &[(String, String)], mode: &VyperMode, - ) -> anyhow::Result { - let vyper = Self::get_vyper_by_version(&mode.vyper_version); + ) -> anyhow::Result { + let vyper = Self::get_vyper_by_version(&mode.vyper_version)?; let paths = sources .iter() @@ -121,7 +125,14 @@ impl VyperCompiler { }) .collect::>>()?; - vyper.batch(&mode.vyper_version, paths, mode.vyper_optimize) + // TODO: set Cancun for v0.3.10 + let evm_version = if mode.vyper_version == semver::Version::new(0, 3, 10) { + Some(era_compiler_common::EVMVersion::Shanghai) + } else { + None + }; + + vyper.batch(&mode.vyper_version, paths, evm_version, mode.vyper_optimize) } /// @@ -132,7 +143,7 @@ impl VyperCompiler { test_path: String, sources: &[(String, String)], mode: &VyperMode, - ) -> anyhow::Result { + ) -> anyhow::Result { let cache_key = VyperCacheKey::new(test_path, mode.vyper_version.clone(), mode.vyper_optimize); @@ -148,11 +159,12 @@ impl VyperCompiler { /// Compile the vyper project. /// fn compile( - project: compiler_vyper::Project, + project: era_compiler_vyper::Project, mode: &VyperMode, - debug_config: Option, - ) -> anyhow::Result> { + debug_config: Option, + ) -> anyhow::Result> { let build = project.compile( + None, mode.llvm_optimizer_settings.to_owned(), true, zkevm_assembly::get_encoding_mode(), @@ -170,7 +182,7 @@ impl VyperCompiler { .expect("Always valid"); Ok(( path, - EraVMContractBuild::new_with_hash(assembly, contract.build.bytecode_hash)?, + EraVMBuild::new_with_hash(assembly, contract.build.bytecode_hash)?, )) }) .collect() @@ -180,21 +192,24 @@ impl VyperCompiler { /// Get the method identifiers from the solc output. /// fn get_method_identifiers( - project: &compiler_vyper::Project, + project: &era_compiler_vyper::Project, ) -> anyhow::Result>> { let mut method_identifiers = BTreeMap::new(); for (path, contract) in project.contracts.iter() { let contract_abi = match contract { - compiler_vyper::Contract::Vyper(inner) => &inner.abi, - compiler_vyper::Contract::LLVMIR(_inner) => panic!("Only used in the Vyper CLI"), - compiler_vyper::Contract::ZKASM(_inner) => panic!("Only used in the Vyper CLI"), + era_compiler_vyper::Contract::Vyper(inner) => &inner.abi, + era_compiler_vyper::Contract::LLVMIR(_inner) => { + panic!("Only used in the Vyper CLI") + } + era_compiler_vyper::Contract::ZKASM(_inner) => panic!("Only used in the Vyper CLI"), }; let mut contract_identifiers = BTreeMap::new(); for (entry, hash) in contract_abi.iter() { - let selector = u32::from_str_radix(&hash[2..], compiler_common::BASE_HEXADECIMAL) - .map_err(|error| { - anyhow::anyhow!("Invalid selector from the Vyper compiler: {}", error) - })?; + let selector = + u32::from_str_radix(&hash[2..], era_compiler_common::BASE_HEXADECIMAL) + .map_err(|error| { + anyhow::anyhow!("Invalid selector from the Vyper compiler: {}", error) + })?; contract_identifiers.insert(entry.clone(), selector); } method_identifiers.insert(path.clone(), contract_identifiers); @@ -207,23 +222,30 @@ impl VyperCompiler { /// fn dump_lll( sources: &[(String, String)], - debug_config: &compiler_llvm_context::DebugConfig, + debug_config: &era_compiler_llvm_context::DebugConfig, mode: &VyperMode, ) -> anyhow::Result<()> { - let vyper = Self::get_vyper_by_version(&mode.vyper_version); + let vyper = Self::get_vyper_by_version(&mode.vyper_version)?; + + // TODO: set Cancun for v0.3.10 + let evm_version = if mode.vyper_version == semver::Version::new(0, 3, 10) { + Some(era_compiler_common::EVMVersion::Shanghai) + } else { + None + }; let lll = sources .iter() .map(|(path_str, _)| { let path = Path::new(path_str.as_str()); vyper - .lll_debug(path, mode.vyper_optimize) + .lll_debug(path, evm_version, mode.vyper_optimize) .map(|lll| (path_str.to_string(), lll)) }) .collect::>>()?; for (path, lll) in lll.iter() { - debug_config.dump_lll(path, lll)?; + debug_config.dump_lll(path, None, lll)?; } Ok(()) @@ -231,11 +253,7 @@ impl VyperCompiler { } impl Compiler for VyperCompiler { - fn modes(&self) -> Vec { - MODES.clone() - } - - fn compile( + fn compile_for_eravm( &self, test_path: String, sources: Vec<(String, String)>, @@ -243,8 +261,8 @@ impl Compiler for VyperCompiler { mode: &Mode, _is_system_mode: bool, _is_system_contracts_mode: bool, - debug_config: Option, - ) -> anyhow::Result { + debug_config: Option, + ) -> anyhow::Result { let mode = VyperMode::unwrap(mode); if let Some(ref debug_config) = debug_config { @@ -267,10 +285,29 @@ impl Compiler for VyperCompiler { let builds = Self::compile(project, mode, debug_config) .map_err(|error| anyhow::anyhow!("Failed to compile the contracts: {}", error))?; - Ok(Output::new(builds, Some(method_identifiers), last_contract)) + Ok(EraVMInput::new( + builds, + Some(method_identifiers), + last_contract, + )) + } + + fn compile_for_evm( + &self, + test_path: String, + sources: Vec<(String, String)>, + libraries: BTreeMap>, + mode: &Mode, + debug_config: Option, + ) -> anyhow::Result { + todo!() + } + + fn modes(&self) -> Vec { + MODES.clone() } - fn has_many_contracts(&self) -> bool { + fn has_multiple_contracts(&self) -> bool { false } } diff --git a/compiler_tester/src/compilers/yul.rs b/compiler_tester/src/compilers/yul.rs index bfb8d6d0..8208185d 100644 --- a/compiler_tester/src/compilers/yul.rs +++ b/compiler_tester/src/compilers/yul.rs @@ -8,14 +8,17 @@ use std::path::PathBuf; use super::mode::yul::Mode as YulMode; use super::mode::Mode; -use super::output::build::Build as EraVMContractBuild; -use super::output::Output; use super::solidity::SolidityCompiler; use super::Compiler; +use crate::vm::eravm::input::build::Build as EraVMBuild; +use crate::vm::eravm::input::Input as EraVMInput; +use crate::vm::evm::input::build::Build as EVMBuild; +use crate::vm::evm::input::Input as EVMInput; /// /// The Yul compiler. /// +#[derive(Default)] pub struct YulCompiler; lazy_static::lazy_static! { @@ -23,28 +26,15 @@ lazy_static::lazy_static! { /// The Yul compiler supported modes. /// static ref MODES: Vec = { - compiler_llvm_context::OptimizerSettings::combinations() + era_compiler_llvm_context::OptimizerSettings::combinations() .into_iter() .map(|llvm_optimizer_settings| YulMode::new(llvm_optimizer_settings).into()) .collect::>() }; } -impl YulCompiler { - /// - /// A shortcut constructor. - /// - pub fn new() -> Self { - Self - } -} - impl Compiler for YulCompiler { - fn modes(&self) -> Vec { - MODES.clone() - } - - fn compile( + fn compile_for_eravm( &self, _test_path: String, sources: Vec<(String, String)>, @@ -52,27 +42,27 @@ impl Compiler for YulCompiler { mode: &Mode, is_system_mode: bool, _is_system_contracts_mode: bool, - debug_config: Option, - ) -> anyhow::Result { + debug_config: Option, + ) -> anyhow::Result { let mode = YulMode::unwrap(mode); let solc_validator = if is_system_mode { None } else { - Some(SolidityCompiler::get_system_contract_solc()) + Some(SolidityCompiler::get_system_contract_solc()?) }; let builds = sources .iter() .map(|(path, source)| { - let project = compiler_solidity::Project::try_from_yul_string( + let project = era_compiler_solidity::Project::try_from_yul_string( PathBuf::from(path.as_str()).as_path(), source.as_str(), solc_validator.as_ref(), )?; let contract = project - .compile( + .compile_to_eravm( mode.llvm_optimizer_settings.to_owned(), is_system_mode, true, @@ -90,11 +80,10 @@ impl Compiler for YulCompiler { ) .expect("Always valid"); - let build = - EraVMContractBuild::new_with_hash(assembly, contract.build.bytecode_hash)?; + let build = EraVMBuild::new_with_hash(assembly, contract.build.bytecode_hash)?; Ok((path.to_owned(), build)) }) - .collect::>>()?; + .collect::>>()?; let last_contract = sources .last() @@ -102,10 +91,61 @@ impl Compiler for YulCompiler { .0 .clone(); - Ok(Output::new(builds, None, last_contract)) + Ok(EraVMInput::new(builds, None, last_contract)) + } + + fn compile_for_evm( + &self, + _test_path: String, + sources: Vec<(String, String)>, + _libraries: BTreeMap>, + mode: &Mode, + debug_config: Option, + ) -> anyhow::Result { + let mode = YulMode::unwrap(mode); + + let solc_validator = Some(SolidityCompiler::get_system_contract_solc()?); + + let builds = sources + .iter() + .map(|(path, source)| { + let project = era_compiler_solidity::Project::try_from_yul_string( + PathBuf::from(path.as_str()).as_path(), + source.as_str(), + solc_validator.as_ref(), + )?; + + let contract = project + .compile_to_evm( + mode.llvm_optimizer_settings.to_owned(), + true, + debug_config.clone(), + )? + .contracts + .remove(path) + .ok_or_else(|| { + anyhow::anyhow!("Contract `{}` not found in yul project", path) + })?; + + let build = EVMBuild::new(contract.deploy_build, contract.runtime_build); + Ok((path.to_owned(), build)) + }) + .collect::>>()?; + + let last_contract = sources + .last() + .ok_or_else(|| anyhow::anyhow!("Sources is empty"))? + .0 + .clone(); + + Ok(EVMInput::new(builds, None, last_contract)) + } + + fn modes(&self) -> Vec { + MODES.clone() } - fn has_many_contracts(&self) -> bool { + fn has_multiple_contracts(&self) -> bool { false } } diff --git a/compiler_tester/src/deployers/address_predictor.rs b/compiler_tester/src/deployers/address_predictor.rs deleted file mode 100644 index 3f9508ff..00000000 --- a/compiler_tester/src/deployers/address_predictor.rs +++ /dev/null @@ -1,73 +0,0 @@ -//! -//! The deploy address predictor. -//! - -use std::collections::HashMap; -use std::str::FromStr; - -/// -/// The deploy address predictor. -/// -#[derive(Debug, Clone)] -pub struct AddressPredictor { - /// The accounts create nonces. - nonces: HashMap, -} - -impl AddressPredictor { - /// The create prefix. - const CREATE_PREFIX: &'static str = - "63bae3a9951d38e8a3fbb7b70909afc1200610fc5bc55ade242f815974674f23"; // keccak256("zksyncCreate") -} - -impl AddressPredictor { - /// - /// Create new address predictor instance. - /// - pub fn new() -> Self { - Self { - nonces: HashMap::new(), - } - } - - /// - /// Get the next deploy address (without nonce incrementing). - /// - pub fn advance_next_address(&self, caller: &web3::types::Address) -> web3::types::Address { - let nonce = self.nonces.get(caller).cloned().unwrap_or_default(); - - let mut bytes = web3::types::H256::from_str(Self::CREATE_PREFIX) - .expect("Invalid constant create prefix") - .as_bytes() - .to_vec(); - bytes.extend( - [0; compiler_common::BYTE_LENGTH_FIELD - compiler_common::BYTE_LENGTH_ETH_ADDRESS], - ); - bytes.extend(caller.to_fixed_bytes()); - bytes.extend([0; compiler_common::BYTE_LENGTH_FIELD - std::mem::size_of::()]); - bytes.extend(nonce.to_be_bytes()); - - let address = web3::types::Address::from_slice( - &web3::signing::keccak256(bytes.as_slice()) - [compiler_common::BYTE_LENGTH_FIELD - compiler_common::BYTE_LENGTH_ETH_ADDRESS..], - ); - address - } - - /// - /// Increments caller nonce. - /// - pub fn increment_nonce(&mut self, caller: web3::types::Address) { - let nonce = self.nonces.entry(caller).or_insert(0); - *nonce += 1; - } - - /// - /// Get the next deploy address (increments nonce when called). - /// - pub fn next_address(&mut self, caller: web3::types::Address) -> web3::types::Address { - let address = self.advance_next_address(&caller); - self.increment_nonce(caller); - address - } -} diff --git a/compiler_tester/src/directories/ethereum/test.rs b/compiler_tester/src/directories/ethereum/test.rs index 5e576036..b49f874f 100644 --- a/compiler_tester/src/directories/ethereum/test.rs +++ b/compiler_tester/src/directories/ethereum/test.rs @@ -9,13 +9,16 @@ use std::sync::Mutex; use crate::compilers::mode::Mode; use crate::compilers::Compiler; -use crate::deployers::address_predictor::AddressPredictor; use crate::directories::Buildable; use crate::filters::Filters; use crate::summary::Summary; use crate::test::case::Case; +use crate::test::eravm::Test as EraVMTest; +use crate::test::evm::Test as EVMTest; use crate::test::instance::Instance; -use crate::test::Test; +use crate::vm::eravm::deployers::address_predictor::AddressPredictor as EraVMAddressPredictor; +use crate::vm::evm::address_predictor::AddressPredictor as EVMAddressPredictor; +use crate::vm::AddressPredictorIterator; /// /// The Ethereum compiler test. @@ -59,14 +62,14 @@ impl EthereumTest { } impl Buildable for EthereumTest { - fn build( + fn build_for_eravm( &self, mode: Mode, compiler: Arc, summary: Arc>, filters: &Filters, - debug_config: Option, - ) -> Option { + debug_config: Option, + ) -> Option { let test_path = self.index_entity.path.to_string_lossy().to_string(); if !filters.check_mode(&mode) { @@ -120,13 +123,13 @@ impl Buildable for EthereumTest { } }; - let mut address_predictor = AddressPredictor::new(); + let mut address_predictor = EraVMAddressPredictor::new(); let mut contract_address = None; let mut caller = solidity_adapter::account_address(solidity_adapter::DEFAULT_ACCOUNT_INDEX); - let mut libraries_for_compiler = BTreeMap::new(); let mut libraries_addresses = HashMap::new(); + let mut libraries = BTreeMap::new(); for call in calls.iter() { match call { @@ -140,12 +143,12 @@ impl Buildable for EthereumTest { ); return None; } - contract_address = Some(address_predictor.next_address(caller)); + contract_address = Some(address_predictor.next(&caller, true)); } solidity_adapter::FunctionCall::Library { name, source } => { let source = source.clone().unwrap_or_else(|| last_source.clone()); - let address = address_predictor.next_address(caller); - libraries_for_compiler + let address = address_predictor.next(&caller, true); + libraries .entry(source.clone()) .or_insert_with(BTreeMap::new) .insert( @@ -178,10 +181,10 @@ impl Buildable for EthereumTest { let contract_address = contract_address.expect("Always valid"); let compiler_output = match compiler - .compile( + .compile_for_eravm( test_path.clone(), self.test.sources.clone(), - libraries_for_compiler, + libraries, &mode, false, false, @@ -256,7 +259,215 @@ impl Buildable for EthereumTest { .map(|build| (build.bytecode_hash, build.assembly)) .collect(); - Some(Test::new( + Some(EraVMTest::new( + test_path, + self.index_entity.group.clone(), + mode, + builds, + vec![case], + )) + } + + fn build_for_evm( + &self, + mode: Mode, + compiler: Arc, + summary: Arc>, + filters: &Filters, + debug_config: Option, + ) -> Option { + let test_path = self.index_entity.path.to_string_lossy().to_string(); + + if !filters.check_mode(&mode) { + return None; + } + + if let Some(filters) = self.index_entity.modes.as_ref() { + if !mode.check_extended_filters(filters.as_slice()) { + return None; + } + } + + if let Some(versions) = self.index_entity.version.as_ref() { + if !mode.check_version(versions) { + return None; + } + } + + if !mode.check_ethereum_tests_params(&self.test.params) { + return None; + } + + let mut calls = self.test.calls.clone(); + if !calls + .iter() + .any(|call| matches!(call, solidity_adapter::FunctionCall::Constructor { .. })) + { + let constructor = solidity_adapter::FunctionCall::Constructor { + calldata: vec![], + value: None, + events: vec![], + gas_options: vec![], + }; + let constructor_insert_index = calls + .iter() + .position(|call| !matches!(call, solidity_adapter::FunctionCall::Library { .. })) + .unwrap_or(calls.len()); + calls.insert(constructor_insert_index, constructor); + } + + let last_source = match self.test.sources.last() { + Some(last_source) => last_source.0.clone(), + None => { + Summary::invalid( + summary, + Some(mode), + test_path, + anyhow::anyhow!("Sources is empty"), + ); + return None; + } + }; + + let mut address_predictor = EVMAddressPredictor::new(); + + let mut contract_address = None; + let mut caller = solidity_adapter::account_address(solidity_adapter::DEFAULT_ACCOUNT_INDEX); + + let mut libraries_addresses = HashMap::new(); + let mut libraries = BTreeMap::new(); + + for call in calls.iter() { + match call { + solidity_adapter::FunctionCall::Constructor { .. } => { + if contract_address.is_some() { + Summary::invalid( + summary, + Some(mode), + test_path, + anyhow::anyhow!("Two constructors in test"), + ); + return None; + } + contract_address = Some(address_predictor.next(&caller, true)); + } + solidity_adapter::FunctionCall::Library { name, source } => { + let source = source.clone().unwrap_or_else(|| last_source.clone()); + let address = address_predictor.next(&caller, true); + libraries + .entry(source.clone()) + .or_insert_with(BTreeMap::new) + .insert( + name.clone(), + format!("0x{}", crate::utils::address_as_string(&address)), + ); + libraries_addresses.insert(format!("{source}:{name}"), address); + } + solidity_adapter::FunctionCall::Account { input, expected } => { + let address = solidity_adapter::account_address(*input); + if !expected.eq(&address) { + Summary::invalid( + summary, + Some(mode), + test_path, + anyhow::anyhow!( + "Expected address: {}, but found {}", + expected, + address + ), + ); + return None; + } + caller = address; + } + _ => {} + } + } + + let contract_address = contract_address.expect("Always valid"); + + let compiler_output = match compiler + .compile_for_evm( + test_path.clone(), + self.test.sources.clone(), + libraries, + &mode, + debug_config, + ) + .map_err(|error| anyhow::anyhow!("Failed to compile sources: {}", error)) + { + Ok(output) => output, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + + let main_contract = compiler_output.last_contract; + + let main_contract_build = match compiler_output + .builds + .get(main_contract.as_str()) + .ok_or_else(|| { + anyhow::anyhow!("Main contract not found in the compiler build artifacts") + }) { + Ok(build) => build, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + let main_contract_instance = Instance::new( + main_contract, + Some(contract_address), + web3::types::U256::zero(), + ); + + let mut libraries_instances = HashMap::with_capacity(libraries_addresses.len()); + + for (library_name, library_address) in libraries_addresses { + let build = match compiler_output.builds.get(&library_name).ok_or_else(|| { + anyhow::anyhow!( + "Library {} not found in the compiler build artifacts", + library_name + ) + }) { + Ok(build) => build, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + libraries_instances.insert( + library_name.clone(), + Instance::new( + library_name, + Some(library_address), + web3::types::U256::zero(), + ), + ); + } + + let case = match Case::try_from_ethereum( + &calls, + &main_contract_instance, + &libraries_instances, + &last_source, + ) { + Ok(case) => case, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + + let builds = compiler_output + .builds + .into_values() + .map(|build| (web3::types::Address::zero(), build)) + .collect(); + + Some(EVMTest::new( test_path, self.index_entity.group.clone(), mode, diff --git a/compiler_tester/src/directories/matter_labs/test/metadata/case/mod.rs b/compiler_tester/src/directories/matter_labs/test/metadata/case/mod.rs index fb86f128..62e531bd 100644 --- a/compiler_tester/src/directories/matter_labs/test/metadata/case/mod.rs +++ b/compiler_tester/src/directories/matter_labs/test/metadata/case/mod.rs @@ -11,7 +11,7 @@ use std::str::FromStr; use serde::Deserialize; use crate::compilers::mode::Mode; -use crate::deployers::address_predictor::AddressPredictor; +use crate::vm::AddressPredictorIterator; use self::input::expected::Expected; use self::input::Input; @@ -98,12 +98,15 @@ impl Case { /// /// Returns all the instances addresses, except libraries. /// - pub fn instances_addresses( + pub fn instance_addresses( &self, libraries: &BTreeSet, - address_predictor: &mut AddressPredictor, + address_predictor: &mut API, mode: &Mode, - ) -> anyhow::Result> { + ) -> anyhow::Result> + where + API: AddressPredictorIterator, + { let mut instances_addresses = HashMap::new(); for (index, input) in self.inputs.iter().enumerate() { if !input.method.eq("#deployer") { @@ -114,24 +117,17 @@ impl Case { continue; } let exception = match input.expected.as_ref() { - Some(expected) => expected.exception(mode).map_err(|error| { - anyhow::anyhow!("Input {}(After adding deployer calls): {}", index, error) - })?, + Some(expected) => expected + .exception(mode) + .map_err(|error| anyhow::anyhow!("Input #{}: {}", index, error))?, None => false, }; if exception { continue; } - let caller = - web3::types::Address::from_str(input.caller.as_str()).map_err(|error| { - anyhow::anyhow!( - "Input {}(After adding deployer calls): Invalid caller: {}", - index, - error - ) - })?; - instances_addresses - .insert(instance.to_string(), address_predictor.next_address(caller)); + let caller = web3::types::Address::from_str(input.caller.as_str()) + .map_err(|error| anyhow::anyhow!("Input #{}: invalid caller: {}", index, error))?; + instances_addresses.insert(instance.to_string(), address_predictor.next(&caller, true)); } Ok(instances_addresses) } diff --git a/compiler_tester/src/directories/matter_labs/test/mod.rs b/compiler_tester/src/directories/matter_labs/test/mod.rs index d90a841d..a79a9ebd 100644 --- a/compiler_tester/src/directories/matter_labs/test/mod.rs +++ b/compiler_tester/src/directories/matter_labs/test/mod.rs @@ -15,13 +15,16 @@ use std::sync::Mutex; use crate::compilers::mode::Mode; use crate::compilers::Compiler; -use crate::deployers::address_predictor::AddressPredictor; use crate::directories::Buildable; use crate::filters::Filters; use crate::summary::Summary; use crate::test::case::Case; +use crate::test::eravm::Test as EraVMTest; +use crate::test::evm::Test as EVMTest; use crate::test::instance::Instance; -use crate::test::Test; +use crate::vm::eravm::deployers::address_predictor::AddressPredictor as EraVMAddressPredictor; +use crate::vm::evm::address_predictor::AddressPredictor as EVMAddressPredictor; +use crate::vm::AddressPredictorIterator; use self::metadata::Metadata; @@ -164,14 +167,14 @@ impl MatterLabsTest { } impl Buildable for MatterLabsTest { - fn build( + fn build_for_eravm( &self, mode: Mode, compiler: Arc, summary: Arc>, filters: &Filters, - debug_config: Option, - ) -> Option { + debug_config: Option, + ) -> Option { let test_path = self.path.to_string_lossy().to_string(); if !filters.check_mode(&mode) { return None; @@ -189,7 +192,7 @@ impl Buildable for MatterLabsTest { let mut contracts = self.metadata.contracts.clone(); if contracts.is_empty() { - let contract_name = if compiler.has_many_contracts() { + let contract_name = if compiler.has_multiple_contracts() { format!("{}:{}", test_path, SIMPLE_TESTS_CONTRACT_NAME) } else { test_path.clone() @@ -197,7 +200,7 @@ impl Buildable for MatterLabsTest { contracts.insert(SIMPLE_TESTS_INSTANCE.to_owned(), contract_name); } - let mut address_predictor = AddressPredictor::new(); + let mut address_predictor = EraVMAddressPredictor::new(); let mut libraries_instances_names = Vec::new(); let mut libraries_for_compiler = BTreeMap::new(); @@ -209,9 +212,10 @@ impl Buildable for MatterLabsTest { file_path.push(file); let mut file_libraries = BTreeMap::new(); for (name, instance) in metadata_file_libraries.iter() { - let address = address_predictor.next_address( - web3::types::Address::from_str(DEFAULT_CALLER_ADDRESS) + let address = address_predictor.next( + &web3::types::Address::from_str(DEFAULT_CALLER_ADDRESS) .expect("Invalid default caller address constant"), + true, ); file_libraries.insert( name.to_owned(), @@ -223,8 +227,8 @@ impl Buildable for MatterLabsTest { libraries_for_compiler.insert(file_path.to_string_lossy().to_string(), file_libraries); } - let compiler_output = match compiler - .compile( + let vm_input = match compiler + .compile_for_eravm( test_path.clone(), self.sources.clone(), libraries_for_compiler, @@ -246,7 +250,7 @@ impl Buildable for MatterLabsTest { let mut instances = HashMap::new(); for (instance, path) in contracts.into_iter() { - let build = match compiler_output.builds.get(&path).ok_or_else(|| { + let build = match vm_input.builds.get(&path).ok_or_else(|| { anyhow::anyhow!("{} not found in the compiler build artifacts", path) }) { Ok(build) => build, @@ -281,7 +285,7 @@ impl Buildable for MatterLabsTest { let mut address_predictor = address_predictor.clone(); let instances_addresses = match case - .instances_addresses( + .instance_addresses( &libraries_instances_names.clone().into_iter().collect(), &mut address_predictor, &mode, @@ -311,7 +315,7 @@ impl Buildable for MatterLabsTest { &case, &mode, &instances, - &compiler_output.method_identifiers, + &vm_input.method_identifiers, ) .map_err(|error| anyhow::anyhow!("Case `{}` is invalid: {}", case.name, error)) { @@ -325,13 +329,190 @@ impl Buildable for MatterLabsTest { cases.push(case); } - let builds = compiler_output + let builds = vm_input .builds .into_values() .map(|build| (build.bytecode_hash, build.assembly)) .collect(); - Some(Test::new( + Some(EraVMTest::new( + test_path, + self.metadata.group.clone(), + mode, + builds, + cases, + )) + } + + fn build_for_evm( + &self, + mode: Mode, + compiler: Arc, + summary: Arc>, + filters: &Filters, + debug_config: Option, + ) -> Option { + let test_path = self.path.to_string_lossy().to_string(); + if !filters.check_mode(&mode) { + return None; + } + + if let Some(filters) = self.metadata.modes.as_ref() { + if !mode.check_extended_filters(filters.as_slice()) { + return None; + } + } + + if !mode.check_pragmas(&self.sources) { + return None; + } + + let mut contracts = self.metadata.contracts.clone(); + if contracts.is_empty() { + let contract_name = if compiler.has_multiple_contracts() { + format!("{}:{}", test_path, SIMPLE_TESTS_CONTRACT_NAME) + } else { + test_path.clone() + }; + contracts.insert(SIMPLE_TESTS_INSTANCE.to_owned(), contract_name); + } + + let mut address_predictor = EVMAddressPredictor::new(); + + let mut libraries_instances_names = Vec::new(); + let mut libraries_for_compiler = BTreeMap::new(); + let mut libraries_instances_addresses = HashMap::new(); + + for (file, metadata_file_libraries) in self.metadata.libraries.iter() { + let mut file_path = self.path.clone(); + file_path.pop(); + file_path.push(file); + let mut file_libraries = BTreeMap::new(); + for (name, instance) in metadata_file_libraries.iter() { + let address = address_predictor.next( + &web3::types::Address::from_str(DEFAULT_CALLER_ADDRESS) + .expect("Invalid default caller address constant"), + true, + ); + file_libraries.insert( + name.to_owned(), + format!("0x{}", crate::utils::address_as_string(&address)), + ); + libraries_instances_addresses.insert(instance.to_owned(), address); + libraries_instances_names.push(instance.to_owned()); + } + libraries_for_compiler.insert(file_path.to_string_lossy().to_string(), file_libraries); + } + + let mut vm_input = match compiler + .compile_for_evm( + test_path.clone(), + self.sources.clone(), + BTreeMap::new(), + &mode, + debug_config, + ) + .map_err(|error| anyhow::anyhow!("Failed to compile sources: {}", error)) + { + Ok(output) => output, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + + let instances_names = contracts.keys().cloned().collect::>(); + let mut instances = HashMap::new(); + + for (instance, path) in contracts.into_iter() { + let build = match vm_input.builds.get_mut(&path).ok_or_else(|| { + anyhow::anyhow!("{} not found in the compiler build artifacts", path) + }) { + Ok(build) => build, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + let address = libraries_instances_addresses.get(&instance).cloned(); + instances.insert( + instance, + Instance::new(path, address, web3::types::U256::zero()), + ); + } + + let mut cases = Vec::with_capacity(self.metadata.cases.len()); + for case in self.metadata.cases.iter() { + if let Some(filters) = case.modes.as_ref() { + if !mode.check_extended_filters(filters.as_slice()) { + continue; + } + } + + let mut case = case.clone(); + match case.normalize_deployer_calls(&instances_names, &libraries_instances_names) { + Ok(_) => {} + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + } + case.normalize_expected(); + + let mut address_predictor = address_predictor.clone(); + + let instances_addresses = match case + .instance_addresses( + &libraries_instances_names.clone().into_iter().collect(), + &mut address_predictor, + &mode, + ) + .map_err(|error| { + anyhow::anyhow!( + "Case `{}` is invalid: Failed to compute instances addresses: {}", + case.name, + error + ) + }) { + Ok(addresses) => addresses, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + let mut instances = instances.clone(); + for (instance, address) in instances_addresses { + let instance = instances + .get_mut(&instance) + .expect("Redundant instance from the instances_addresses case method"); + instance.address = Some(address); + } + + let case = match Case::try_from_matter_labs( + &case, + &mode, + &instances, + &vm_input.method_identifiers, + ) + .map_err(|error| anyhow::anyhow!("Case `{}` is invalid: {}", case.name, error)) + { + Ok(case) => case, + Err(error) => { + Summary::invalid(summary, Some(mode), test_path, error); + return None; + } + }; + + cases.push(case); + } + + let builds = vm_input + .builds + .into_values() + .map(|build| (web3::types::Address::zero(), build)) + .collect(); + + Some(EVMTest::new( test_path, self.metadata.group.clone(), mode, diff --git a/compiler_tester/src/directories/mod.rs b/compiler_tester/src/directories/mod.rs index f44e84be..66e5759e 100644 --- a/compiler_tester/src/directories/mod.rs +++ b/compiler_tester/src/directories/mod.rs @@ -13,23 +13,36 @@ use crate::compilers::mode::Mode; use crate::compilers::Compiler; use crate::filters::Filters; use crate::summary::Summary; -use crate::test::Test; +use crate::test::eravm::Test as EraVMTest; +use crate::test::evm::Test as EVMTest; /// /// The buildable compiler test trait. /// pub trait Buildable: Send + Sync + 'static { /// - /// Builds the test. + /// Builds the test for EraVM. /// - fn build( + fn build_for_eravm( &self, mode: Mode, compiler: Arc, summary: Arc>, filters: &Filters, - debug_config: Option, - ) -> Option; + debug_config: Option, + ) -> Option; + + /// + /// Builds the test for EVM. + /// + fn build_for_evm( + &self, + mode: Mode, + compiler: Arc, + summary: Arc>, + filters: &Filters, + debug_config: Option, + ) -> Option; } /// diff --git a/compiler_tester/src/filters.rs b/compiler_tester/src/filters.rs index 8f748d0e..73b2fbd8 100644 --- a/compiler_tester/src/filters.rs +++ b/compiler_tester/src/filters.rs @@ -1,5 +1,5 @@ //! -//! The compiler tests filters. +//! The compiler tester filters. //! use std::collections::HashSet; @@ -7,7 +7,7 @@ use std::collections::HashSet; use crate::compilers::mode::Mode; /// -/// The compiler tests filters. +/// The compiler tester filters. /// pub struct Filters { /// The path filters. diff --git a/compiler_tester/src/lib.rs b/compiler_tester/src/lib.rs index 5b4406ae..a80f364f 100644 --- a/compiler_tester/src/lib.rs +++ b/compiler_tester/src/lib.rs @@ -3,34 +3,30 @@ //! pub(crate) mod compilers; -pub(crate) mod deployers; pub(crate) mod directories; -pub(crate) mod eravm; pub(crate) mod filters; pub(crate) mod llvm_options; pub(crate) mod summary; pub(crate) mod test; pub(crate) mod utils; +pub(crate) mod vm; -pub use self::deployers::native_deployer::NativeDeployer; -pub use self::deployers::system_contract_deployer::SystemContractDeployer; pub use self::filters::Filters; pub use self::llvm_options::LLVMOptions; pub use self::summary::Summary; +pub use crate::vm::eravm::deployers::native_deployer::NativeDeployer as EraVMNativeDeployer; +pub use crate::vm::eravm::deployers::system_contract_deployer::SystemContractDeployer as EraVMSystemContractDeployer; +pub use crate::vm::eravm::EraVM; +pub use crate::vm::evm::EVM; use std::path::Path; -use std::path::PathBuf; use std::sync::Arc; use std::sync::Mutex; -use std::time::Duration; -use std::time::Instant; -use colored::Colorize; use itertools::Itertools; use rayon::iter::IntoParallelIterator; use rayon::iter::ParallelIterator; -use crate::compilers::downloader::Downloader as CompilerDownloader; use crate::compilers::eravm::EraVMCompiler; use crate::compilers::llvm::LLVMCompiler; use crate::compilers::mode::Mode; @@ -38,12 +34,11 @@ use crate::compilers::solidity::SolidityCompiler; use crate::compilers::vyper::VyperCompiler; use crate::compilers::yul::YulCompiler; use crate::compilers::Compiler; -use crate::deployers::Deployer; use crate::directories::ethereum::EthereumDirectory; use crate::directories::matter_labs::MatterLabsDirectory; use crate::directories::Buildable; use crate::directories::TestsDirectory; -use crate::eravm::EraVM; +use crate::vm::eravm::deployers::Deployer as EraVMDeployer; /// The debug directory path. pub const DEBUG_DIRECTORY: &str = "./debug/"; @@ -57,7 +52,7 @@ pub const TRACE_DIRECTORY: &str = "./trace/"; type Test = (Arc, Arc, Mode); /// -/// The compiler-tester. +/// The compiler tester. /// pub struct CompilerTester { /// The summary. @@ -65,9 +60,7 @@ pub struct CompilerTester { /// The filters. filters: Filters, /// The debug config. - debug_config: Option, - /// The initial EraVM. - initial_vm: Arc, + debug_config: Option, } impl CompilerTester { @@ -99,129 +92,63 @@ impl CompilerTester { /// /// A shortcut constructor. /// - #[allow(clippy::too_many_arguments)] pub fn new( summary: Arc>, filters: Filters, - - debug_config: Option, - - binary_download_config_paths: Vec, - system_contracts_download_config_path: PathBuf, - system_contracts_debug_config: Option, - system_contracts_path: Option, - system_contracts_save_path: Option, + debug_config: Option, ) -> anyhow::Result { - let mut http_client_builder = reqwest::blocking::ClientBuilder::new(); - http_client_builder = http_client_builder.connect_timeout(Duration::from_secs(60)); - http_client_builder = http_client_builder.pool_idle_timeout(Duration::from_secs(60)); - http_client_builder = http_client_builder.timeout(Duration::from_secs(60)); - let http_client = http_client_builder.build()?; - - let download_time_start = Instant::now(); - println!(" {} compiler binaries", "Downloading".bright_green().bold()); - let system_contracts_solc_downloader_config = CompilerDownloader::new(http_client.clone()) - .download(system_contracts_download_config_path.as_path())?; - for config_path in binary_download_config_paths.into_iter() { - CompilerDownloader::new(http_client.clone()).download(config_path.as_path())?; - } - println!( - " {} downloading compiler binaries in {}m{:02}s", - "Finished".bright_green().bold(), - download_time_start.elapsed().as_secs() / 60, - download_time_start.elapsed().as_secs() % 60, - ); - - let initial_vm = Arc::new(EraVM::initialize( - system_contracts_solc_downloader_config, - system_contracts_debug_config, - system_contracts_path, - system_contracts_save_path, - )?); - Ok(Self { summary, filters, - debug_config, - - initial_vm, }) } /// - /// Runs all the tests. + /// Runs all tests on EraVM. /// - pub fn run(self) -> anyhow::Result<()> + pub fn run_eravm(self, vm: EraVM) -> anyhow::Result<()> where - D: Deployer, + D: EraVMDeployer, { - let solidity_compiler = Arc::new(SolidityCompiler::new()); - let vyper_compiler = Arc::new(VyperCompiler::new()); - let yul_compiler = Arc::new(YulCompiler::new()); - let llvm_compiler = Arc::new(LLVMCompiler::new()); - let eravm_compiler = Arc::new(EraVMCompiler::new()); + let tests = self.all_tests()?; + let vm = Arc::new(vm); - let mut tests = Vec::new(); - tests.extend(self.directory::( - Self::SOLIDITY_SIMPLE, - compiler_common::EXTENSION_SOLIDITY, - solidity_compiler.clone(), - )?); - tests.extend(self.directory::( - Self::VYPER_SIMPLE, - compiler_common::EXTENSION_VYPER, - vyper_compiler.clone(), - )?); - tests.extend(self.directory::( - Self::YUL_SIMPLE, - compiler_common::EXTENSION_YUL, - yul_compiler, - )?); - tests.extend(self.directory::( - Self::LLVM_SIMPLE, - compiler_common::EXTENSION_LLVM_SOURCE, - llvm_compiler, - )?); - tests.extend(self.directory::( - Self::ERAVM_SIMPLE, - compiler_common::EXTENSION_ERAVM_ASSEMBLY, - eravm_compiler, - )?); + let _: Vec<()> = tests + .into_par_iter() + .map(|(test, compiler, mode)| { + if let Some(test) = test.build_for_eravm( + mode, + compiler, + self.summary.clone(), + &self.filters, + self.debug_config.clone(), + ) { + test.run::(self.summary.clone(), vm.clone()); + } + }) + .collect(); - tests.extend(self.directory::( - Self::SOLIDITY_COMPLEX, - compiler_common::EXTENSION_JSON, - solidity_compiler.clone(), - )?); - tests.extend(self.directory::( - Self::VYPER_COMPLEX, - compiler_common::EXTENSION_JSON, - vyper_compiler.clone(), - )?); + Ok(()) + } - tests.extend(self.directory::( - Self::SOLIDITY_ETHEREUM, - compiler_common::EXTENSION_SOLIDITY, - solidity_compiler, - )?); - tests.extend(self.directory::( - Self::VYPER_ETHEREUM, - compiler_common::EXTENSION_VYPER, - vyper_compiler, - )?); + /// + /// Runs all tests on EraVM. + /// + pub fn run_evm(self) -> anyhow::Result<()> { + let tests = self.all_tests()?; let _: Vec<()> = tests .into_par_iter() .map(|(test, compiler, mode)| { - if let Some(test) = test.build( + if let Some(test) = test.build_for_evm( mode, compiler, self.summary.clone(), &self.filters, self.debug_config.clone(), ) { - test.run::(self.summary.clone(), self.initial_vm.clone()); + test.run(self.summary.clone()); } }) .collect(); @@ -230,7 +157,7 @@ impl CompilerTester { } /// - /// Returns all test from the specified directory with the specified compiler. + /// Returns all tests from the specified directory for the specified compiler. /// fn directory( &self, @@ -256,4 +183,67 @@ impl CompilerTester { .map(|(test, mode)| (test, compiler.clone() as Arc, mode)) .collect()) } + + /// + /// Returns all tests from all directories. + /// + fn all_tests(&self) -> anyhow::Result> { + let solidity_compiler = Arc::new(SolidityCompiler::new()); + let vyper_compiler = Arc::new(VyperCompiler::new()); + let yul_compiler = Arc::new(YulCompiler); + let llvm_compiler = Arc::new(LLVMCompiler); + let eravm_compiler = Arc::new(EraVMCompiler); + + let mut tests = Vec::with_capacity(16384); + + tests.extend(self.directory::( + Self::SOLIDITY_SIMPLE, + era_compiler_common::EXTENSION_SOLIDITY, + solidity_compiler.clone(), + )?); + tests.extend(self.directory::( + Self::VYPER_SIMPLE, + era_compiler_common::EXTENSION_VYPER, + vyper_compiler.clone(), + )?); + tests.extend(self.directory::( + Self::YUL_SIMPLE, + era_compiler_common::EXTENSION_YUL, + yul_compiler, + )?); + tests.extend(self.directory::( + Self::LLVM_SIMPLE, + era_compiler_common::EXTENSION_LLVM_SOURCE, + llvm_compiler, + )?); + tests.extend(self.directory::( + Self::ERAVM_SIMPLE, + era_compiler_common::EXTENSION_ERAVM_ASSEMBLY, + eravm_compiler, + )?); + + tests.extend(self.directory::( + Self::SOLIDITY_COMPLEX, + era_compiler_common::EXTENSION_JSON, + solidity_compiler.clone(), + )?); + tests.extend(self.directory::( + Self::VYPER_COMPLEX, + era_compiler_common::EXTENSION_JSON, + vyper_compiler.clone(), + )?); + + tests.extend(self.directory::( + Self::SOLIDITY_ETHEREUM, + era_compiler_common::EXTENSION_SOLIDITY, + solidity_compiler, + )?); + tests.extend(self.directory::( + Self::VYPER_ETHEREUM, + era_compiler_common::EXTENSION_VYPER, + vyper_compiler, + )?); + + Ok(tests) + } } diff --git a/compiler_tester/src/summary/element/mod.rs b/compiler_tester/src/summary/element/mod.rs index e1ca5dd1..7389a9c1 100644 --- a/compiler_tester/src/summary/element/mod.rs +++ b/compiler_tester/src/summary/element/mod.rs @@ -63,10 +63,10 @@ impl Element { details.push(format!("size {size}").bright_white().to_string()) }; match variant { - PassedVariant::Deploy { cycles, ergs, .. } - | PassedVariant::Runtime { cycles, ergs } => { + PassedVariant::Deploy { cycles, gas, .. } + | PassedVariant::Runtime { cycles, gas } => { details.push(format!("cycles {cycles}").bright_white().to_string()); - details.push(format!("ergs {ergs}").bright_white().to_string()) + details.push(format!("gas {gas}").bright_white().to_string()) } _ => {} }; diff --git a/compiler_tester/src/summary/element/outcome/passed_variant.rs b/compiler_tester/src/summary/element/outcome/passed_variant.rs index 9663996f..fde33cae 100644 --- a/compiler_tester/src/summary/element/outcome/passed_variant.rs +++ b/compiler_tester/src/summary/element/outcome/passed_variant.rs @@ -13,15 +13,15 @@ pub enum PassedVariant { size: usize, /// The number of execution cycles. cycles: usize, - /// The number of used ergs. - ergs: u32, + /// The amount of gas used. + gas: u32, }, /// The contract call. Runtime { /// The number of execution cycles. cycles: usize, - /// The number of used ergs. - ergs: u32, + /// The amount of gas used. + gas: u32, }, /// The special function call. Special, diff --git a/compiler_tester/src/summary/mod.rs b/compiler_tester/src/summary/mod.rs index 3d8de15f..0c328c56 100644 --- a/compiler_tester/src/summary/mod.rs +++ b/compiler_tester/src/summary/mod.rs @@ -81,7 +81,7 @@ impl Summary { format!( "{} {}", benchmark_analyzer::BENCHMARK_ALL_GROUP_NAME, - compiler_llvm_context::OptimizerSettings::cycles(), + era_compiler_llvm_context::OptimizerSettings::cycles(), ), benchmark_analyzer::BenchmarkGroup::default(), ); @@ -89,21 +89,21 @@ impl Summary { format!( "{} {}", benchmark_analyzer::BENCHMARK_ALL_GROUP_NAME, - compiler_llvm_context::OptimizerSettings::size(), + era_compiler_llvm_context::OptimizerSettings::size(), ), benchmark_analyzer::BenchmarkGroup::default(), ); for element in self.elements.iter() { - let (size, cycles, ergs, group) = match &element.outcome { + let (size, cycles, gas, group) = match &element.outcome { Outcome::Passed { - variant: PassedVariant::Deploy { size, cycles, ergs }, + variant: PassedVariant::Deploy { size, cycles, gas }, group, - } => (Some(*size), *cycles, *ergs, group.clone()), + } => (Some(*size), *cycles, *gas, group.clone()), Outcome::Passed { - variant: PassedVariant::Runtime { cycles, ergs }, + variant: PassedVariant::Runtime { cycles, gas }, group, - } => (None, *cycles, *ergs, group.clone()), + } => (None, *cycles, *gas, group.clone()), _ => continue, }; @@ -120,9 +120,9 @@ impl Summary { .mode .as_ref() .and_then(|mode| mode.llvm_optimizer_settings().cloned()) - .unwrap_or(compiler_llvm_context::OptimizerSettings::none()); + .unwrap_or(era_compiler_llvm_context::OptimizerSettings::none()); - let benchmark_element = benchmark_analyzer::BenchmarkElement::new(size, cycles, ergs); + let benchmark_element = benchmark_analyzer::BenchmarkElement::new(size, cycles, gas); if let Some(group) = group { benchmark .groups @@ -205,9 +205,9 @@ impl Summary { group: Option, size: usize, cycles: usize, - ergs: u32, + gas: u32, ) { - let passed_variant = PassedVariant::Deploy { size, cycles, ergs }; + let passed_variant = PassedVariant::Deploy { size, cycles, gas }; Self::passed(summary, mode, name, group, passed_variant); } @@ -220,9 +220,9 @@ impl Summary { name: String, group: Option, cycles: usize, - ergs: u32, + gas: u32, ) { - let passed_variant = PassedVariant::Runtime { cycles, ergs }; + let passed_variant = PassedVariant::Runtime { cycles, gas }; Self::passed(summary, mode, name, group, passed_variant); } diff --git a/compiler_tester/src/test/case/input/balance.rs b/compiler_tester/src/test/case/input/balance.rs index b5b2d5e9..c13f87e2 100644 --- a/compiler_tester/src/test/case/input/balance.rs +++ b/compiler_tester/src/test/case/input/balance.rs @@ -6,7 +6,8 @@ use std::sync::Arc; use std::sync::Mutex; use crate::compilers::mode::Mode; -use crate::eravm::EraVM; +use crate::vm::eravm::EraVM; +use crate::vm::evm::EVM; use crate::Summary; /// @@ -31,9 +32,9 @@ impl Balance { impl Balance { /// - /// Run the balance check input. + /// Runs the balance check on EraVM. /// - pub fn run( + pub fn run_eravm( self, summary: Arc>, vm: &EraVM, @@ -57,4 +58,28 @@ impl Balance { ); } } + + /// + /// Runs the balance check on EVM. + /// + pub fn run_evm( + self, + summary: Arc>, + _vm: &EVM, + mode: Mode, + _test_group: Option, + name_prefix: String, + index: usize, + ) { + // TODO: get balance from EVM + let name = format!("{name_prefix}[#balance_check:{index}]"); + Summary::failed( + summary, + mode, + name, + self.balance.into(), + self.balance.into(), + self.address.to_fixed_bytes().to_vec(), + ); + } } diff --git a/compiler_tester/src/test/case/input/calldata.rs b/compiler_tester/src/test/case/input/calldata.rs index 1cc1dcbe..e6afda51 100644 --- a/compiler_tester/src/test/case/input/calldata.rs +++ b/compiler_tester/src/test/case/input/calldata.rs @@ -43,7 +43,7 @@ impl Calldata { Value::Certain(value) => value, Value::Any => anyhow::bail!("* not allowed in calldata"), }; - let mut bytes = [0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut bytes = [0u8; era_compiler_common::BYTE_LENGTH_FIELD]; value.to_big_endian(&mut bytes); calldata.extend(bytes); } diff --git a/compiler_tester/src/test/case/input/deploy.rs b/compiler_tester/src/test/case/input/deploy.rs index 63bb6d50..d003cdd8 100644 --- a/compiler_tester/src/test/case/input/deploy.rs +++ b/compiler_tester/src/test/case/input/deploy.rs @@ -6,8 +6,9 @@ use std::sync::Arc; use std::sync::Mutex; use crate::compilers::mode::Mode; -use crate::deployers::Deployer; -use crate::eravm::EraVM; +use crate::vm::eravm::deployers::Deployer as EraVMDeployer; +use crate::vm::eravm::EraVM; +use crate::vm::evm::EVM; use crate::Summary; use super::calldata::Calldata; @@ -62,9 +63,9 @@ impl Deploy { impl Deploy { /// - /// Run the deploy input. + /// Runs the deploy on EraVM. /// - pub fn run( + pub fn run_eravm( self, summary: Arc>, vm: &mut EraVM, @@ -73,9 +74,9 @@ impl Deploy { test_group: Option, name_prefix: String, ) where - D: Deployer, + D: EraVMDeployer, { - let name = format!("{}[#deployer:{}]", name_prefix, self.path,); + let name = format!("{}[#deployer:{}]", name_prefix, self.path); vm.populate_storage(self.storage.inner); let result = match deployer.deploy::( @@ -107,7 +108,7 @@ impl Deploy { test_group, build_size, result.cycles, - result.ergs, + result.gas, ); } else { Summary::failed( @@ -120,4 +121,44 @@ impl Deploy { ); } } + + /// + /// Runs the deploy on EVM. + /// + pub fn run_evm( + self, + summary: Arc>, + vm: &mut EVM, + mode: Mode, + test_group: Option, + name_prefix: String, + ) { + let name = format!("{}[#deployer:{}]", name_prefix, self.path); + + vm.populate_storage(self.storage.inner); + let result = match vm.execute_deploy_code( + name.clone(), + self.caller, + self.value, + self.calldata.inner.clone(), + ) { + Ok(execution_result) => execution_result, + Err(error) => { + Summary::invalid(summary, Some(mode), name, error); + return; + } + }; + if result.output == self.expected { + Summary::passed_runtime(summary, mode, name, test_group, result.cycles, result.gas); + } else { + Summary::failed( + summary, + mode, + name, + self.expected, + result.output, + self.calldata.inner, + ); + } + } } diff --git a/compiler_tester/src/test/case/input/mod.rs b/compiler_tester/src/test/case/input/mod.rs index 812bfbe8..b87b2c18 100644 --- a/compiler_tester/src/test/case/input/mod.rs +++ b/compiler_tester/src/test/case/input/mod.rs @@ -18,11 +18,12 @@ use std::sync::Arc; use std::sync::Mutex; use crate::compilers::mode::Mode; -use crate::deployers::Deployer; use crate::directories::matter_labs::test::metadata::case::input::Input as MatterLabsTestInput; -use crate::eravm::EraVM; use crate::summary::Summary; use crate::test::instance::Instance; +use crate::vm::eravm::deployers::Deployer as EraVMDeployer; +use crate::vm::eravm::EraVM; +use crate::vm::evm::EVM; use self::balance::Balance; use self::calldata::Calldata; @@ -144,7 +145,7 @@ impl Input { .ok_or_else(|| { anyhow::anyhow!("Selector of the method `{}` not found", entry) })?, - None => u32::from_str_radix(entry, compiler_common::BASE_HEXADECIMAL) + None => u32::from_str_radix(entry, era_compiler_common::BASE_HEXADECIMAL) .map_err(|err| anyhow::anyhow!("Invalid entry value: {}", err))?, }; @@ -296,10 +297,10 @@ impl Input { } /// - /// Run the input. + /// Runs the input on EraVM. /// #[allow(clippy::too_many_arguments)] - pub fn run( + pub fn run_eravm( self, summary: Arc>, vm: &mut EraVM, @@ -309,20 +310,46 @@ impl Input { name_prefix: String, index: usize, ) where - D: Deployer, + D: EraVMDeployer, { match self { Self::Runtime(runtime) => { - runtime.run::(summary, vm, mode, test_group, name_prefix, index) + runtime.run_eravm::(summary, vm, mode, test_group, name_prefix, index) } Self::Deploy(deploy) => { - deploy.run::<_, M>(summary, vm, mode, deployer, test_group, name_prefix) + deploy.run_eravm::<_, M>(summary, vm, mode, deployer, test_group, name_prefix) } Self::StorageEmpty(storage_empty) => { - storage_empty.run(summary, vm, mode, test_group, name_prefix, index) + storage_empty.run_eravm(summary, vm, mode, test_group, name_prefix, index) } Self::Balance(balance_check) => { - balance_check.run(summary, vm, mode, test_group, name_prefix, index) + balance_check.run_eravm(summary, vm, mode, test_group, name_prefix, index) + } + }; + } + + /// + /// Runs the input on EVM. + /// + pub fn run_evm( + self, + summary: Arc>, + vm: &mut EVM, + mode: Mode, + test_group: Option, + name_prefix: String, + index: usize, + ) { + match self { + Self::Runtime(runtime) => { + runtime.run_evm(summary, vm, mode, test_group, name_prefix, index) + } + Self::Deploy(deploy) => deploy.run_evm(summary, vm, mode, test_group, name_prefix), + Self::StorageEmpty(storage_empty) => { + storage_empty.run_evm(summary, vm, mode, test_group, name_prefix, index) + } + Self::Balance(balance_check) => { + balance_check.run_evm(summary, vm, mode, test_group, name_prefix, index) } }; } diff --git a/compiler_tester/src/test/case/input/output/event.rs b/compiler_tester/src/test/case/input/output/event.rs index 035f4a1c..33cb94c4 100644 --- a/compiler_tester/src/test/case/input/output/event.rs +++ b/compiler_tester/src/test/case/input/output/event.rs @@ -137,11 +137,14 @@ impl From<&zkevm_tester::runners::events::SolidityLikeEvent> for Event { let values: Vec = event .data - .chunks(compiler_common::BYTE_LENGTH_FIELD) + .chunks(era_compiler_common::BYTE_LENGTH_FIELD) .map(|word| { - let value = if word.len() != compiler_common::BYTE_LENGTH_FIELD { + let value = if word.len() != era_compiler_common::BYTE_LENGTH_FIELD { let mut word_padded = word.to_vec(); - word_padded.extend(vec![0u8; compiler_common::BYTE_LENGTH_FIELD - word.len()]); + word_padded.extend(vec![ + 0u8; + era_compiler_common::BYTE_LENGTH_FIELD - word.len() + ]); web3::types::U256::from_big_endian(word_padded.as_slice()) } else { web3::types::U256::from_big_endian(word) @@ -158,6 +161,39 @@ impl From<&zkevm_tester::runners::events::SolidityLikeEvent> for Event { } } +impl From for Event { + fn from(log: evm::Log) -> Self { + let address = log.address; + let topics = log + .topics + .into_iter() + .map(|topic| Value::Certain(crate::utils::h256_to_u256(&topic))) + .collect(); + let values: Vec = log + .data + .chunks(era_compiler_common::BYTE_LENGTH_FIELD) + .map(|word| { + let value = if word.len() != era_compiler_common::BYTE_LENGTH_FIELD { + let mut word_padded = word.to_vec(); + word_padded.extend(vec![ + 0u8; + era_compiler_common::BYTE_LENGTH_FIELD - word.len() + ]); + web3::types::U256::from_big_endian(word_padded.as_slice()) + } else { + web3::types::U256::from_big_endian(word) + }; + Value::Certain(value) + }) + .collect(); + Self { + address: None, + topics, + values, + } + } +} + impl PartialEq for Event { fn eq(&self, other: &Self) -> bool { if let (Some(address1), Some(address2)) = (self.address, other.address) { diff --git a/compiler_tester/src/test/case/input/output/mod.rs b/compiler_tester/src/test/case/input/output/mod.rs index 0f029941..c595c77e 100644 --- a/compiler_tester/src/test/case/input/output/mod.rs +++ b/compiler_tester/src/test/case/input/output/mod.rs @@ -14,6 +14,7 @@ use crate::directories::matter_labs::test::metadata::case::input::expected::vari use crate::directories::matter_labs::test::metadata::case::input::expected::Expected as MatterLabsTestExpected; use crate::test::case::input::value::Value; use crate::test::instance::Instance; +use crate::vm::evm::output::Output as EVMOutput; use self::event::Event; @@ -178,12 +179,15 @@ impl From<&zkevm_tester::runners::compiler_tests::VmSnapshot> for Output { match &snapshot.execution_result { zkevm_tester::runners::compiler_tests::VmExecutionResult::Ok(return_data) => { let return_data = return_data - .chunks(compiler_common::BYTE_LENGTH_FIELD) + .chunks(era_compiler_common::BYTE_LENGTH_FIELD) .map(|word| { - let value = if word.len() != compiler_common::BYTE_LENGTH_FIELD { + let value = if word.len() != era_compiler_common::BYTE_LENGTH_FIELD { let mut word_padded = word.to_vec(); - word_padded - .extend(vec![0u8; compiler_common::BYTE_LENGTH_FIELD - word.len()]); + word_padded.extend(vec![ + 0u8; + era_compiler_common::BYTE_LENGTH_FIELD + - word.len() + ]); web3::types::U256::from_big_endian(word_padded.as_slice()) } else { web3::types::U256::from_big_endian(word) @@ -199,12 +203,15 @@ impl From<&zkevm_tester::runners::compiler_tests::VmSnapshot> for Output { } zkevm_tester::runners::compiler_tests::VmExecutionResult::Revert(return_data) => { let return_data = return_data - .chunks(compiler_common::BYTE_LENGTH_FIELD) + .chunks(era_compiler_common::BYTE_LENGTH_FIELD) .map(|word| { - let value = if word.len() != compiler_common::BYTE_LENGTH_FIELD { + let value = if word.len() != era_compiler_common::BYTE_LENGTH_FIELD { let mut word_padded = word.to_vec(); - word_padded - .extend(vec![0u8; compiler_common::BYTE_LENGTH_FIELD - word.len()]); + word_padded.extend(vec![ + 0u8; + era_compiler_common::BYTE_LENGTH_FIELD + - word.len() + ]); web3::types::U256::from_big_endian(word_padded.as_slice()) } else { web3::types::U256::from_big_endian(word) @@ -234,6 +241,36 @@ impl From<&zkevm_tester::runners::compiler_tests::VmSnapshot> for Output { } } +impl From for Output { + fn from(output: EVMOutput) -> Self { + let return_data = output + .return_data + .chunks(era_compiler_common::BYTE_LENGTH_FIELD) + .map(|word| { + let value = if word.len() != era_compiler_common::BYTE_LENGTH_FIELD { + let mut word_padded = word.to_vec(); + word_padded.extend(vec![ + 0u8; + era_compiler_common::BYTE_LENGTH_FIELD - word.len() + ]); + web3::types::U256::from_big_endian(word_padded.as_slice()) + } else { + web3::types::U256::from_big_endian(word) + }; + Value::Certain(value) + }) + .collect(); + + let events = output.logs.into_iter().map(Event::from).collect(); + + Self { + return_data, + exception: output.exception, + events, + } + } +} + impl PartialEq for Output { fn eq(&self, other: &Self) -> bool { if self.exception != other.exception { diff --git a/compiler_tester/src/test/case/input/runtime.rs b/compiler_tester/src/test/case/input/runtime.rs index c0069c1e..91eca439 100644 --- a/compiler_tester/src/test/case/input/runtime.rs +++ b/compiler_tester/src/test/case/input/runtime.rs @@ -6,7 +6,8 @@ use std::sync::Arc; use std::sync::Mutex; use crate::compilers::mode::Mode; -use crate::eravm::EraVM; +use crate::vm::eravm::EraVM; +use crate::vm::evm::EVM; use crate::Summary; use super::calldata::Calldata; @@ -15,7 +16,6 @@ use super::storage::Storage; /// /// The contract call input variant. -/// #[derive(Debug, Clone)] pub struct Runtime { /// The input name. @@ -61,9 +61,9 @@ impl Runtime { impl Runtime { /// - /// Run the call input. + /// Runs the call on EraVM. /// - pub fn run( + pub fn run_eravm( self, summary: Arc>, vm: &mut EraVM, @@ -74,12 +74,13 @@ impl Runtime { ) { let name = format!("{}[{}:{}]", name_prefix, self.name, index); vm.populate_storage(self.storage.inner); - let result = match vm.contract_call::( + let result = match vm.execute::( name.clone(), self.address, self.caller, self.value, self.calldata.inner.clone(), + None, ) { Ok(result) => result, Err(error) => { @@ -88,7 +89,47 @@ impl Runtime { } }; if result.output == self.expected { - Summary::passed_runtime(summary, mode, name, test_group, result.cycles, result.ergs); + Summary::passed_runtime(summary, mode, name, test_group, result.cycles, result.gas); + } else { + Summary::failed( + summary, + mode, + name, + self.expected, + result.output, + self.calldata.inner, + ); + } + } + + /// + /// Runs the call on EVM. + /// + pub fn run_evm( + self, + summary: Arc>, + vm: &mut EVM, + mode: Mode, + test_group: Option, + name_prefix: String, + index: usize, + ) { + let name = format!("{}[{}:{}]", name_prefix, self.name, index); + vm.populate_storage(self.storage.inner); + let result = match vm.execute_runtime_code( + name.clone(), + self.caller, + self.value, + self.calldata.inner.clone(), + ) { + Ok(execution_result) => execution_result, + Err(error) => { + Summary::invalid(summary, Some(mode), name, error); + return; + } + }; + if result.output == self.expected { + Summary::passed_runtime(summary, mode, name, test_group, result.cycles, result.gas); } else { Summary::failed( summary, diff --git a/compiler_tester/src/test/case/input/storage.rs b/compiler_tester/src/test/case/input/storage.rs index 44460c4a..444c7c36 100644 --- a/compiler_tester/src/test/case/input/storage.rs +++ b/compiler_tester/src/test/case/input/storage.rs @@ -15,7 +15,7 @@ use crate::test::instance::Instance; #[derive(Debug, Clone, Default)] pub struct Storage { /// The inner storage hashmap data. - pub inner: HashMap, + pub inner: HashMap<(web3::types::Address, web3::types::U256), web3::types::H256>, } impl Storage { @@ -58,7 +58,6 @@ impl Storage { Value::Certain(value) => value, Value::Any => anyhow::bail!("Storage key can not be `*`"), }; - let key = zkevm_tester::runners::compiler_tests::StorageKey { address, key }; let value = match Value::try_from_matter_labs(value.as_str(), instances) .map_err(|error| anyhow::anyhow!("Invalid storage value: {}", error))? @@ -67,11 +66,11 @@ impl Storage { Value::Any => anyhow::bail!("Storage value can not be `*`"), }; - let mut value_bytes = [0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut value_bytes = [0u8; era_compiler_common::BYTE_LENGTH_FIELD]; value.to_big_endian(value_bytes.as_mut_slice()); let value = web3::types::H256::from(value_bytes); - result_storage.insert(key, value); + result_storage.insert((address, key), value); } } diff --git a/compiler_tester/src/test/case/input/storage_empty.rs b/compiler_tester/src/test/case/input/storage_empty.rs index 691e4b53..63f69dc1 100644 --- a/compiler_tester/src/test/case/input/storage_empty.rs +++ b/compiler_tester/src/test/case/input/storage_empty.rs @@ -6,7 +6,8 @@ use std::sync::Arc; use std::sync::Mutex; use crate::compilers::mode::Mode; -use crate::eravm::EraVM; +use crate::vm::eravm::EraVM; +use crate::vm::evm::EVM; use crate::Summary; /// @@ -29,9 +30,9 @@ impl StorageEmpty { impl StorageEmpty { /// - /// Run the storage empty check input. + /// Runs the storage empty check on EraVM. /// - pub fn run( + pub fn run_eravm( self, summary: Arc>, vm: &EraVM, @@ -55,4 +56,28 @@ impl StorageEmpty { ); } } + + /// + /// Runs the storage empty check on EVM. + /// + pub fn run_evm( + self, + summary: Arc>, + _vm: &EVM, + mode: Mode, + _test_group: Option, + name_prefix: String, + index: usize, + ) { + // TODO: check storage in EVM + let name = format!("{name_prefix}[#storage_empty_check:{index}]"); + Summary::failed( + summary, + mode, + name, + self.is_empty.into(), + self.is_empty.into(), + vec![], + ); + } } diff --git a/compiler_tester/src/test/case/mod.rs b/compiler_tester/src/test/case/mod.rs index 4b85a0f4..d545431e 100644 --- a/compiler_tester/src/test/case/mod.rs +++ b/compiler_tester/src/test/case/mod.rs @@ -10,11 +10,12 @@ use std::sync::Arc; use std::sync::Mutex; use crate::compilers::mode::Mode; -use crate::deployers::Deployer; use crate::directories::matter_labs::test::metadata::case::Case as MatterLabsTestCase; -use crate::eravm::EraVM; use crate::summary::Summary; use crate::test::instance::Instance; +use crate::vm::eravm::deployers::Deployer as EraVMDeployer; +use crate::vm::eravm::EraVM; +use crate::vm::evm::EVM; use self::input::Input; @@ -50,13 +51,7 @@ impl Case { for (index, input) in case.inputs.iter().enumerate() { let input = Input::try_from_matter_labs(input, mode, instances, method_identifiers) - .map_err(|error| { - anyhow::anyhow!( - "Input {}(After adding deployer calls) is invalid: {}", - index, - error - ) - })?; + .map_err(|error| anyhow::anyhow!("Input #{} is invalid: {}", index, error))?; inputs.push(input); } @@ -101,27 +96,26 @@ impl Case { } /// - /// Run the case. + /// Runs the case on EraVM. /// - pub fn run( + pub fn run_eravm( self, summary: Arc>, - initial_vm: EraVM, + mut vm: EraVM, mode: &Mode, test_name: String, test_group: Option, ) where - D: Deployer, + D: EraVMDeployer, { let name = if let Some(case_name) = self.name { format!("{test_name}::{case_name}") } else { test_name }; - let mut vm = initial_vm; let mut deployer = D::new(); for (index, input) in self.inputs.into_iter().enumerate() { - input.run::<_, M>( + input.run_eravm::<_, M>( summary.clone(), &mut vm, mode.clone(), @@ -132,4 +126,32 @@ impl Case { ) } } + + /// + /// Runs the case on EVM. + /// + pub fn run_evm( + self, + summary: Arc>, + mut vm: EVM, + mode: &Mode, + test_name: String, + test_group: Option, + ) { + let name = if let Some(case_name) = self.name { + format!("{test_name}::{case_name}") + } else { + test_name + }; + for (index, input) in self.inputs.into_iter().enumerate() { + input.run_evm( + summary.clone(), + &mut vm, + mode.clone(), + test_group.clone(), + name.clone(), + index, + ) + } + } } diff --git a/compiler_tester/src/test/eravm.rs b/compiler_tester/src/test/eravm.rs new file mode 100644 index 00000000..f9aa5878 --- /dev/null +++ b/compiler_tester/src/test/eravm.rs @@ -0,0 +1,69 @@ +//! +//! The EraVM test. +//! + +use std::collections::HashMap; +use std::sync::Arc; +use std::sync::Mutex; + +use crate::compilers::mode::Mode; +use crate::test::case::Case; +use crate::vm::eravm::deployers::Deployer as EraVMDeployer; +use crate::vm::eravm::EraVM; +use crate::Summary; + +/// +/// The test. +/// +pub struct Test { + /// The test name. + name: String, + /// The test group. + group: Option, + /// The test mode. + mode: Mode, + /// The contract builds. + builds: HashMap, + /// The test cases. + cases: Vec, +} + +impl Test { + /// + /// A shortcut constructor. + /// + pub fn new( + name: String, + group: Option, + mode: Mode, + builds: HashMap, + cases: Vec, + ) -> Self { + Self { + name, + group, + mode, + builds, + cases, + } + } + + /// + /// Runs the test. + /// + pub fn run(self, summary: Arc>, vm: Arc) + where + D: EraVMDeployer, + { + for case in self.cases { + let vm = EraVM::clone_with_contracts(vm.clone(), self.builds.clone()); + case.run_eravm::( + summary.clone(), + vm.clone(), + &self.mode, + self.name.clone(), + self.group.clone(), + ); + } + } +} diff --git a/compiler_tester/src/test/evm.rs b/compiler_tester/src/test/evm.rs new file mode 100644 index 00000000..229c82d4 --- /dev/null +++ b/compiler_tester/src/test/evm.rs @@ -0,0 +1,74 @@ +//! +//! The EVM test. +//! + +use std::collections::HashMap; +use std::sync::Arc; +use std::sync::Mutex; + +use crate::compilers::mode::Mode; +use crate::test::case::Case; +use crate::vm::evm::input::build::Build as EVMBuild; +use crate::vm::evm::invoker::Invoker as EVMInvoker; +use crate::vm::evm::runtime::Runtime as EVMRuntime; +use crate::vm::evm::EVM; +use crate::Summary; + +/// +/// The test. +/// +pub struct Test { + /// The test name. + name: String, + /// The test group. + group: Option, + /// The test mode. + mode: Mode, + /// The contract builds. + builds: HashMap, + /// The test cases. + cases: Vec, +} + +impl Test { + /// + /// A shortcut constructor. + /// + pub fn new( + name: String, + group: Option, + mode: Mode, + builds: HashMap, + cases: Vec, + ) -> Self { + Self { + name, + group, + mode, + builds, + cases, + } + } + + /// + /// Runs the test. + /// + pub fn run(self, summary: Arc>) { + for case in self.cases { + let config = evm::standard::Config::shanghai(); + let etable = + evm::Etable::::runtime( + ); + let resolver = evm::standard::EtableResolver::new(&config, &(), &etable); + let invoker = EVMInvoker::new(&config, &resolver); + + case.run_evm( + summary.clone(), + EVM::new(self.builds.clone(), invoker), + &self.mode, + self.name.clone(), + self.group.clone(), + ); + } + } +} diff --git a/compiler_tester/src/test/mod.rs b/compiler_tester/src/test/mod.rs index 1e6525dd..52f9fa8d 100644 --- a/compiler_tester/src/test/mod.rs +++ b/compiler_tester/src/test/mod.rs @@ -3,71 +3,6 @@ //! pub mod case; +pub mod eravm; +pub mod evm; pub mod instance; - -use std::collections::HashMap; -use std::sync::Arc; -use std::sync::Mutex; - -use crate::compilers::mode::Mode; -use crate::deployers::Deployer; -use crate::eravm::EraVM; -use crate::Summary; - -use self::case::Case; - -/// -/// The test. -/// -pub struct Test { - /// The test name. - name: String, - /// The test group. - group: Option, - /// The test mode. - mode: Mode, - /// The contract builds. - builds: HashMap, - /// The test cases. - cases: Vec, -} - -impl Test { - /// - /// A shortcut constructor. - /// - pub fn new( - name: String, - group: Option, - mode: Mode, - builds: HashMap, - cases: Vec, - ) -> Self { - Self { - name, - group, - mode, - builds, - cases, - } - } - - /// - /// Run the test. - /// - pub fn run(self, summary: Arc>, initial_vm: Arc) - where - D: Deployer, - { - for case in self.cases { - let vm = EraVM::clone_with_contracts(initial_vm.clone(), self.builds.clone()); - case.run::( - summary.clone(), - vm, - &self.mode, - self.name.clone(), - self.group.clone(), - ); - } - } -} diff --git a/compiler_tester/src/utils.rs b/compiler_tester/src/utils.rs index 44856777..d3df09bc 100644 --- a/compiler_tester/src/utils.rs +++ b/compiler_tester/src/utils.rs @@ -1,5 +1,5 @@ //! -//! The compiler-tester utils. +//! The compiler tester utils. //! /// @@ -13,7 +13,7 @@ pub fn address_as_string(value: &web3::types::Address) -> String { /// Overrides the default formatting for `U256`, which replaces the middle with an ellipsis. /// pub fn u256_as_string(value: &web3::types::U256) -> String { - let mut bytes = vec![0; compiler_common::BYTE_LENGTH_FIELD]; + let mut bytes = vec![0; era_compiler_common::BYTE_LENGTH_FIELD]; value.to_big_endian(&mut bytes); hex::encode(bytes) } @@ -22,10 +22,10 @@ pub fn u256_as_string(value: &web3::types::U256) -> String { /// Converts `[u8; 32]` into `Address`. /// pub fn bytes32_to_address( - bytes: &[u8; compiler_common::BYTE_LENGTH_FIELD], + bytes: &[u8; era_compiler_common::BYTE_LENGTH_FIELD], ) -> web3::types::Address { web3::types::Address::from_slice( - &bytes[bytes.len() - compiler_common::BYTE_LENGTH_ETH_ADDRESS..], + &bytes[bytes.len() - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS..], ) } @@ -33,10 +33,10 @@ pub fn bytes32_to_address( /// Converts `U256` into `Address`. /// pub fn u256_to_address(value: &web3::types::U256) -> web3::types::Address { - let mut bytes = vec![0; compiler_common::BYTE_LENGTH_FIELD]; + let mut bytes = vec![0; era_compiler_common::BYTE_LENGTH_FIELD]; value.to_big_endian(&mut bytes); web3::types::Address::from_slice( - &bytes[bytes.len() - compiler_common::BYTE_LENGTH_ETH_ADDRESS..], + &bytes[bytes.len() - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS..], ) } @@ -44,7 +44,14 @@ pub fn u256_to_address(value: &web3::types::U256) -> web3::types::Address { /// Converts `U256` into `H256`. /// pub fn u256_to_h256(value: &web3::types::U256) -> web3::types::H256 { - let mut bytes = vec![0; compiler_common::BYTE_LENGTH_FIELD]; + let mut bytes = vec![0; era_compiler_common::BYTE_LENGTH_FIELD]; value.to_big_endian(&mut bytes); web3::types::H256::from_slice(bytes.as_slice()) } + +/// +/// Converts `H256` into `U256`. +/// +pub fn h256_to_u256(value: &web3::types::H256) -> web3::types::U256 { + web3::types::U256::from_big_endian(value.as_bytes()) +} diff --git a/compiler_tester/src/vm/eravm/deployers/address_predictor.rs b/compiler_tester/src/vm/eravm/deployers/address_predictor.rs new file mode 100644 index 00000000..a60a3856 --- /dev/null +++ b/compiler_tester/src/vm/eravm/deployers/address_predictor.rs @@ -0,0 +1,73 @@ +//! +//! The EraVM deploy address predictor. +//! + +use std::collections::HashMap; +use std::str::FromStr; + +use crate::vm::AddressPredictorIterator; + +/// +/// The EraVM deploy address predictor. +/// +#[derive(Debug, Clone)] +pub struct AddressPredictor { + /// The accounts create nonces. + nonces: HashMap, +} + +impl AddressPredictor { + /// The create prefix, `keccak256("zksyncCreate")`. + const CREATE_PREFIX: &'static str = + "63bae3a9951d38e8a3fbb7b70909afc1200610fc5bc55ade242f815974674f23"; + + /// + /// Create new address predictor instance. + /// + pub fn new() -> Self { + Self { + nonces: HashMap::new(), + } + } + + /// + /// Increments caller nonce. + /// + pub fn increment_nonce(&mut self, caller: &web3::types::Address) { + let nonce = self.nonces.entry(*caller).or_insert(0); + *nonce += 1; + } +} + +impl AddressPredictorIterator for AddressPredictor { + fn next( + &mut self, + caller: &web3::types::Address, + increment_nonce: bool, + ) -> web3::types::Address { + let nonce = self.nonces.get(caller).cloned().unwrap_or_default(); + + let mut bytes = web3::types::H256::from_str(Self::CREATE_PREFIX) + .expect("Invalid constant create prefix") + .as_bytes() + .to_vec(); + bytes.extend( + [0; era_compiler_common::BYTE_LENGTH_FIELD + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS], + ); + bytes.extend(caller.to_fixed_bytes()); + bytes.extend([0; era_compiler_common::BYTE_LENGTH_FIELD - std::mem::size_of::()]); + bytes.extend(nonce.to_be_bytes()); + + let address = web3::types::Address::from_slice( + &web3::signing::keccak256(bytes.as_slice())[era_compiler_common::BYTE_LENGTH_FIELD + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS..], + ); + + if increment_nonce { + self.increment_nonce(caller); + } + + address + } +} diff --git a/compiler_tester/src/deployers/mod.rs b/compiler_tester/src/vm/eravm/deployers/mod.rs similarity index 88% rename from compiler_tester/src/deployers/mod.rs rename to compiler_tester/src/vm/eravm/deployers/mod.rs index f03ba557..fff4b8d1 100644 --- a/compiler_tester/src/deployers/mod.rs +++ b/compiler_tester/src/vm/eravm/deployers/mod.rs @@ -6,8 +6,8 @@ pub mod address_predictor; pub mod native_deployer; pub mod system_contract_deployer; -use crate::eravm::execution_result::ExecutionResult; -use crate::eravm::EraVM; +use crate::vm::eravm::EraVM; +use crate::vm::execution_result::ExecutionResult; /// /// The deployer trait. diff --git a/compiler_tester/src/deployers/native_deployer.rs b/compiler_tester/src/vm/eravm/deployers/native_deployer.rs similarity index 80% rename from compiler_tester/src/deployers/native_deployer.rs rename to compiler_tester/src/vm/eravm/deployers/native_deployer.rs index e0113728..18a1abe4 100644 --- a/compiler_tester/src/deployers/native_deployer.rs +++ b/compiler_tester/src/vm/eravm/deployers/native_deployer.rs @@ -1,21 +1,22 @@ //! -//! The native deployer implementation. +//! The EraVM native deployer implementation. //! use std::collections::HashMap; use web3::contract::tokens::Tokenizable; -use crate::eravm::execution_result::ExecutionResult; -use crate::eravm::EraVM; use crate::test::case::input::output::Output; use crate::test::case::input::value::Value; +use crate::vm::eravm::EraVM; +use crate::vm::execution_result::ExecutionResult; +use crate::vm::AddressPredictorIterator; use super::address_predictor::AddressPredictor; use super::Deployer; /// -/// The native deployer implementation. +/// The EraVM native deployer implementation. /// #[derive(Debug, Clone)] pub struct NativeDeployer { @@ -44,7 +45,7 @@ impl Deployer for NativeDeployer { value: Option, vm: &mut EraVM, ) -> anyhow::Result { - let address = self.address_predictor.advance_next_address(&caller); + let address = self.address_predictor.next(&caller, false); vm.add_deployed_contract(address, bytecode_hash, None); @@ -55,13 +56,13 @@ impl Deployer for NativeDeployer { 0 }; - let result = vm.run( + let result = vm.execute::( test_name, address, caller, - context_u128_value, + Some(context_u128_value), constructor_calldata, - zkevm_tester::runners::compiler_tests::VmLaunchOption::Constructor, + Some(zkevm_tester::runners::compiler_tests::VmLaunchOption::Constructor), )?; if result.output.exception { @@ -72,7 +73,7 @@ impl Deployer for NativeDeployer { return Ok(result); } - self.address_predictor.increment_nonce(caller); + self.address_predictor.increment_nonce(&caller); Self::set_immutables(address, &result.output.return_data, vm)?; @@ -83,7 +84,7 @@ impl Deployer for NativeDeployer { Ok(ExecutionResult::new( Output::new(return_data, false, result.output.events), result.cycles, - result.ergs, + result.gas, )) } } @@ -100,7 +101,7 @@ impl NativeDeployer { let return_data = encoded_data .iter() .flat_map(|value| { - let mut bytes = [0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut bytes = [0u8; era_compiler_common::BYTE_LENGTH_FIELD]; value.unwrap_certain_as_ref().to_big_endian(&mut bytes); bytes }) @@ -141,14 +142,12 @@ impl NativeDeployer { let immutable_position = Self::get_position_of_immutable(address, immutable_index); - let storage_key = zkevm_tester::runners::compiler_tests::StorageKey { - address: web3::types::Address::from_low_u64_be( - zkevm_opcode_defs::ADDRESS_IMMUTABLE_SIMULATOR.into(), - ), - key: immutable_position, - }; + let address = web3::types::Address::from_low_u64_be( + zkevm_opcode_defs::ADDRESS_IMMUTABLE_SIMULATOR.into(), + ); + let key = immutable_position; - immutables_storage.insert(storage_key, immutable_value); + immutables_storage.insert((address, key), immutable_value); } vm.populate_storage(immutables_storage); @@ -164,12 +163,12 @@ impl NativeDeployer { index: web3::types::U256, ) -> web3::types::U256 { let mut key = web3::types::H256::from(address).to_fixed_bytes().to_vec(); - key.extend([0u8; compiler_common::BYTE_LENGTH_FIELD]); + key.extend([0u8; era_compiler_common::BYTE_LENGTH_FIELD]); Self::IMMUTABLES_MAPPING_POSITION - .to_big_endian(&mut key[compiler_common::BYTE_LENGTH_FIELD..]); + .to_big_endian(&mut key[era_compiler_common::BYTE_LENGTH_FIELD..]); let key = web3::signing::keccak256(key.as_slice()).to_vec(); - let mut nested_key = vec![0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut nested_key = vec![0u8; era_compiler_common::BYTE_LENGTH_FIELD]; index.to_big_endian(&mut nested_key[..]); nested_key.extend(key); let nested_key = web3::signing::keccak256(nested_key.as_slice()); diff --git a/compiler_tester/src/deployers/system_contract_deployer.rs b/compiler_tester/src/vm/eravm/deployers/system_contract_deployer.rs similarity index 55% rename from compiler_tester/src/deployers/system_contract_deployer.rs rename to compiler_tester/src/vm/eravm/deployers/system_contract_deployer.rs index 0cc22f7d..9099a1b4 100644 --- a/compiler_tester/src/deployers/system_contract_deployer.rs +++ b/compiler_tester/src/vm/eravm/deployers/system_contract_deployer.rs @@ -1,14 +1,14 @@ //! -//! The system contract deployer implementation. +//! The EraVM system contract deployer implementation. //! -use crate::eravm::execution_result::ExecutionResult; -use crate::eravm::EraVM; +use crate::vm::eravm::EraVM; +use crate::vm::execution_result::ExecutionResult; use super::Deployer; /// -/// The system contract deployer implementation. +/// The EraVM system contract deployer implementation. /// #[derive(Debug, Clone)] pub struct SystemContractDeployer; @@ -32,15 +32,11 @@ impl Deployer for SystemContractDeployer { value: Option, vm: &mut EraVM, ) -> anyhow::Result { - let context_u128_value; - let vm_launch_option; let mut entry_address = web3::types::Address::from_low_u64_be( zkevm_opcode_defs::ADDRESS_CONTRACT_DEPLOYER.into(), ); - if M { - context_u128_value = 0; - + let (vm_launch_option, context_u128_value) = if M { let mut r3 = None; let mut r4 = None; let mut r5 = None; @@ -53,7 +49,7 @@ impl Deployer for SystemContractDeployer { zkevm_opcode_defs::ADDRESS_CONTRACT_DEPLOYER, )); r5 = Some(web3::types::U256::from(u8::from( - compiler_llvm_context::eravm_const::SYSTEM_CALL_BIT, + era_compiler_llvm_context::eravm_const::SYSTEM_CALL_BIT, ))); entry_address = web3::types::Address::from_low_u64_be( @@ -61,58 +57,61 @@ impl Deployer for SystemContractDeployer { ); } - vm_launch_option = zkevm_tester::runners::compiler_tests::VmLaunchOption::ManualCallABI( - zkevm_tester::runners::compiler_tests::FullABIParams { - is_constructor: false, - is_system_call: true, - r3_value: r3, - r4_value: r4, - r5_value: r5, - }, - ); + let vm_launch_option = + zkevm_tester::runners::compiler_tests::VmLaunchOption::ManualCallABI( + zkevm_tester::runners::compiler_tests::FullABIParams { + is_constructor: false, + is_system_call: true, + r3_value: r3, + r4_value: r4, + r5_value: r5, + }, + ); + (vm_launch_option, 0) } else { - if let Some(value) = value { - context_u128_value = value; + let context_u128_value = if let Some(value) = value { vm.mint_ether( web3::types::Address::from_low_u64_be( zkevm_opcode_defs::ADDRESS_CONTRACT_DEPLOYER.into(), ), web3::types::U256::from(value), ); + value } else { - context_u128_value = 0; - } - - vm_launch_option = zkevm_tester::runners::compiler_tests::VmLaunchOption::ManualCallABI( - zkevm_tester::runners::compiler_tests::FullABIParams { - is_constructor: false, - is_system_call: true, - r3_value: None, - r4_value: None, - r5_value: None, - }, - ); - } + 0 + }; + let vm_launch_option = + zkevm_tester::runners::compiler_tests::VmLaunchOption::ManualCallABI( + zkevm_tester::runners::compiler_tests::FullABIParams { + is_constructor: false, + is_system_call: true, + r3_value: None, + r4_value: None, + r5_value: None, + }, + ); + (vm_launch_option, context_u128_value) + }; let mut calldata = Vec::with_capacity( - constructor_calldata.len() + compiler_common::BYTE_LENGTH_FIELD * 4 + 4, + constructor_calldata.len() + era_compiler_common::BYTE_LENGTH_FIELD * 4 + 4, ); calldata.extend(Self::CREATE_METHOD_SELECTOR.to_be_bytes().to_vec()); - calldata.extend([0u8; 2 * compiler_common::BYTE_LENGTH_FIELD]); - bytecode_hash.to_big_endian(&mut calldata[compiler_common::BYTE_LENGTH_FIELD + 4..]); + calldata.extend([0u8; 2 * era_compiler_common::BYTE_LENGTH_FIELD]); + bytecode_hash.to_big_endian(&mut calldata[era_compiler_common::BYTE_LENGTH_FIELD + 4..]); calldata.extend(web3::types::H256::from_low_u64_be(96).as_bytes()); calldata.extend( web3::types::H256::from_low_u64_be(constructor_calldata.len() as u64).as_bytes(), ); calldata.extend(constructor_calldata); - vm.run( + vm.execute::( test_name, entry_address, caller, - context_u128_value, + Some(context_u128_value), calldata, - vm_launch_option, + Some(vm_launch_option), ) } } diff --git a/compiler_tester/src/compilers/output/build.rs b/compiler_tester/src/vm/eravm/input/build.rs similarity index 94% rename from compiler_tester/src/compilers/output/build.rs rename to compiler_tester/src/vm/eravm/input/build.rs index b82ea244..d0497835 100644 --- a/compiler_tester/src/compilers/output/build.rs +++ b/compiler_tester/src/vm/eravm/input/build.rs @@ -23,7 +23,7 @@ impl Build { /// A shortcut constructor. /// pub fn new(assembly: zkevm_assembly::Assembly) -> anyhow::Result { - let bytecode: Vec<[u8; compiler_common::BYTE_LENGTH_FIELD]> = assembly + let bytecode: Vec<[u8; era_compiler_common::BYTE_LENGTH_FIELD]> = assembly .clone() .compile_to_bytecode() .map_err(|error| anyhow::anyhow!("Compiling to bytecode error: {}", error))?; @@ -67,7 +67,7 @@ struct BuildHelper { /// The contract assembly string. assembly: String, /// The contract metadata hash. - metadata_hash: Option<[u8; compiler_common::BYTE_LENGTH_FIELD]>, + metadata_hash: Option<[u8; era_compiler_common::BYTE_LENGTH_FIELD]>, } impl Serialize for Build { diff --git a/compiler_tester/src/compilers/output/mod.rs b/compiler_tester/src/vm/eravm/input/mod.rs similarity index 88% rename from compiler_tester/src/compilers/output/mod.rs rename to compiler_tester/src/vm/eravm/input/mod.rs index f7c05b3d..d58d5a6b 100644 --- a/compiler_tester/src/compilers/output/mod.rs +++ b/compiler_tester/src/vm/eravm/input/mod.rs @@ -1,5 +1,5 @@ //! -//! The compiler output. +//! The EraVM compiler input. //! pub mod build; @@ -10,10 +10,10 @@ use std::collections::HashMap; use self::build::Build; /// -/// The compiler output. +/// The EraVM compiler input. /// #[derive(Debug, Clone)] -pub struct Output { +pub struct Input { /// The contract builds. pub builds: HashMap, /// The contracts method identifiers. @@ -22,7 +22,7 @@ pub struct Output { pub last_contract: String, } -impl Output { +impl Input { /// /// A shortcut constructor. /// diff --git a/compiler_tester/src/eravm/mod.rs b/compiler_tester/src/vm/eravm/mod.rs similarity index 63% rename from compiler_tester/src/eravm/mod.rs rename to compiler_tester/src/vm/eravm/mod.rs index 177624c4..d27b65ac 100644 --- a/compiler_tester/src/eravm/mod.rs +++ b/compiler_tester/src/vm/eravm/mod.rs @@ -2,7 +2,8 @@ //! The EraVM wrapper. //! -pub mod execution_result; +pub mod deployers; +pub mod input; pub mod system_context; pub mod system_contracts; @@ -10,10 +11,14 @@ use std::collections::HashMap; use std::path::PathBuf; use std::str::FromStr; use std::sync::Arc; +use std::time::Duration; +use std::time::Instant; -use crate::compilers::downloader::config::Config as DownloaderConfig; +use colored::Colorize; + +use crate::compilers::downloader::Downloader as CompilerDownloader; +use crate::vm::execution_result::ExecutionResult; -use self::execution_result::ExecutionResult; use self::system_context::SystemContext; use self::system_contracts::SystemContracts; @@ -35,14 +40,35 @@ pub struct EraVM { impl EraVM { /// - /// Creates and initializes new EraVM instance. + /// Creates and initializes a new EraVM instance. /// - pub fn initialize( - system_contracts_solc_downloader_config: DownloaderConfig, - system_contracts_debug_config: Option, - system_contracts_path: Option, + pub fn new( + binary_download_config_paths: Vec, + system_contracts_solc_downloader_config_path: PathBuf, + system_contracts_debug_config: Option, + system_contracts_load_path: Option, system_contracts_save_path: Option, ) -> anyhow::Result { + let mut http_client_builder = reqwest::blocking::ClientBuilder::new(); + http_client_builder = http_client_builder.connect_timeout(Duration::from_secs(60)); + http_client_builder = http_client_builder.pool_idle_timeout(Duration::from_secs(60)); + http_client_builder = http_client_builder.timeout(Duration::from_secs(60)); + let http_client = http_client_builder.build()?; + + let download_time_start = Instant::now(); + println!(" {} compiler binaries", "Downloading".bright_green().bold()); + let system_contracts_solc_downloader_config = CompilerDownloader::new(http_client.clone()) + .download(system_contracts_solc_downloader_config_path.as_path())?; + for config_path in binary_download_config_paths.into_iter() { + CompilerDownloader::new(http_client.clone()).download(config_path.as_path())?; + } + println!( + " {} downloading compiler binaries in {}m{:02}s", + "Finished".bright_green().bold(), + download_time_start.elapsed().as_secs() / 60, + download_time_start.elapsed().as_secs() % 60, + ); + let solc_version = system_contracts_solc_downloader_config .binaries .keys() @@ -57,7 +83,7 @@ impl EraVM { let system_contracts = SystemContracts::load_or_build( solc_version, system_contracts_debug_config, - system_contracts_path, + system_contracts_load_path, system_contracts_save_path, )?; @@ -76,13 +102,13 @@ impl EraVM { ); vm.add_known_contract( zkevm_assembly::Assembly::from_string( - compiler_vyper::FORWARDER_CONTRACT_ASSEMBLY.to_owned(), + era_compiler_vyper::FORWARDER_CONTRACT_ASSEMBLY.to_owned(), None, ) .expect("Always valid"), web3::types::U256::from_str_radix( - compiler_vyper::FORWARDER_CONTRACT_HASH.as_str(), - compiler_common::BASE_HEXADECIMAL, + era_compiler_vyper::FORWARDER_CONTRACT_HASH.as_str(), + era_compiler_common::BASE_HEXADECIMAL, ) .expect("Always valid"), ); @@ -95,9 +121,9 @@ impl EraVM { } /// - /// Clones the vm instance from arc and adds known contracts. + /// Clones the VM instance from and adds known contracts for a single test run. /// - /// TODO: check if can be made copyless + /// TODO: make copyless when VM supports it. /// pub fn clone_with_contracts( vm: Arc, @@ -111,80 +137,63 @@ impl EraVM { } /// - /// Runs a contract call transaction. + /// Runs a test transaction. /// - pub fn contract_call( + pub fn execute( &mut self, test_name: String, - entry_address: web3::types::Address, + mut entry_address: web3::types::Address, caller: web3::types::Address, value: Option, calldata: Vec, + vm_launch_option: Option, ) -> anyhow::Result { - let context_u128_value; - let mut entry_address = entry_address; - let vm_launch_option; - - if M { - context_u128_value = 0; - if let Some(value) = value { - self.mint_ether(caller, web3::types::U256::from(value)); - - let r3 = Some(web3::types::U256::from(value)); - let r4 = Some(web3::types::U256::from_big_endian(entry_address.as_bytes())); - let r5 = Some(web3::types::U256::from(u8::from( - compiler_llvm_context::eravm_const::SYSTEM_CALL_BIT, - ))); - - entry_address = web3::types::Address::from_low_u64_be( - zkevm_opcode_defs::ADDRESS_MSG_VALUE.into(), - ); - - vm_launch_option = - zkevm_tester::runners::compiler_tests::VmLaunchOption::ManualCallABI( - zkevm_tester::runners::compiler_tests::FullABIParams { - is_constructor: false, - is_system_call: true, - r3_value: r3, - r4_value: r4, - r5_value: r5, - }, - ); + let (vm_launch_option, context_u128_value) = + if let Some(vm_launch_option) = vm_launch_option { + (vm_launch_option, value) + } else if M { + match value { + Some(value) => { + self.mint_ether(caller, web3::types::U256::from(value)); + + let r3 = Some(web3::types::U256::from(value)); + let r4 = Some(web3::types::U256::from_big_endian(entry_address.as_bytes())); + let r5 = Some(web3::types::U256::from(u8::from( + era_compiler_llvm_context::eravm_const::SYSTEM_CALL_BIT, + ))); + + entry_address = web3::types::Address::from_low_u64_be( + zkevm_opcode_defs::ADDRESS_MSG_VALUE.into(), + ); + + let vm_launch_option = + zkevm_tester::runners::compiler_tests::VmLaunchOption::ManualCallABI( + zkevm_tester::runners::compiler_tests::FullABIParams { + is_constructor: false, + is_system_call: true, + r3_value: r3, + r4_value: r4, + r5_value: r5, + }, + ); + (vm_launch_option, None) + } + None => ( + zkevm_tester::runners::compiler_tests::VmLaunchOption::Call, + None, + ), + } } else { - vm_launch_option = zkevm_tester::runners::compiler_tests::VmLaunchOption::Call; - } - } else { - vm_launch_option = zkevm_tester::runners::compiler_tests::VmLaunchOption::Call; - if let Some(value) = value { - self.mint_ether(entry_address, web3::types::U256::from(value)); - context_u128_value = value; - } else { - context_u128_value = 0; - } - } + if let Some(value) = value { + self.mint_ether(entry_address, web3::types::U256::from(value)); + } - self.run( - test_name, - entry_address, - caller, - context_u128_value, - calldata, - vm_launch_option, - ) - } + ( + zkevm_tester::runners::compiler_tests::VmLaunchOption::Call, + value, + ) + }; - /// - /// Runs the several contracts on the VM with the specified data and returns the result. - /// - pub fn run( - &mut self, - test_name: String, - entry_address: web3::types::Address, - caller: web3::types::Address, - u128_value: u128, - calldata: Vec, - vm_launch_option: zkevm_tester::runners::compiler_tests::VmLaunchOption, - ) -> anyhow::Result { let mut trace_file_path = PathBuf::from_str("./trace/").expect("Always valid"); let trace_file_name = regex::Regex::new("[^A-Za-z0-9]+") .expect("Always valid") @@ -195,27 +204,23 @@ impl EraVM { let context = zkevm_tester::runners::compiler_tests::VmExecutionContext::new( entry_address, caller, - u128_value, + context_u128_value.unwrap_or_default(), 0, ); - let snapshot = tokio::runtime::Runtime::new() - .expect("Tokio error") - .block_on( - zkevm_tester::runners::compiler_tests::run_vm_multi_contracts( - trace_file_path.to_string_lossy().to_string(), - self.deployed_contracts.clone(), - calldata, - self.storage.clone(), - entry_address, - Some(context), - vm_launch_option, - ::MAX, - self.known_contracts.clone(), - self.default_aa_code_hash, - ), - ) - .map_err(|error| anyhow::anyhow!("Internal error: failed to run vm: {}", error))?; + let snapshot = zkevm_tester::runners::compiler_tests::run_vm_multi_contracts( + trace_file_path.to_string_lossy().to_string(), + self.deployed_contracts.clone(), + calldata.as_slice(), + self.storage.clone(), + entry_address, + Some(context), + vm_launch_option, + ::MAX, + self.known_contracts.clone(), + self.default_aa_code_hash, + ) + .map_err(|error| anyhow::anyhow!("Internal error: failed to run vm: {}", error))?; let result = ExecutionResult::from(&snapshot); self.storage = snapshot.storage; @@ -255,7 +260,7 @@ impl EraVM { } /// - /// Mints some Ether value for the specified caller. + /// Mints some Ether value at the specified address. /// Is needed for payable calls simulation. /// pub fn mint_ether(&mut self, address: web3::types::Address, amount: web3::types::U256) { @@ -273,7 +278,7 @@ impl EraVM { } /// - /// Burns some Ether value for the specified caller. + /// Burns some Ether value for at specified address. /// pub fn burn_ether(&mut self, address: web3::types::Address, amount: web3::types::U256) { let key = Self::balance_storage_key(address); @@ -361,9 +366,15 @@ impl EraVM { /// pub fn populate_storage( &mut self, - values: HashMap, + values: HashMap<(web3::types::Address, web3::types::U256), web3::types::H256>, ) { - self.storage.extend(values); + self.storage.extend(values.into_iter().map( + |((address, key), value)| (zkevm_tester::runners::compiler_tests::StorageKey { + address, + key, + }, + value), + ).collect::>()); } /// @@ -376,7 +387,7 @@ impl EraVM { .cloned() .expect("Always exists"); Ok(assembly - .compile_to_bytecode_for_mode::<16, zkevm_opcode_defs::decoding::encoding_mode_testing::EncodingModeTesting>()?.into_iter().flatten().count()) + .compile_to_bytecode_for_mode::<16, zkevm_assembly::zkevm_opcode_defs::decoding::encoding_mode_testing::EncodingModeTesting>()?.into_iter().flatten().count()) } /// @@ -385,16 +396,16 @@ impl EraVM { fn balance_storage_key( address: web3::types::Address, ) -> zkevm_tester::runners::compiler_tests::StorageKey { - let mut key_preimage = Vec::with_capacity(compiler_common::BYTE_LENGTH_FIELD * 2); + let mut key_preimage = Vec::with_capacity(era_compiler_common::BYTE_LENGTH_FIELD * 2); key_preimage.extend(vec![ 0u8; - compiler_common::BYTE_LENGTH_FIELD - - compiler_common::BYTE_LENGTH_ETH_ADDRESS + era_compiler_common::BYTE_LENGTH_FIELD + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS ]); key_preimage.extend_from_slice(address.as_bytes()); - key_preimage.extend(vec![0u8; compiler_common::BYTE_LENGTH_FIELD]); + key_preimage.extend(vec![0u8; era_compiler_common::BYTE_LENGTH_FIELD]); - let key_string = compiler_llvm_context::eravm_utils::keccak256(key_preimage.as_slice()); + let key_string = era_compiler_llvm_context::eravm_utils::keccak256(key_preimage.as_slice()); let key = web3::types::U256::from_str(key_string.as_str()).expect("Always valid"); zkevm_tester::runners::compiler_tests::StorageKey { address: web3::types::Address::from_low_u64_be( diff --git a/compiler_tester/src/eravm/system_context.rs b/compiler_tester/src/vm/eravm/system_context.rs similarity index 97% rename from compiler_tester/src/eravm/system_context.rs rename to compiler_tester/src/vm/eravm/system_context.rs index 18b90b9a..f867195b 100644 --- a/compiler_tester/src/eravm/system_context.rs +++ b/compiler_tester/src/vm/eravm/system_context.rs @@ -1,5 +1,5 @@ //! -//! The system context. +//! The EraVM system context. //! use std::collections::HashMap; @@ -7,7 +7,7 @@ use std::ops::Add; use std::str::FromStr; /// -/// The system context. +/// The EraVM system context. /// pub struct SystemContext; @@ -139,7 +139,7 @@ impl SystemContext { let mut hash = web3::types::U256::from_str(Self::ZERO_BLOCK_HASH) .expect("Invalid zero block hash const"); hash = hash.add(web3::types::U256::from(index)); - let mut hash_bytes = [0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut hash_bytes = [0u8; era_compiler_common::BYTE_LENGTH_FIELD]; hash.to_big_endian(&mut hash_bytes); system_context_values.push(( diff --git a/compiler_tester/src/eravm/system_contracts.rs b/compiler_tester/src/vm/eravm/system_contracts.rs similarity index 75% rename from compiler_tester/src/eravm/system_contracts.rs rename to compiler_tester/src/vm/eravm/system_contracts.rs index 4c8418b5..dd20f22a 100644 --- a/compiler_tester/src/eravm/system_contracts.rs +++ b/compiler_tester/src/vm/eravm/system_contracts.rs @@ -1,5 +1,5 @@ //! -//! The system contracts. +//! The EraVM system contracts. //! use std::collections::BTreeMap; @@ -16,88 +16,101 @@ use serde::Serialize; use crate::compilers::mode::solidity::Mode as SolidityMode; use crate::compilers::mode::yul::Mode as YulMode; use crate::compilers::mode::Mode; -use crate::compilers::output::build::Build as EraVMContractBuild; use crate::compilers::solidity::SolidityCompiler; use crate::compilers::yul::YulCompiler; use crate::compilers::Compiler; +use crate::vm::eravm::input::build::Build as EraVMBuild; /// -/// The system contracts. +/// The EraVM system contracts. /// #[derive(Serialize, Deserialize)] pub struct SystemContracts { /// The deployed system contracts builds. - pub deployed_contracts: Vec<(web3::types::Address, EraVMContractBuild)>, + pub deployed_contracts: Vec<(web3::types::Address, EraVMBuild)>, /// The default account abstraction contract build. - pub default_aa: EraVMContractBuild, + pub default_aa: EraVMBuild, } impl SystemContracts { /// The empty contract implementation path. const PATH_EMPTY_CONTRACT: &'static str = - "system-contracts/contracts/EmptyContract.sol:EmptyContract"; + "era-contracts/system-contracts/contracts/EmptyContract.sol:EmptyContract"; /// The `keccak256` system contract implementation path. - const PATH_KECCAK256: &'static str = "system-contracts/contracts/precompiles/Keccak256.yul"; + const PATH_KECCAK256: &'static str = + "era-contracts/system-contracts/contracts/precompiles/Keccak256.yul"; /// The `ecrecover` system contract implementation path. - const PATH_ECRECOVER: &'static str = "system-contracts/contracts/precompiles/Ecrecover.yul"; + const PATH_ECRECOVER: &'static str = + "era-contracts/system-contracts/contracts/precompiles/Ecrecover.yul"; /// The `sha256` system contract implementation path. - const PATH_SHA256: &'static str = "system-contracts/contracts/precompiles/SHA256.yul"; + const PATH_SHA256: &'static str = + "era-contracts/system-contracts/contracts/precompiles/SHA256.yul"; + + /// The `ecadd` system contract implementation path. + const PATH_ECADD: &'static str = + "era-contracts/system-contracts/contracts/precompiles/EcAdd.yul"; + + /// The `ecmul` system contract implementation path. + const PATH_ECMUL: &'static str = + "era-contracts/system-contracts/contracts/precompiles/EcMul.yul"; /// The account code storage system contract implementation path. const PATH_ACCOUNT_CODE_STORAGE: &'static str = - "system-contracts/contracts/AccountCodeStorage.sol:AccountCodeStorage"; + "era-contracts/system-contracts/contracts/AccountCodeStorage.sol:AccountCodeStorage"; /// The contract deployer system contract implementation path. const PATH_CONTRACT_DEPLOYER: &'static str = - "system-contracts/contracts/ContractDeployer.sol:ContractDeployer"; + "era-contracts/system-contracts/contracts/ContractDeployer.sol:ContractDeployer"; /// The nonce holder system contract implementation path. const PATH_NONCE_HOLDER: &'static str = - "system-contracts/contracts/NonceHolder.sol:NonceHolder"; + "era-contracts/system-contracts/contracts/NonceHolder.sol:NonceHolder"; /// The knows codes storage system contract implementation path. const PATH_KNOWN_CODES_STORAGE: &'static str = - "system-contracts/contracts/KnownCodesStorage.sol:KnownCodesStorage"; + "era-contracts/system-contracts/contracts/KnownCodesStorage.sol:KnownCodesStorage"; /// The immutable simulator system contract implementation path. const PATH_IMMUTABLE_SIMULATOR: &'static str = - "system-contracts/contracts/ImmutableSimulator.sol:ImmutableSimulator"; + "era-contracts/system-contracts/contracts/ImmutableSimulator.sol:ImmutableSimulator"; /// The L1-messenger system contract implementation path. const PATH_L1_MESSENGER: &'static str = - "system-contracts/contracts/L1Messenger.sol:L1Messenger"; + "era-contracts/system-contracts/contracts/L1Messenger.sol:L1Messenger"; /// The `msg.value` simulator system contract implementation path. const PATH_MSG_VALUE_SIMULATOR: &'static str = - "system-contracts/contracts/MsgValueSimulator.sol:MsgValueSimulator"; + "era-contracts/system-contracts/contracts/MsgValueSimulator.sol:MsgValueSimulator"; /// The system context system contract implementation path. const PATH_SYSTEM_CONTEXT: &'static str = - "system-contracts/contracts/SystemContext.sol:SystemContext"; + "era-contracts/system-contracts/contracts/SystemContext.sol:SystemContext"; /// The event writer system contract implementation path. - const PATH_EVENT_WRITER: &'static str = "system-contracts/contracts/EventWriter.yul"; + const PATH_EVENT_WRITER: &'static str = + "era-contracts/system-contracts/contracts/EventWriter.yul"; /// The ETH token system contract implementation path. - const PATH_ETH_TOKEN: &'static str = "system-contracts/contracts/L2EthToken.sol:L2EthToken"; + const PATH_ETH_TOKEN: &'static str = + "era-contracts/system-contracts/contracts/L2EthToken.sol:L2EthToken"; /// The default account abstraction contract implementation path. const PATH_DEFAULT_AA: &'static str = - "system-contracts/contracts/DefaultAccount.sol:DefaultAccount"; + "era-contracts/system-contracts/contracts/DefaultAccount.sol:DefaultAccount"; /// /// Load or build the system contracts. /// pub fn load_or_build( solc_version: semver::Version, - system_contracts_debug_config: Option, - system_contracts_path: Option, + system_contracts_debug_config: Option, + system_contracts_load_path: Option, system_contracts_save_path: Option, ) -> anyhow::Result { - let system_contracts = if let Some(system_contracts_path) = system_contracts_path { + let system_contracts = if let Some(system_contracts_path) = system_contracts_load_path { Self::load(system_contracts_path) .map_err(|error| anyhow::anyhow!("System contracts loading: {}", error))? } else { @@ -119,7 +132,7 @@ impl SystemContracts { /// fn build( solc_version: semver::Version, - debug_config: Option, + debug_config: Option, ) -> anyhow::Result { let build_time_start = Instant::now(); println!(" {} system contracts", "Building".bright_green().bold()); @@ -137,6 +150,18 @@ impl SystemContracts { web3::types::Address::from_low_u64_be(zkevm_opcode_defs::ADDRESS_SHA256.into()), Self::PATH_SHA256, ), + ( + web3::types::Address::from_low_u64_be( + 0x06, /* TODO: zkevm_opcode_defs::ADDRESS_ECADD.into() */ + ), + Self::PATH_ECADD, + ), + ( + web3::types::Address::from_low_u64_be( + 0x07, /* TODO: zkevm_opcode_defs::ADDRESS_ECMUL.into() */ + ), + Self::PATH_ECMUL, + ), ( web3::types::Address::from_low_u64_be( zkevm_opcode_defs::ADDRESS_EVENT_WRITER.into(), @@ -204,9 +229,9 @@ impl SystemContracts { let file_path = path.split(':').next().expect("Always valid"); yul_file_paths.push(file_path.to_owned()); } - let yul_mode = YulMode::new(compiler_llvm_context::OptimizerSettings::cycles()).into(); + let yul_mode = YulMode::new(era_compiler_llvm_context::OptimizerSettings::cycles()).into(); let mut builds = Self::compile( - YulCompiler::new(), + YulCompiler, &yul_mode, yul_file_paths, debug_config.clone(), @@ -217,7 +242,7 @@ impl SystemContracts { let file_path = path.split(':').next().expect("Always valid"); solidity_file_paths.push(file_path.to_owned()); } - for path in glob::glob("system-contracts/**/*.sol")?.filter_map(Result::ok) { + for path in glob::glob("era-contracts/system-contracts/**/*.sol")?.filter_map(Result::ok) { let path = path.to_string_lossy().to_string(); if !solidity_file_paths.contains(&path) { solidity_file_paths.push(path); @@ -225,10 +250,10 @@ impl SystemContracts { } let solidity_mode = SolidityMode::new( solc_version, - compiler_solidity::SolcPipeline::Yul, + era_compiler_solidity::SolcPipeline::Yul, true, true, - compiler_llvm_context::OptimizerSettings::cycles(), + era_compiler_llvm_context::OptimizerSettings::cycles(), ) .into(); builds.extend(Self::compile( @@ -305,19 +330,19 @@ impl SystemContracts { compiler: C, mode: &Mode, paths: Vec, - debug_config: Option, - ) -> anyhow::Result> + debug_config: Option, + ) -> anyhow::Result> where C: Compiler, { let mut sources = Vec::new(); for path in paths.into_iter() { - let file_path = if compiler.has_many_contracts() { + let file_path = if compiler.has_multiple_contracts() { path.split(':').next().expect("Always valid").to_string() } else { path }; - let source = std::fs::read_to_string( + let mut source = std::fs::read_to_string( PathBuf::from_str(file_path.as_str()) .expect("Always valid") .as_path(), @@ -325,10 +350,15 @@ impl SystemContracts { .map_err(|error| { anyhow::anyhow!("System contract file `{}` reading: {}", file_path, error) })?; + + if file_path == "era-contracts/system-contracts/contracts/Constants.sol" { + source = source.replace("{{SYSTEM_CONTRACTS_OFFSET}}", "0x8000"); + } + sources.push((file_path.to_string(), source)); } compiler - .compile( + .compile_for_eravm( "system-contracts".to_owned(), sources, BTreeMap::new(), diff --git a/compiler_tester/src/vm/eravm/vm2_adapter.rs b/compiler_tester/src/vm/eravm/vm2_adapter.rs new file mode 100644 index 00000000..e88f2de1 --- /dev/null +++ b/compiler_tester/src/vm/eravm/vm2_adapter.rs @@ -0,0 +1,121 @@ +use std::collections::HashMap; +use vm2::World; +use web3::ethabi::Address; +use zkevm_assembly::{zkevm_opcode_defs::bytecode_to_code_hash, Assembly}; +use zkevm_opcode_defs::ethereum_types::{BigEndianHash, H256, U256}; +use zkevm_tester::runners::compiler_tests::{ + FullABIParams, StorageKey, VmExecutionContext, VmLaunchOption, +}; + +use crate::test::case::input::output::Output; + +use super::execution_result::ExecutionResult; + +pub fn run_vm( + contracts: HashMap, + calldata: &[u8], + storage: HashMap, + entry_address: Address, + context: Option, + vm_launch_option: VmLaunchOption, + mut known_contracts: HashMap, + default_aa_code_hash: U256, +) -> anyhow::Result { + let abi_params = match vm_launch_option { + VmLaunchOption::Constructor => FullABIParams { + is_constructor: true, + is_system_call: false, + r3_value: None, + r4_value: None, + r5_value: None, + }, + VmLaunchOption::ManualCallABI(abiparams) => abiparams, + _ => return Err(anyhow::anyhow!("Unsupported launch option")), + }; + + for (_, contract) in contracts { + let bytecode = contract.clone().compile_to_bytecode().unwrap(); + let hash = bytecode_to_code_hash(&bytecode).unwrap(); + known_contracts.insert(U256::from_big_endian(&hash), contract); + } + + let mut vm = vm2::State::new( + Box::new(TestWorld { + storage, + contracts: known_contracts, + }), + entry_address, + calldata.to_vec(), + ); + + let output = match vm.run() { + Ok(_) => Output { + return_data: vec![], + exception: false, + events: vec![], + }, + Err(e) => { + dbg!(e, vm.current_frame.gas); + Output { + return_data: vec![], + exception: true, + events: vec![], + } + } + }; + + Ok(ExecutionResult { + output, + cycles: 0, + ergs: 0, + }) +} + +struct TestWorld { + storage: HashMap, + contracts: HashMap, +} +impl World for TestWorld { + fn decommit( + &mut self, + hash: U256, + ) -> (std::sync::Arc<[vm2::Instruction]>, std::sync::Arc<[U256]>) { + let bytecode = self + .contracts + .get(&hash) + .unwrap() + .clone() + .compile_to_bytecode() + .unwrap(); + let instructions = bytecode + .iter() + .flat_map(|x| { + x.chunks(8) + .map(|x| u64::from_be_bytes(x.try_into().unwrap())) + }) + .collect::>(); + + ( + vm2::decode::decode_program(&instructions).into(), + bytecode + .iter() + .map(|x| U256::from_big_endian(x)) + .collect::>() + .into(), + ) + } + + fn read_storage( + &mut self, + contract: zkevm_opcode_defs::ethereum_types::H160, + key: U256, + ) -> U256 { + self.storage + .get(&StorageKey { + address: contract, + key, + }) + .map(|h| h.into_uint()) + .unwrap_or(U256::zero()) + } +} diff --git a/compiler_tester/src/vm/evm/address_predictor.rs b/compiler_tester/src/vm/evm/address_predictor.rs new file mode 100644 index 00000000..d6866a73 --- /dev/null +++ b/compiler_tester/src/vm/evm/address_predictor.rs @@ -0,0 +1,53 @@ +//! +//! The EVM deploy address predictor. +//! + +use std::collections::HashMap; +use std::str::FromStr; + +use crate::vm::AddressPredictorIterator; + +/// +/// The EVM deploy address predictor. +/// +#[derive(Debug, Clone)] +pub struct AddressPredictor { + /// The accounts create nonces. + nonces: HashMap, +} + +impl AddressPredictor { + /// + /// Create new address predictor instance. + /// + pub fn new() -> Self { + Self { + nonces: HashMap::new(), + } + } + + /// + /// Increments caller nonce. + /// + pub fn increment_nonce(&mut self, caller: &web3::types::Address) { + let nonce = self.nonces.entry(*caller).or_insert(0); + *nonce += 1; + } +} + +impl AddressPredictorIterator for AddressPredictor { + fn next( + &mut self, + caller: &web3::types::Address, + increment_nonce: bool, + ) -> web3::types::Address { + let address = web3::types::Address::from_str("9f1ebbf13029eaa4d453a2eb221f322404be895b") + .expect("Always valid"); + + if increment_nonce { + self.increment_nonce(caller); + } + + address + } +} diff --git a/compiler_tester/src/vm/evm/input/build.rs b/compiler_tester/src/vm/evm/input/build.rs new file mode 100644 index 00000000..8579fa2d --- /dev/null +++ b/compiler_tester/src/vm/evm/input/build.rs @@ -0,0 +1,29 @@ +//! +//! The EVM contract build. +//! + +/// +/// The EVM contract build. +/// +#[derive(Debug, Clone)] +pub struct Build { + /// The contract deploy build. + pub deploy_build: era_compiler_llvm_context::EVMBuild, + /// The contract runtime build. + pub runtime_build: era_compiler_llvm_context::EVMBuild, +} + +impl Build { + /// + /// A shortcut constructor. + /// + pub fn new( + deploy_build: era_compiler_llvm_context::EVMBuild, + runtime_build: era_compiler_llvm_context::EVMBuild, + ) -> Self { + Self { + deploy_build, + runtime_build, + } + } +} diff --git a/compiler_tester/src/vm/evm/input/mod.rs b/compiler_tester/src/vm/evm/input/mod.rs new file mode 100644 index 00000000..37b0318e --- /dev/null +++ b/compiler_tester/src/vm/evm/input/mod.rs @@ -0,0 +1,40 @@ +//! +//! The EVM compiler input. +//! + +pub mod build; + +use std::collections::BTreeMap; +use std::collections::HashMap; + +use self::build::Build; + +/// +/// The EraVM compiler input. +/// +#[derive(Debug)] +pub struct Input { + /// The contract builds. + pub builds: HashMap, + /// The contracts method identifiers. + pub method_identifiers: Option>>, + /// The last contract name. + pub last_contract: String, +} + +impl Input { + /// + /// A shortcut constructor. + /// + pub fn new( + builds: HashMap, + method_identifiers: Option>>, + last_contract: String, + ) -> Self { + Self { + builds, + method_identifiers, + last_contract, + } + } +} diff --git a/compiler_tester/src/vm/evm/invoker.rs b/compiler_tester/src/vm/evm/invoker.rs new file mode 100644 index 00000000..03578662 --- /dev/null +++ b/compiler_tester/src/vm/evm/invoker.rs @@ -0,0 +1,21 @@ +//! +//! The EVM invoker. +//! + +use crate::vm::evm::runtime::Runtime as EVMRuntime; + +/// +/// The EVM resolver type. +/// +pub type Resolver<'evm> = evm::standard::EtableResolver< + 'evm, + 'evm, + 'evm, + (), + evm::Etable, EVMRuntime, evm::trap::CallCreateTrap>, +>; + +/// +/// The EVM wrapped invoker type. +/// +pub type Invoker<'evm> = evm::standard::Invoker<'evm, 'evm, Resolver<'evm>>; diff --git a/compiler_tester/src/vm/evm/mod.rs b/compiler_tester/src/vm/evm/mod.rs new file mode 100644 index 00000000..ee0f5c26 --- /dev/null +++ b/compiler_tester/src/vm/evm/mod.rs @@ -0,0 +1,217 @@ +//! +//! The EVM wrapper. +//! + +pub mod address_predictor; +pub mod input; +pub mod invoker; +pub mod output; +pub mod runtime; + +use std::collections::HashMap; +use std::path::PathBuf; +use std::time::Duration; +use std::time::Instant; + +use colored::Colorize; + +use crate::compilers::downloader::Downloader as CompilerDownloader; +use crate::vm::execution_result::ExecutionResult; + +use self::input::build::Build as EVMBuild; +use self::invoker::Invoker as EVMInvoker; +use self::output::Output as EVMOutput; +use self::runtime::Runtime as EVMRuntime; + +/// +/// The EVM wrapper. +/// +#[allow(non_camel_case_types)] +pub struct EVM<'evm> { + /// The EVM runtime. + runtime: EVMRuntime, + /// The known contracts. + known_contracts: HashMap, + /// The EVM invoker. + invoker: EVMInvoker<'evm>, +} + +impl<'evm> EVM<'evm> { + /// + /// A shortcut constructor. + /// + pub fn new( + known_contracts: HashMap, + invoker: EVMInvoker<'evm>, + ) -> Self { + let runtime = EVMRuntime::default(); + + Self { + runtime, + known_contracts, + invoker, + } + } + + /// + /// Downloads the necessary compiler binaries. + /// + pub fn download(binary_download_config_paths: Vec) -> anyhow::Result<()> { + let mut http_client_builder = reqwest::blocking::ClientBuilder::new(); + http_client_builder = http_client_builder.connect_timeout(Duration::from_secs(60)); + http_client_builder = http_client_builder.pool_idle_timeout(Duration::from_secs(60)); + http_client_builder = http_client_builder.timeout(Duration::from_secs(60)); + let http_client = http_client_builder.build()?; + + let download_time_start = Instant::now(); + println!(" {} compiler binaries", "Downloading".bright_green().bold()); + for config_path in binary_download_config_paths.into_iter() { + CompilerDownloader::new(http_client.clone()).download(config_path.as_path())?; + } + println!( + " {} downloading compiler binaries in {}m{:02}s", + "Finished".bright_green().bold(), + download_time_start.elapsed().as_secs() / 60, + download_time_start.elapsed().as_secs() % 60, + ); + + Ok(()) + } + + /// + /// Runs a deploy code test transaction. + /// + pub fn execute_deploy_code( + &mut self, + test_name: String, + caller: web3::types::Address, + value: Option, + constructor_args: Vec, + ) -> anyhow::Result { + let bytecode = self.known_contracts.values().next().unwrap(); + let mut deploy_code = bytecode.deploy_build.bytecode.to_owned(); + deploy_code.extend(constructor_args); + let runtime_code = bytecode.runtime_build.bytecode.to_owned(); + + self.runtime + .balances + .insert(caller, web3::types::U256::max_value()); + + let (address, exception) = match evm::transact( + evm::standard::TransactArgs::Create { + caller, + value: value.unwrap_or_default().into(), + init_code: deploy_code, + salt: None, + gas_limit: web3::types::U256::from_str_radix( + "ffffffff", + era_compiler_common::BASE_HEXADECIMAL, + ) + .expect("Always valid"), + gas_price: web3::types::U256::from_str_radix( + "b2d05e00", + era_compiler_common::BASE_HEXADECIMAL, + ) + .expect("Always valid"), + access_list: vec![], + }, + None, + &mut self.runtime, + &self.invoker, + ) { + Ok(evm::standard::TransactValue::Create { succeed, address }) => match succeed { + evm::ExitSucceed::Returned => { + self.runtime.codes.insert(address, runtime_code.clone()); + (address, false) + } + _ => (web3::types::Address::zero(), true), + }, + Ok(evm::standard::TransactValue::Call { .. }) => { + panic!("Unreachable due to the `Create` transaction sent above") + } + Err(error) => (web3::types::Address::zero(), true), + }; + + let mut return_data = vec![ + 0u8; + era_compiler_common::BYTE_LENGTH_FIELD + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS + ]; + return_data.extend(address.as_fixed_bytes()); + let events = self.runtime.logs.drain(..).collect(); + let output = EVMOutput::new(return_data, exception, events); + + let execution_result = ExecutionResult::from(output); + Ok(execution_result) + } + + /// + /// Runs a runtime code transaction. + /// + pub fn execute_runtime_code( + &mut self, + test_name: String, + caller: web3::types::Address, + value: Option, + calldata: Vec, + ) -> anyhow::Result { + self.runtime + .balances + .insert(caller, web3::types::U256::max_value()); + + let address = self.runtime.codes.iter().next().unwrap().0.to_owned(); + + let (return_data, exception) = match evm::transact( + evm::standard::TransactArgs::Call { + caller, + address, + value: value.unwrap_or_default().into(), + data: calldata, + gas_limit: web3::types::U256::from_str_radix( + "ffffffff", + era_compiler_common::BASE_HEXADECIMAL, + ) + .expect("Always valid"), + gas_price: web3::types::U256::from_str_radix( + "b2d05e00", + era_compiler_common::BASE_HEXADECIMAL, + ) + .expect("Always valid"), + access_list: vec![], + }, + None, + &mut self.runtime, + &self.invoker, + ) { + Ok(evm::standard::TransactValue::Call { succeed, retval }) => { + (retval, succeed != evm::ExitSucceed::Returned) + } + Ok(evm::standard::TransactValue::Create { .. }) => { + panic!("Unreachable due to the `Call` transaction sent above") + } + Err(_error) => (vec![], true), + }; + + let events = self.runtime.logs.drain(..).collect(); + let output = EVMOutput::new(return_data, exception, events); + + let execution_result = ExecutionResult::from(output); + Ok(execution_result) + } + + /// + /// Adds values to storage. + /// + pub fn populate_storage( + &mut self, + values: HashMap<(web3::types::Address, web3::types::U256), web3::types::H256>, + ) { + for ((address, key), value) in values.into_iter() { + self.runtime + .storages + .entry(address) + .or_default() + .insert(crate::utils::u256_to_h256(&key), value); + } + } +} diff --git a/compiler_tester/src/vm/evm/output.rs b/compiler_tester/src/vm/evm/output.rs new file mode 100644 index 00000000..042718f4 --- /dev/null +++ b/compiler_tester/src/vm/evm/output.rs @@ -0,0 +1,28 @@ +//! +//! The EVM output. +//! + +/// +/// The EVM output. +/// +pub struct Output { + /// The return data. + pub return_data: Vec, + /// The exception flag. + pub exception: bool, + /// The emitted logs. + pub logs: Vec, +} + +impl Output { + /// + /// A shortcut constructor. + /// + pub fn new(return_data: Vec, exception: bool, logs: Vec) -> Self { + Self { + return_data, + exception, + logs, + } + } +} diff --git a/compiler_tester/src/vm/evm/runtime.rs b/compiler_tester/src/vm/evm/runtime.rs new file mode 100644 index 00000000..161b9f4c --- /dev/null +++ b/compiler_tester/src/vm/evm/runtime.rs @@ -0,0 +1,245 @@ +//! +//! The EVM runtime. +//! + +use std::collections::HashMap; + +/// +/// The EVM runtime. +/// +#[derive(Debug, Default)] +pub struct Runtime { + /// The contract codes. + pub codes: HashMap>, + /// The contract balances. + pub balances: HashMap, + /// The contract nonces. + pub nonces: HashMap, + /// The contract storages. + pub storages: HashMap>, + /// The contract logs. + pub logs: Vec, +} + +impl Runtime { + /// + /// A shortcut constructor. + /// + pub fn new( + codes: HashMap>, + balances: HashMap, + nonces: HashMap, + storages: HashMap>, + logs: Vec, + ) -> Self { + Self { + codes, + balances, + nonces, + storages, + logs, + } + } +} + +impl evm::RuntimeEnvironment for Runtime { + fn block_hash(&self, number: web3::types::U256) -> web3::types::H256 { + crate::utils::u256_to_h256( + &web3::types::U256::from_str_radix( + "3737373737373737373737373737373737373737373737373737373737373862", + era_compiler_common::BASE_HEXADECIMAL, + ) + .expect("Always valid"), + ) + } + + fn block_number(&self) -> web3::types::U256 { + web3::types::U256::from_str_radix("12c", era_compiler_common::BASE_HEXADECIMAL) + .expect("Always valid") + } + + fn block_coinbase(&self) -> web3::types::H160 { + crate::utils::u256_to_address( + &web3::types::U256::from_str_radix("8001", era_compiler_common::BASE_HEXADECIMAL) + .expect("Always valid"), + ) + } + + fn block_timestamp(&self) -> web3::types::U256 { + web3::types::U256::from_str_radix("deadbeef", era_compiler_common::BASE_HEXADECIMAL) + .expect("Always valid") + } + + fn block_difficulty(&self) -> web3::types::U256 { + web3::types::U256::from_str_radix("8e1bc9bf04000", era_compiler_common::BASE_HEXADECIMAL) + .expect("Always valid") + } + + fn block_randomness(&self) -> Option { + None + } + + fn block_gas_limit(&self) -> web3::types::U256 { + web3::types::U256::from_str_radix("40000000", era_compiler_common::BASE_HEXADECIMAL) + .expect("Always valid") + } + + fn block_base_fee_per_gas(&self) -> web3::types::U256 { + web3::types::U256::from_dec_str("7").expect("Always valid") + } + + fn chain_id(&self) -> web3::types::U256 { + web3::types::U256::from_dec_str("280").expect("Always valid") + } +} + +impl evm::RuntimeBaseBackend for Runtime { + fn balance(&self, address: web3::types::H160) -> web3::types::U256 { + self.balances + .get(&address) + .cloned() + .unwrap_or(web3::types::U256::zero()) + } + + fn code_size(&self, address: web3::types::H160) -> web3::types::U256 { + self.codes + .get(&address) + .map(|code| web3::types::U256::from(code.len())) + .unwrap_or(web3::types::U256::zero()) + } + + fn code_hash(&self, address: web3::types::H160) -> web3::types::H256 { + web3::types::H256::zero() + } + + fn code(&self, address: web3::types::H160) -> Vec { + self.codes.get(&address).cloned().unwrap_or_default() + } + + fn storage(&self, address: web3::types::H160, index: web3::types::H256) -> web3::types::H256 { + self.storages + .get(&address) + .and_then(|storage| storage.get(&index)) + .cloned() + .unwrap_or(web3::types::H256::zero()) + } + + fn exists(&self, address: web3::types::H160) -> bool { + self.codes.contains_key(&address) + } + + fn nonce(&self, address: web3::types::H160) -> web3::types::U256 { + self.nonces + .get(&address) + .cloned() + .unwrap_or(web3::types::U256::zero()) + } +} + +impl evm::RuntimeBackend for Runtime { + fn original_storage( + &self, + address: web3::types::H160, + index: web3::types::H256, + ) -> web3::types::H256 { + evm::RuntimeBaseBackend::storage(self, address, index) + } + + fn deleted(&self, address: web3::types::H160) -> bool { + false + } + + fn is_cold(&self, address: web3::types::H160, index: Option) -> bool { + false + } + + fn is_hot(&self, address: web3::types::H160, index: Option) -> bool { + !self.is_cold(address, index) + } + + fn mark_hot(&mut self, address: web3::types::H160, index: Option) {} + + fn set_storage( + &mut self, + address: web3::types::H160, + index: web3::types::H256, + value: web3::types::H256, + ) -> Result<(), evm::ExitError> { + self.storages + .entry(address) + .and_modify(|storage| { + storage.insert(index, value); + }) + .or_insert_with(|| { + let mut storage = HashMap::new(); + storage.insert(index, value); + storage + }); + Ok(()) + } + + fn log(&mut self, log: evm::Log) -> Result<(), evm::ExitError> { + self.logs.push(log); + Ok(()) + } + + fn mark_delete(&mut self, address: web3::types::H160) {} + + fn reset_storage(&mut self, address: web3::types::H160) {} + + fn set_code( + &mut self, + address: web3::types::H160, + code: Vec, + ) -> Result<(), evm::ExitError> { + self.codes.insert(address, code); + Ok(()) + } + + fn reset_balance(&mut self, address: web3::types::H160) { + self.balances.insert(address, web3::types::U256::zero()); + } + + fn deposit(&mut self, target: web3::types::H160, value: web3::types::U256) { + self.balances + .entry(target) + .and_modify(|balance| *balance += value) + .or_insert(value); + } + + fn withdrawal( + &mut self, + source: web3::types::H160, + value: web3::types::U256, + ) -> Result<(), evm::ExitError> { + let balance = self + .balances + .get_mut(&source) + .ok_or(evm::ExitError::Exception(evm::ExitException::OutOfFund))?; + if *balance < value { + return Err(evm::ExitError::Exception(evm::ExitException::OutOfFund)); + } + *balance -= value; + Ok(()) + } + + fn transfer(&mut self, transfer: evm::Transfer) -> Result<(), evm::ExitError> { + self.withdrawal(transfer.source, transfer.value)?; + self.deposit(transfer.target, transfer.value); + Ok(()) + } + + fn inc_nonce(&mut self, address: web3::types::H160) -> Result<(), evm::ExitError> { + self.nonces + .entry(address) + .and_modify(|nonce| *nonce += web3::types::U256::one()) + .or_insert(web3::types::U256::one()); + Ok(()) + } +} + +impl evm::TransactionalBackend for Runtime { + fn push_substate(&mut self) {} + + fn pop_substate(&mut self, strategy: evm::MergeStrategy) {} +} diff --git a/compiler_tester/src/eravm/execution_result.rs b/compiler_tester/src/vm/execution_result.rs similarity index 58% rename from compiler_tester/src/eravm/execution_result.rs rename to compiler_tester/src/vm/execution_result.rs index 2b05e9df..cdb5c6bb 100644 --- a/compiler_tester/src/eravm/execution_result.rs +++ b/compiler_tester/src/vm/execution_result.rs @@ -1,11 +1,12 @@ //! -//! The EraVM execution result. +//! The VM execution result. //! use crate::test::case::input::output::Output; +use crate::vm::evm::output::Output as EVMOutput; /// -/// The EraVM execution result. +/// The VM execution result. /// #[derive(Debug, Clone)] pub struct ExecutionResult { @@ -13,19 +14,19 @@ pub struct ExecutionResult { pub output: Output, /// The number of executed cycles. pub cycles: usize, - /// The number of used ergs. - pub ergs: u32, + /// The amount of gas used. + pub gas: u32, } impl ExecutionResult { /// /// A shortcut constructor. /// - pub fn new(output: Output, cycles: usize, ergs: u32) -> Self { + pub fn new(output: Output, cycles: usize, gas: u32) -> Self { Self { output, cycles, - ergs, + gas, } } } @@ -35,7 +36,17 @@ impl From<&zkevm_tester::runners::compiler_tests::VmSnapshot> for ExecutionResul Self { output: Output::from(snapshot), cycles: snapshot.num_cycles_used, - ergs: snapshot.num_ergs_used, + gas: snapshot.num_ergs_used, + } + } +} + +impl From for ExecutionResult { + fn from(output: EVMOutput) -> Self { + Self { + output: Output::from(output), + cycles: 0, + gas: 0, } } } diff --git a/compiler_tester/src/vm/mod.rs b/compiler_tester/src/vm/mod.rs new file mode 100644 index 00000000..384ef8c0 --- /dev/null +++ b/compiler_tester/src/vm/mod.rs @@ -0,0 +1,21 @@ +//! +//! The VM wrappers. +//! + +pub mod eravm; +pub mod evm; +pub mod execution_result; + +/// +/// The address predictor iterator. +/// +pub trait AddressPredictorIterator { + /// + /// Returns the next predicted address. + /// + fn next( + &mut self, + caller: &web3::types::Address, + increment_nonce: bool, + ) -> web3::types::Address; +} diff --git a/configs/solc-bin-default.json b/configs/solc-bin-default.json index 75e9a557..6c0700a0 100644 --- a/configs/solc-bin-default.json +++ b/configs/solc-bin-default.json @@ -2,469 +2,477 @@ "binaries": { "0.4.12": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.13": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.13" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.14": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.14" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.15": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.15" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.16": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.16" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.17": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.17" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.18": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.18" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.19": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.19" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.20": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.20" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.21": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.21" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.22": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.22" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.23": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.23" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.24": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.24" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.25": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.25" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.4.26": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.26" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.0": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.1": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.2": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.3": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.4": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.5": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.6": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.7": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.7" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.8": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.8" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.9": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.9" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.10": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.10" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.11": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.11" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.12": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.13": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.13" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.14": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.14" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.15": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.15" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.16": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.16" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.5.17": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.17" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.0": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.1": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.2": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.3": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.4": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.5": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.6": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.7": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.7" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.8": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.8" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.9": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.9" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.10": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.10" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.11": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.11" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.6.12": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.7.0": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.7.1": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.7.2": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.7.3": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.7.4": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.7.5": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.7.6": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.0": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.1": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.2": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.3": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.4": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.5": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.6": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.7": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.7" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.8": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.8" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.9": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.9" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.10": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.10" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.11": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.11" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.12": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.13": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.13" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.14": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.14" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.15": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.15" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.16": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.16" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.17": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.17" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.18": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.18" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.19": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.19" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.20": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.20" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.21": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.21" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.22": { "is_enabled": false, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.22" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" }, "0.8.23": { + "is_enabled": false, + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" + }, + "0.8.24": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.23" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-system-contracts.json b/configs/solc-bin-system-contracts.json index f912e0d3..4f247eec 100644 --- a/configs/solc-bin-system-contracts.json +++ b/configs/solc-bin-system-contracts.json @@ -2,13 +2,15 @@ "binaries": { "0.8.20": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", "destination": "./solc-bin/solc-system-contracts" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.12.json b/configs/solc-bin-zkevm-candidate-0.4.12.json index 95435c26..c3afef92 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.12.json +++ b/configs/solc-bin-zkevm-candidate-0.4.12.json @@ -3,12 +3,14 @@ "0.4.12": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.12", - "destination": "./solc-bin/solc-0.4.12" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.13.json b/configs/solc-bin-zkevm-candidate-0.4.13.json index 5c64e825..6a8317ec 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.13.json +++ b/configs/solc-bin-zkevm-candidate-0.4.13.json @@ -3,12 +3,14 @@ "0.4.13": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.13", - "destination": "./solc-bin/solc-0.4.13" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.14.json b/configs/solc-bin-zkevm-candidate-0.4.14.json index 9bf145cf..eb7de640 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.14.json +++ b/configs/solc-bin-zkevm-candidate-0.4.14.json @@ -3,12 +3,14 @@ "0.4.14": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.14", - "destination": "./solc-bin/solc-0.4.14" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.15.json b/configs/solc-bin-zkevm-candidate-0.4.15.json index cbcc0dbb..251e7e6f 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.15.json +++ b/configs/solc-bin-zkevm-candidate-0.4.15.json @@ -3,12 +3,14 @@ "0.4.15": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.15", - "destination": "./solc-bin/solc-0.4.15" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.16.json b/configs/solc-bin-zkevm-candidate-0.4.16.json index 0692de92..89d9ebcd 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.16.json +++ b/configs/solc-bin-zkevm-candidate-0.4.16.json @@ -3,12 +3,14 @@ "0.4.16": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.16", - "destination": "./solc-bin/solc-0.4.16" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.17.json b/configs/solc-bin-zkevm-candidate-0.4.17.json index 573c8609..14f1f8aa 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.17.json +++ b/configs/solc-bin-zkevm-candidate-0.4.17.json @@ -3,12 +3,14 @@ "0.4.17": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.17", - "destination": "./solc-bin/solc-0.4.17" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.18.json b/configs/solc-bin-zkevm-candidate-0.4.18.json index 5aa62f88..a1f6e7af 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.18.json +++ b/configs/solc-bin-zkevm-candidate-0.4.18.json @@ -3,12 +3,14 @@ "0.4.18": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.18", - "destination": "./solc-bin/solc-0.4.18" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.19.json b/configs/solc-bin-zkevm-candidate-0.4.19.json index 57e28b1d..5cffba2e 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.19.json +++ b/configs/solc-bin-zkevm-candidate-0.4.19.json @@ -3,12 +3,14 @@ "0.4.19": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.19", - "destination": "./solc-bin/solc-0.4.19" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.20.json b/configs/solc-bin-zkevm-candidate-0.4.20.json index a26df1e3..4996ebf8 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.20.json +++ b/configs/solc-bin-zkevm-candidate-0.4.20.json @@ -3,12 +3,14 @@ "0.4.20": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.20", - "destination": "./solc-bin/solc-0.4.20" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.21.json b/configs/solc-bin-zkevm-candidate-0.4.21.json index 8ee7e363..54c00332 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.21.json +++ b/configs/solc-bin-zkevm-candidate-0.4.21.json @@ -3,12 +3,14 @@ "0.4.21": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.21", - "destination": "./solc-bin/solc-0.4.21" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.22.json b/configs/solc-bin-zkevm-candidate-0.4.22.json index dd37e793..c6dbe49b 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.22.json +++ b/configs/solc-bin-zkevm-candidate-0.4.22.json @@ -3,12 +3,14 @@ "0.4.22": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.22", - "destination": "./solc-bin/solc-0.4.22" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.23.json b/configs/solc-bin-zkevm-candidate-0.4.23.json index 2f7efc55..9fc4f818 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.23.json +++ b/configs/solc-bin-zkevm-candidate-0.4.23.json @@ -3,12 +3,14 @@ "0.4.23": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.23", - "destination": "./solc-bin/solc-0.4.23" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.24.json b/configs/solc-bin-zkevm-candidate-0.4.24.json index f8fac6b9..49083243 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.24.json +++ b/configs/solc-bin-zkevm-candidate-0.4.24.json @@ -3,12 +3,14 @@ "0.4.24": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.24", - "destination": "./solc-bin/solc-0.4.24" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.25.json b/configs/solc-bin-zkevm-candidate-0.4.25.json index 408f5f30..88f3201d 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.25.json +++ b/configs/solc-bin-zkevm-candidate-0.4.25.json @@ -3,12 +3,14 @@ "0.4.25": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.25", - "destination": "./solc-bin/solc-0.4.25" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.4.26.json b/configs/solc-bin-zkevm-candidate-0.4.26.json index bc6c4ae3..81bb2723 100644 --- a/configs/solc-bin-zkevm-candidate-0.4.26.json +++ b/configs/solc-bin-zkevm-candidate-0.4.26.json @@ -3,12 +3,14 @@ "0.4.26": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.4.26", - "destination": "./solc-bin/solc-0.4.26" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.0.json b/configs/solc-bin-zkevm-candidate-0.5.0.json index ba697267..6c3f805f 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.0.json +++ b/configs/solc-bin-zkevm-candidate-0.5.0.json @@ -3,12 +3,14 @@ "0.5.0": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.0", - "destination": "./solc-bin/solc-0.5.0" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.1.json b/configs/solc-bin-zkevm-candidate-0.5.1.json index a667b63b..a74a5dc5 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.1.json +++ b/configs/solc-bin-zkevm-candidate-0.5.1.json @@ -3,12 +3,14 @@ "0.5.1": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.1", - "destination": "./solc-bin/solc-0.5.1" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.10.json b/configs/solc-bin-zkevm-candidate-0.5.10.json index 8c0f3a71..49ffef44 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.10.json +++ b/configs/solc-bin-zkevm-candidate-0.5.10.json @@ -3,12 +3,14 @@ "0.5.10": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.10", - "destination": "./solc-bin/solc-0.5.10" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.11.json b/configs/solc-bin-zkevm-candidate-0.5.11.json index e384237f..d5f6ddde 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.11.json +++ b/configs/solc-bin-zkevm-candidate-0.5.11.json @@ -3,12 +3,14 @@ "0.5.11": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.11", - "destination": "./solc-bin/solc-0.5.11" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.12.json b/configs/solc-bin-zkevm-candidate-0.5.12.json index 154b2c10..d48c825f 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.12.json +++ b/configs/solc-bin-zkevm-candidate-0.5.12.json @@ -3,12 +3,14 @@ "0.5.12": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.12", - "destination": "./solc-bin/solc-0.5.12" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.13.json b/configs/solc-bin-zkevm-candidate-0.5.13.json index 6fe40fdc..f1e525a6 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.13.json +++ b/configs/solc-bin-zkevm-candidate-0.5.13.json @@ -3,12 +3,14 @@ "0.5.13": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.13", - "destination": "./solc-bin/solc-0.5.13" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.14.json b/configs/solc-bin-zkevm-candidate-0.5.14.json index 6f4d48e2..2a32c071 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.14.json +++ b/configs/solc-bin-zkevm-candidate-0.5.14.json @@ -3,12 +3,14 @@ "0.5.14": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.14", - "destination": "./solc-bin/solc-0.5.14" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.15.json b/configs/solc-bin-zkevm-candidate-0.5.15.json index f44aa03d..c0e8618e 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.15.json +++ b/configs/solc-bin-zkevm-candidate-0.5.15.json @@ -3,12 +3,14 @@ "0.5.15": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.15", - "destination": "./solc-bin/solc-0.5.15" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.16.json b/configs/solc-bin-zkevm-candidate-0.5.16.json index c187289d..8c296475 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.16.json +++ b/configs/solc-bin-zkevm-candidate-0.5.16.json @@ -3,12 +3,14 @@ "0.5.16": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.16", - "destination": "./solc-bin/solc-0.5.16" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.17.json b/configs/solc-bin-zkevm-candidate-0.5.17.json index 3d658c97..78bbc133 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.17.json +++ b/configs/solc-bin-zkevm-candidate-0.5.17.json @@ -3,12 +3,14 @@ "0.5.17": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.17", - "destination": "./solc-bin/solc-0.5.17" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.2.json b/configs/solc-bin-zkevm-candidate-0.5.2.json index 9458f4db..01bcf951 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.2.json +++ b/configs/solc-bin-zkevm-candidate-0.5.2.json @@ -3,12 +3,14 @@ "0.5.2": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.2", - "destination": "./solc-bin/solc-0.5.2" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.3.json b/configs/solc-bin-zkevm-candidate-0.5.3.json index 9876e267..6b7c36ef 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.3.json +++ b/configs/solc-bin-zkevm-candidate-0.5.3.json @@ -3,12 +3,14 @@ "0.5.3": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.3", - "destination": "./solc-bin/solc-0.5.3" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.4.json b/configs/solc-bin-zkevm-candidate-0.5.4.json index 8916f006..42534d2b 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.4.json +++ b/configs/solc-bin-zkevm-candidate-0.5.4.json @@ -3,12 +3,14 @@ "0.5.4": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.4", - "destination": "./solc-bin/solc-0.5.4" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.5.json b/configs/solc-bin-zkevm-candidate-0.5.5.json index 8092900f..d4f7c33a 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.5.json +++ b/configs/solc-bin-zkevm-candidate-0.5.5.json @@ -3,12 +3,14 @@ "0.5.5": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.5", - "destination": "./solc-bin/solc-0.5.5" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.6.json b/configs/solc-bin-zkevm-candidate-0.5.6.json index 95b16b09..4d9c4b08 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.6.json +++ b/configs/solc-bin-zkevm-candidate-0.5.6.json @@ -3,12 +3,14 @@ "0.5.6": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.6", - "destination": "./solc-bin/solc-0.5.6" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.7.json b/configs/solc-bin-zkevm-candidate-0.5.7.json index 7f1762e3..e514a5f8 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.7.json +++ b/configs/solc-bin-zkevm-candidate-0.5.7.json @@ -3,12 +3,14 @@ "0.5.7": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.7", - "destination": "./solc-bin/solc-0.5.7" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.8.json b/configs/solc-bin-zkevm-candidate-0.5.8.json index 5abbdae0..f9536824 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.8.json +++ b/configs/solc-bin-zkevm-candidate-0.5.8.json @@ -3,12 +3,14 @@ "0.5.8": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.8", - "destination": "./solc-bin/solc-0.5.8" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.5.9.json b/configs/solc-bin-zkevm-candidate-0.5.9.json index fa6d968d..17a3bdf0 100644 --- a/configs/solc-bin-zkevm-candidate-0.5.9.json +++ b/configs/solc-bin-zkevm-candidate-0.5.9.json @@ -3,12 +3,14 @@ "0.5.9": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.5.9", - "destination": "./solc-bin/solc-0.5.9" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.0.json b/configs/solc-bin-zkevm-candidate-0.6.0.json index 99b73e4c..7a091bf5 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.0.json +++ b/configs/solc-bin-zkevm-candidate-0.6.0.json @@ -3,12 +3,14 @@ "0.6.0": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.0", - "destination": "./solc-bin/solc-0.6.0" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.1.json b/configs/solc-bin-zkevm-candidate-0.6.1.json index c4a13f07..cc455161 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.1.json +++ b/configs/solc-bin-zkevm-candidate-0.6.1.json @@ -3,12 +3,14 @@ "0.6.1": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.1", - "destination": "./solc-bin/solc-0.6.1" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.10.json b/configs/solc-bin-zkevm-candidate-0.6.10.json index 51af91b0..c733bf4a 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.10.json +++ b/configs/solc-bin-zkevm-candidate-0.6.10.json @@ -3,12 +3,14 @@ "0.6.10": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.10", - "destination": "./solc-bin/solc-0.6.10" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.11.json b/configs/solc-bin-zkevm-candidate-0.6.11.json index 528e5a69..e8960ec4 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.11.json +++ b/configs/solc-bin-zkevm-candidate-0.6.11.json @@ -3,12 +3,14 @@ "0.6.11": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.11", - "destination": "./solc-bin/solc-0.6.11" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.12.json b/configs/solc-bin-zkevm-candidate-0.6.12.json index fd0da807..ed9c9ca5 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.12.json +++ b/configs/solc-bin-zkevm-candidate-0.6.12.json @@ -3,12 +3,14 @@ "0.6.12": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.12", - "destination": "./solc-bin/solc-0.6.12" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.2.json b/configs/solc-bin-zkevm-candidate-0.6.2.json index cf540496..65a3e89d 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.2.json +++ b/configs/solc-bin-zkevm-candidate-0.6.2.json @@ -3,12 +3,14 @@ "0.6.2": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.2", - "destination": "./solc-bin/solc-0.6.2" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.3.json b/configs/solc-bin-zkevm-candidate-0.6.3.json index e868e0d9..d9d0c6b9 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.3.json +++ b/configs/solc-bin-zkevm-candidate-0.6.3.json @@ -3,12 +3,14 @@ "0.6.3": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.3", - "destination": "./solc-bin/solc-0.6.3" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.4.json b/configs/solc-bin-zkevm-candidate-0.6.4.json index 6a07a333..c2fe907a 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.4.json +++ b/configs/solc-bin-zkevm-candidate-0.6.4.json @@ -3,12 +3,14 @@ "0.6.4": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.4", - "destination": "./solc-bin/solc-0.6.4" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.5.json b/configs/solc-bin-zkevm-candidate-0.6.5.json index 76d716de..e1b41684 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.5.json +++ b/configs/solc-bin-zkevm-candidate-0.6.5.json @@ -3,12 +3,14 @@ "0.6.5": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.5", - "destination": "./solc-bin/solc-0.6.5" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.6.json b/configs/solc-bin-zkevm-candidate-0.6.6.json index 5c67e9da..872b0fbb 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.6.json +++ b/configs/solc-bin-zkevm-candidate-0.6.6.json @@ -3,12 +3,14 @@ "0.6.6": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.6", - "destination": "./solc-bin/solc-0.6.6" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.7.json b/configs/solc-bin-zkevm-candidate-0.6.7.json index 35a33c4b..3c7c2bcf 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.7.json +++ b/configs/solc-bin-zkevm-candidate-0.6.7.json @@ -3,12 +3,14 @@ "0.6.7": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.7", - "destination": "./solc-bin/solc-0.6.7" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.8.json b/configs/solc-bin-zkevm-candidate-0.6.8.json index 311c98d0..263c6073 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.8.json +++ b/configs/solc-bin-zkevm-candidate-0.6.8.json @@ -3,12 +3,14 @@ "0.6.8": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.8", - "destination": "./solc-bin/solc-0.6.8" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.6.9.json b/configs/solc-bin-zkevm-candidate-0.6.9.json index bb531b87..8d9a8489 100644 --- a/configs/solc-bin-zkevm-candidate-0.6.9.json +++ b/configs/solc-bin-zkevm-candidate-0.6.9.json @@ -3,12 +3,14 @@ "0.6.9": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.6.9", - "destination": "./solc-bin/solc-0.6.9" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.7.0.json b/configs/solc-bin-zkevm-candidate-0.7.0.json index e60c79ea..111c015a 100644 --- a/configs/solc-bin-zkevm-candidate-0.7.0.json +++ b/configs/solc-bin-zkevm-candidate-0.7.0.json @@ -3,12 +3,14 @@ "0.7.0": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.7.0", - "destination": "./solc-bin/solc-0.7.0" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.7.1.json b/configs/solc-bin-zkevm-candidate-0.7.1.json index 05f22f3e..5a49762b 100644 --- a/configs/solc-bin-zkevm-candidate-0.7.1.json +++ b/configs/solc-bin-zkevm-candidate-0.7.1.json @@ -3,12 +3,14 @@ "0.7.1": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.7.1", - "destination": "./solc-bin/solc-0.7.1" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.7.2.json b/configs/solc-bin-zkevm-candidate-0.7.2.json index e1a75c51..fda9c24e 100644 --- a/configs/solc-bin-zkevm-candidate-0.7.2.json +++ b/configs/solc-bin-zkevm-candidate-0.7.2.json @@ -3,12 +3,14 @@ "0.7.2": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.7.2", - "destination": "./solc-bin/solc-0.7.2" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.7.3.json b/configs/solc-bin-zkevm-candidate-0.7.3.json index 137f3a72..c4f7370d 100644 --- a/configs/solc-bin-zkevm-candidate-0.7.3.json +++ b/configs/solc-bin-zkevm-candidate-0.7.3.json @@ -3,12 +3,14 @@ "0.7.3": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.7.3", - "destination": "./solc-bin/solc-0.7.3" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.7.4.json b/configs/solc-bin-zkevm-candidate-0.7.4.json index 73787bf1..748a8652 100644 --- a/configs/solc-bin-zkevm-candidate-0.7.4.json +++ b/configs/solc-bin-zkevm-candidate-0.7.4.json @@ -3,12 +3,14 @@ "0.7.4": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.7.4", - "destination": "./solc-bin/solc-0.7.4" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.7.5.json b/configs/solc-bin-zkevm-candidate-0.7.5.json index bfaf016b..5a129640 100644 --- a/configs/solc-bin-zkevm-candidate-0.7.5.json +++ b/configs/solc-bin-zkevm-candidate-0.7.5.json @@ -3,12 +3,14 @@ "0.7.5": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.7.5", - "destination": "./solc-bin/solc-0.7.5" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.7.6.json b/configs/solc-bin-zkevm-candidate-0.7.6.json index e417d4cf..83f1cba5 100644 --- a/configs/solc-bin-zkevm-candidate-0.7.6.json +++ b/configs/solc-bin-zkevm-candidate-0.7.6.json @@ -3,12 +3,14 @@ "0.7.6": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.7.6", - "destination": "./solc-bin/solc-0.7.6" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.0.json b/configs/solc-bin-zkevm-candidate-0.8.0.json index aadfea5b..8da677f7 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.0.json +++ b/configs/solc-bin-zkevm-candidate-0.8.0.json @@ -3,12 +3,14 @@ "0.8.0": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.0", - "destination": "./solc-bin/solc-0.8.0" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.1.json b/configs/solc-bin-zkevm-candidate-0.8.1.json index 3d8ee649..10e67bae 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.1.json +++ b/configs/solc-bin-zkevm-candidate-0.8.1.json @@ -3,12 +3,14 @@ "0.8.1": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.1", - "destination": "./solc-bin/solc-0.8.1" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.10.json b/configs/solc-bin-zkevm-candidate-0.8.10.json index 0922c024..9561e8f3 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.10.json +++ b/configs/solc-bin-zkevm-candidate-0.8.10.json @@ -3,12 +3,14 @@ "0.8.10": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.10", - "destination": "./solc-bin/solc-0.8.10" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.11.json b/configs/solc-bin-zkevm-candidate-0.8.11.json index b6a571ee..4ba8b1e3 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.11.json +++ b/configs/solc-bin-zkevm-candidate-0.8.11.json @@ -3,12 +3,14 @@ "0.8.11": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.11", - "destination": "./solc-bin/solc-0.8.11" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.12.json b/configs/solc-bin-zkevm-candidate-0.8.12.json index ac3e2f23..e64353d2 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.12.json +++ b/configs/solc-bin-zkevm-candidate-0.8.12.json @@ -3,12 +3,14 @@ "0.8.12": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.12", - "destination": "./solc-bin/solc-0.8.12" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.13.json b/configs/solc-bin-zkevm-candidate-0.8.13.json index 8749258c..7ba53ad9 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.13.json +++ b/configs/solc-bin-zkevm-candidate-0.8.13.json @@ -3,12 +3,14 @@ "0.8.13": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.13", - "destination": "./solc-bin/solc-0.8.13" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.14.json b/configs/solc-bin-zkevm-candidate-0.8.14.json index 290fd813..5dd69942 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.14.json +++ b/configs/solc-bin-zkevm-candidate-0.8.14.json @@ -3,12 +3,14 @@ "0.8.14": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.14", - "destination": "./solc-bin/solc-0.8.14" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.15.json b/configs/solc-bin-zkevm-candidate-0.8.15.json index 8c384de9..f6ee065e 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.15.json +++ b/configs/solc-bin-zkevm-candidate-0.8.15.json @@ -3,12 +3,14 @@ "0.8.15": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.15", - "destination": "./solc-bin/solc-0.8.15" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.16.json b/configs/solc-bin-zkevm-candidate-0.8.16.json index 14609055..a8874d46 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.16.json +++ b/configs/solc-bin-zkevm-candidate-0.8.16.json @@ -3,12 +3,14 @@ "0.8.16": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.16", - "destination": "./solc-bin/solc-0.8.16" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.17.json b/configs/solc-bin-zkevm-candidate-0.8.17.json index 5b23f988..4908cbf2 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.17.json +++ b/configs/solc-bin-zkevm-candidate-0.8.17.json @@ -3,12 +3,14 @@ "0.8.17": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.17", - "destination": "./solc-bin/solc-0.8.17" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.18.json b/configs/solc-bin-zkevm-candidate-0.8.18.json index ea3e8ea2..d259e26d 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.18.json +++ b/configs/solc-bin-zkevm-candidate-0.8.18.json @@ -3,12 +3,14 @@ "0.8.18": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.18", - "destination": "./solc-bin/solc-0.8.18" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.19.json b/configs/solc-bin-zkevm-candidate-0.8.19.json index fd6ece11..cb83ea65 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.19.json +++ b/configs/solc-bin-zkevm-candidate-0.8.19.json @@ -3,12 +3,14 @@ "0.8.19": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.19", - "destination": "./solc-bin/solc-0.8.19" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.2.json b/configs/solc-bin-zkevm-candidate-0.8.2.json index 55dfb777..1bf805c6 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.2.json +++ b/configs/solc-bin-zkevm-candidate-0.8.2.json @@ -3,12 +3,14 @@ "0.8.2": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.2", - "destination": "./solc-bin/solc-0.8.2" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.20.json b/configs/solc-bin-zkevm-candidate-0.8.20.json index fe510a75..3c089e67 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.20.json +++ b/configs/solc-bin-zkevm-candidate-0.8.20.json @@ -3,12 +3,14 @@ "0.8.20": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.20", - "destination": "./solc-bin/solc-0.8.20" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.21.json b/configs/solc-bin-zkevm-candidate-0.8.21.json index 186d0a5a..2b45c6a5 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.21.json +++ b/configs/solc-bin-zkevm-candidate-0.8.21.json @@ -3,12 +3,14 @@ "0.8.21": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.21", - "destination": "./solc-bin/solc-0.8.21" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.22.json b/configs/solc-bin-zkevm-candidate-0.8.22.json index fb3375d7..3eb1a705 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.22.json +++ b/configs/solc-bin-zkevm-candidate-0.8.22.json @@ -3,12 +3,14 @@ "0.8.22": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.22", - "destination": "./solc-bin/solc-0.8.22" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.23.json b/configs/solc-bin-zkevm-candidate-0.8.23.json index cc615bd4..eb6c0bc6 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.23.json +++ b/configs/solc-bin-zkevm-candidate-0.8.23.json @@ -3,12 +3,14 @@ "0.8.23": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.23", - "destination": "./solc-bin/solc-0.8.23" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.24.json b/configs/solc-bin-zkevm-candidate-0.8.24.json new file mode 100644 index 00000000..1c327b0d --- /dev/null +++ b/configs/solc-bin-zkevm-candidate-0.8.24.json @@ -0,0 +1,16 @@ +{ + "binaries": { + "0.8.24": { + "is_enabled": true, + "protocol": "file", + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" + } + }, + "platforms": { + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" + } +} diff --git a/configs/solc-bin-zkevm-candidate-0.8.3.json b/configs/solc-bin-zkevm-candidate-0.8.3.json index 6b05e4d9..6a168511 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.3.json +++ b/configs/solc-bin-zkevm-candidate-0.8.3.json @@ -3,12 +3,14 @@ "0.8.3": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.3", - "destination": "./solc-bin/solc-0.8.3" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.4.json b/configs/solc-bin-zkevm-candidate-0.8.4.json index 9b347c85..399489d4 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.4.json +++ b/configs/solc-bin-zkevm-candidate-0.8.4.json @@ -3,12 +3,14 @@ "0.8.4": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.4", - "destination": "./solc-bin/solc-0.8.4" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.5.json b/configs/solc-bin-zkevm-candidate-0.8.5.json index b3dbee0c..09a8c426 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.5.json +++ b/configs/solc-bin-zkevm-candidate-0.8.5.json @@ -3,12 +3,14 @@ "0.8.5": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.5", - "destination": "./solc-bin/solc-0.8.5" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.6.json b/configs/solc-bin-zkevm-candidate-0.8.6.json index 28797951..c4a3fa43 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.6.json +++ b/configs/solc-bin-zkevm-candidate-0.8.6.json @@ -3,12 +3,14 @@ "0.8.6": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.6", - "destination": "./solc-bin/solc-0.8.6" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.7.json b/configs/solc-bin-zkevm-candidate-0.8.7.json index c45d6840..d1e2b007 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.7.json +++ b/configs/solc-bin-zkevm-candidate-0.8.7.json @@ -3,12 +3,14 @@ "0.8.7": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.7", - "destination": "./solc-bin/solc-0.8.7" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.8.json b/configs/solc-bin-zkevm-candidate-0.8.8.json index 0d3f71c3..b5ec61ec 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.8.json +++ b/configs/solc-bin-zkevm-candidate-0.8.8.json @@ -3,12 +3,14 @@ "0.8.8": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.8", - "destination": "./solc-bin/solc-0.8.8" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-candidate-0.8.9.json b/configs/solc-bin-zkevm-candidate-0.8.9.json index bcde516c..29d0e4cb 100644 --- a/configs/solc-bin-zkevm-candidate-0.8.9.json +++ b/configs/solc-bin-zkevm-candidate-0.8.9.json @@ -3,12 +3,14 @@ "0.8.9": { "is_enabled": true, "protocol": "file", - "source": "./solc-bin/solc-0.8.9", - "destination": "./solc-bin/solc-0.8.9" + "source": "./solc-bin/solc-${VERSION}", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.12.json b/configs/solc-bin-zkevm-reference-0.4.12.json index a4cd7167..b5906004 100644 --- a/configs/solc-bin-zkevm-reference-0.4.12.json +++ b/configs/solc-bin-zkevm-reference-0.4.12.json @@ -2,13 +2,15 @@ "binaries": { "0.4.12": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.13.json b/configs/solc-bin-zkevm-reference-0.4.13.json index d5b34635..054d92f8 100644 --- a/configs/solc-bin-zkevm-reference-0.4.13.json +++ b/configs/solc-bin-zkevm-reference-0.4.13.json @@ -2,13 +2,15 @@ "binaries": { "0.4.13": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.13" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.14.json b/configs/solc-bin-zkevm-reference-0.4.14.json index 9aa57a0e..9f438888 100644 --- a/configs/solc-bin-zkevm-reference-0.4.14.json +++ b/configs/solc-bin-zkevm-reference-0.4.14.json @@ -2,13 +2,15 @@ "binaries": { "0.4.14": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.14" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.15.json b/configs/solc-bin-zkevm-reference-0.4.15.json index af19c21e..5696b26f 100644 --- a/configs/solc-bin-zkevm-reference-0.4.15.json +++ b/configs/solc-bin-zkevm-reference-0.4.15.json @@ -2,13 +2,15 @@ "binaries": { "0.4.15": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.15" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.16.json b/configs/solc-bin-zkevm-reference-0.4.16.json index 9e826e94..5e40d6cd 100644 --- a/configs/solc-bin-zkevm-reference-0.4.16.json +++ b/configs/solc-bin-zkevm-reference-0.4.16.json @@ -2,13 +2,15 @@ "binaries": { "0.4.16": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.16" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.17.json b/configs/solc-bin-zkevm-reference-0.4.17.json index f37d8fc6..0c4e5fbf 100644 --- a/configs/solc-bin-zkevm-reference-0.4.17.json +++ b/configs/solc-bin-zkevm-reference-0.4.17.json @@ -2,13 +2,15 @@ "binaries": { "0.4.17": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.17" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.18.json b/configs/solc-bin-zkevm-reference-0.4.18.json index 604086e2..64125758 100644 --- a/configs/solc-bin-zkevm-reference-0.4.18.json +++ b/configs/solc-bin-zkevm-reference-0.4.18.json @@ -2,13 +2,15 @@ "binaries": { "0.4.18": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.18" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.19.json b/configs/solc-bin-zkevm-reference-0.4.19.json index 75e09550..8d03cac9 100644 --- a/configs/solc-bin-zkevm-reference-0.4.19.json +++ b/configs/solc-bin-zkevm-reference-0.4.19.json @@ -2,13 +2,15 @@ "binaries": { "0.4.19": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.19" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.20.json b/configs/solc-bin-zkevm-reference-0.4.20.json index 0e05baac..602f7b6b 100644 --- a/configs/solc-bin-zkevm-reference-0.4.20.json +++ b/configs/solc-bin-zkevm-reference-0.4.20.json @@ -2,13 +2,15 @@ "binaries": { "0.4.20": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.20" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.21.json b/configs/solc-bin-zkevm-reference-0.4.21.json index adb649be..cd0c07f6 100644 --- a/configs/solc-bin-zkevm-reference-0.4.21.json +++ b/configs/solc-bin-zkevm-reference-0.4.21.json @@ -2,13 +2,15 @@ "binaries": { "0.4.21": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.21" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.22.json b/configs/solc-bin-zkevm-reference-0.4.22.json index 0574ef62..8209912f 100644 --- a/configs/solc-bin-zkevm-reference-0.4.22.json +++ b/configs/solc-bin-zkevm-reference-0.4.22.json @@ -2,13 +2,15 @@ "binaries": { "0.4.22": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.22" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.23.json b/configs/solc-bin-zkevm-reference-0.4.23.json index c6af4783..bbe6e784 100644 --- a/configs/solc-bin-zkevm-reference-0.4.23.json +++ b/configs/solc-bin-zkevm-reference-0.4.23.json @@ -2,13 +2,15 @@ "binaries": { "0.4.23": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.23" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.24.json b/configs/solc-bin-zkevm-reference-0.4.24.json index 8ce5de77..75a9f1e0 100644 --- a/configs/solc-bin-zkevm-reference-0.4.24.json +++ b/configs/solc-bin-zkevm-reference-0.4.24.json @@ -2,13 +2,15 @@ "binaries": { "0.4.24": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.24" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.25.json b/configs/solc-bin-zkevm-reference-0.4.25.json index fd1930f0..b948a39b 100644 --- a/configs/solc-bin-zkevm-reference-0.4.25.json +++ b/configs/solc-bin-zkevm-reference-0.4.25.json @@ -2,13 +2,15 @@ "binaries": { "0.4.25": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.25" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.4.26.json b/configs/solc-bin-zkevm-reference-0.4.26.json index f545050f..e6cca2d2 100644 --- a/configs/solc-bin-zkevm-reference-0.4.26.json +++ b/configs/solc-bin-zkevm-reference-0.4.26.json @@ -2,13 +2,15 @@ "binaries": { "0.4.26": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.4.26" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.0.json b/configs/solc-bin-zkevm-reference-0.5.0.json index 1ff93d05..bd0df49a 100644 --- a/configs/solc-bin-zkevm-reference-0.5.0.json +++ b/configs/solc-bin-zkevm-reference-0.5.0.json @@ -2,13 +2,15 @@ "binaries": { "0.5.0": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.1.json b/configs/solc-bin-zkevm-reference-0.5.1.json index a328cf23..d10009ec 100644 --- a/configs/solc-bin-zkevm-reference-0.5.1.json +++ b/configs/solc-bin-zkevm-reference-0.5.1.json @@ -2,13 +2,15 @@ "binaries": { "0.5.1": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.10.json b/configs/solc-bin-zkevm-reference-0.5.10.json index a362dfe2..1c2de58c 100644 --- a/configs/solc-bin-zkevm-reference-0.5.10.json +++ b/configs/solc-bin-zkevm-reference-0.5.10.json @@ -2,13 +2,15 @@ "binaries": { "0.5.10": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.10" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.11.json b/configs/solc-bin-zkevm-reference-0.5.11.json index 36789013..71c04eee 100644 --- a/configs/solc-bin-zkevm-reference-0.5.11.json +++ b/configs/solc-bin-zkevm-reference-0.5.11.json @@ -2,13 +2,15 @@ "binaries": { "0.5.11": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.11" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.12.json b/configs/solc-bin-zkevm-reference-0.5.12.json index 1a6e52f6..89726d03 100644 --- a/configs/solc-bin-zkevm-reference-0.5.12.json +++ b/configs/solc-bin-zkevm-reference-0.5.12.json @@ -2,13 +2,15 @@ "binaries": { "0.5.12": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.13.json b/configs/solc-bin-zkevm-reference-0.5.13.json index 14b3539e..961d6838 100644 --- a/configs/solc-bin-zkevm-reference-0.5.13.json +++ b/configs/solc-bin-zkevm-reference-0.5.13.json @@ -2,13 +2,15 @@ "binaries": { "0.5.13": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.13" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.14.json b/configs/solc-bin-zkevm-reference-0.5.14.json index 758f5418..d40cc621 100644 --- a/configs/solc-bin-zkevm-reference-0.5.14.json +++ b/configs/solc-bin-zkevm-reference-0.5.14.json @@ -2,13 +2,15 @@ "binaries": { "0.5.14": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.14" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.15.json b/configs/solc-bin-zkevm-reference-0.5.15.json index fa37f0f8..13c21b23 100644 --- a/configs/solc-bin-zkevm-reference-0.5.15.json +++ b/configs/solc-bin-zkevm-reference-0.5.15.json @@ -2,13 +2,15 @@ "binaries": { "0.5.15": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.15" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.16.json b/configs/solc-bin-zkevm-reference-0.5.16.json index 6abde4c5..231bc238 100644 --- a/configs/solc-bin-zkevm-reference-0.5.16.json +++ b/configs/solc-bin-zkevm-reference-0.5.16.json @@ -2,13 +2,15 @@ "binaries": { "0.5.16": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.16" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.17.json b/configs/solc-bin-zkevm-reference-0.5.17.json index 81ea45a0..4ec9fe98 100644 --- a/configs/solc-bin-zkevm-reference-0.5.17.json +++ b/configs/solc-bin-zkevm-reference-0.5.17.json @@ -2,13 +2,15 @@ "binaries": { "0.5.17": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.17" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.2.json b/configs/solc-bin-zkevm-reference-0.5.2.json index b56927ab..1f7a0933 100644 --- a/configs/solc-bin-zkevm-reference-0.5.2.json +++ b/configs/solc-bin-zkevm-reference-0.5.2.json @@ -2,13 +2,15 @@ "binaries": { "0.5.2": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.3.json b/configs/solc-bin-zkevm-reference-0.5.3.json index bd972cba..0a7bb30e 100644 --- a/configs/solc-bin-zkevm-reference-0.5.3.json +++ b/configs/solc-bin-zkevm-reference-0.5.3.json @@ -2,13 +2,15 @@ "binaries": { "0.5.3": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.4.json b/configs/solc-bin-zkevm-reference-0.5.4.json index 2c73c87b..11cb1b1b 100644 --- a/configs/solc-bin-zkevm-reference-0.5.4.json +++ b/configs/solc-bin-zkevm-reference-0.5.4.json @@ -2,13 +2,15 @@ "binaries": { "0.5.4": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.5.json b/configs/solc-bin-zkevm-reference-0.5.5.json index 5e57f52e..cfbd9be7 100644 --- a/configs/solc-bin-zkevm-reference-0.5.5.json +++ b/configs/solc-bin-zkevm-reference-0.5.5.json @@ -2,13 +2,15 @@ "binaries": { "0.5.5": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.6.json b/configs/solc-bin-zkevm-reference-0.5.6.json index f75b972d..a1463239 100644 --- a/configs/solc-bin-zkevm-reference-0.5.6.json +++ b/configs/solc-bin-zkevm-reference-0.5.6.json @@ -2,13 +2,15 @@ "binaries": { "0.5.6": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.7.json b/configs/solc-bin-zkevm-reference-0.5.7.json index b216a79d..4d42f718 100644 --- a/configs/solc-bin-zkevm-reference-0.5.7.json +++ b/configs/solc-bin-zkevm-reference-0.5.7.json @@ -2,13 +2,15 @@ "binaries": { "0.5.7": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.7" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.8.json b/configs/solc-bin-zkevm-reference-0.5.8.json index 24bbe8b5..9ecaac27 100644 --- a/configs/solc-bin-zkevm-reference-0.5.8.json +++ b/configs/solc-bin-zkevm-reference-0.5.8.json @@ -2,13 +2,15 @@ "binaries": { "0.5.8": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.8" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.5.9.json b/configs/solc-bin-zkevm-reference-0.5.9.json index 9d9ae30c..330f174a 100644 --- a/configs/solc-bin-zkevm-reference-0.5.9.json +++ b/configs/solc-bin-zkevm-reference-0.5.9.json @@ -2,13 +2,15 @@ "binaries": { "0.5.9": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.5.9" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.0.json b/configs/solc-bin-zkevm-reference-0.6.0.json index 65ab35a9..fe139ac5 100644 --- a/configs/solc-bin-zkevm-reference-0.6.0.json +++ b/configs/solc-bin-zkevm-reference-0.6.0.json @@ -2,13 +2,15 @@ "binaries": { "0.6.0": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.1.json b/configs/solc-bin-zkevm-reference-0.6.1.json index dfd7519e..d2636883 100644 --- a/configs/solc-bin-zkevm-reference-0.6.1.json +++ b/configs/solc-bin-zkevm-reference-0.6.1.json @@ -2,13 +2,15 @@ "binaries": { "0.6.1": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.10.json b/configs/solc-bin-zkevm-reference-0.6.10.json index f21bab65..90553e56 100644 --- a/configs/solc-bin-zkevm-reference-0.6.10.json +++ b/configs/solc-bin-zkevm-reference-0.6.10.json @@ -2,13 +2,15 @@ "binaries": { "0.6.10": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.10" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.11.json b/configs/solc-bin-zkevm-reference-0.6.11.json index 03078db6..2e57c580 100644 --- a/configs/solc-bin-zkevm-reference-0.6.11.json +++ b/configs/solc-bin-zkevm-reference-0.6.11.json @@ -2,13 +2,15 @@ "binaries": { "0.6.11": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.11" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.12.json b/configs/solc-bin-zkevm-reference-0.6.12.json index 3efc367a..cc2823ff 100644 --- a/configs/solc-bin-zkevm-reference-0.6.12.json +++ b/configs/solc-bin-zkevm-reference-0.6.12.json @@ -2,13 +2,15 @@ "binaries": { "0.6.12": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.2.json b/configs/solc-bin-zkevm-reference-0.6.2.json index e41e8e4a..bde83f70 100644 --- a/configs/solc-bin-zkevm-reference-0.6.2.json +++ b/configs/solc-bin-zkevm-reference-0.6.2.json @@ -2,13 +2,15 @@ "binaries": { "0.6.2": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.3.json b/configs/solc-bin-zkevm-reference-0.6.3.json index 78aa7fe1..0230582e 100644 --- a/configs/solc-bin-zkevm-reference-0.6.3.json +++ b/configs/solc-bin-zkevm-reference-0.6.3.json @@ -2,13 +2,15 @@ "binaries": { "0.6.3": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.4.json b/configs/solc-bin-zkevm-reference-0.6.4.json index dfe4d001..bdd98eee 100644 --- a/configs/solc-bin-zkevm-reference-0.6.4.json +++ b/configs/solc-bin-zkevm-reference-0.6.4.json @@ -2,13 +2,15 @@ "binaries": { "0.6.4": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.5.json b/configs/solc-bin-zkevm-reference-0.6.5.json index 9777c895..8c882c3d 100644 --- a/configs/solc-bin-zkevm-reference-0.6.5.json +++ b/configs/solc-bin-zkevm-reference-0.6.5.json @@ -2,13 +2,15 @@ "binaries": { "0.6.5": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.6.json b/configs/solc-bin-zkevm-reference-0.6.6.json index 342f2144..8c368b56 100644 --- a/configs/solc-bin-zkevm-reference-0.6.6.json +++ b/configs/solc-bin-zkevm-reference-0.6.6.json @@ -2,13 +2,15 @@ "binaries": { "0.6.6": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.7.json b/configs/solc-bin-zkevm-reference-0.6.7.json index 97969330..673cc2b5 100644 --- a/configs/solc-bin-zkevm-reference-0.6.7.json +++ b/configs/solc-bin-zkevm-reference-0.6.7.json @@ -2,13 +2,15 @@ "binaries": { "0.6.7": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.7" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.8.json b/configs/solc-bin-zkevm-reference-0.6.8.json index 1630b196..1ab0244c 100644 --- a/configs/solc-bin-zkevm-reference-0.6.8.json +++ b/configs/solc-bin-zkevm-reference-0.6.8.json @@ -2,13 +2,15 @@ "binaries": { "0.6.8": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.8" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.6.9.json b/configs/solc-bin-zkevm-reference-0.6.9.json index 5399e86c..8024575f 100644 --- a/configs/solc-bin-zkevm-reference-0.6.9.json +++ b/configs/solc-bin-zkevm-reference-0.6.9.json @@ -2,13 +2,15 @@ "binaries": { "0.6.9": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.6.9" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.7.0.json b/configs/solc-bin-zkevm-reference-0.7.0.json index b8af9182..387c7b94 100644 --- a/configs/solc-bin-zkevm-reference-0.7.0.json +++ b/configs/solc-bin-zkevm-reference-0.7.0.json @@ -2,13 +2,15 @@ "binaries": { "0.7.0": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.7.1.json b/configs/solc-bin-zkevm-reference-0.7.1.json index b61f1375..2d7d88ae 100644 --- a/configs/solc-bin-zkevm-reference-0.7.1.json +++ b/configs/solc-bin-zkevm-reference-0.7.1.json @@ -2,13 +2,15 @@ "binaries": { "0.7.1": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.7.2.json b/configs/solc-bin-zkevm-reference-0.7.2.json index 5374f1fb..163250c3 100644 --- a/configs/solc-bin-zkevm-reference-0.7.2.json +++ b/configs/solc-bin-zkevm-reference-0.7.2.json @@ -2,13 +2,15 @@ "binaries": { "0.7.2": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.7.3.json b/configs/solc-bin-zkevm-reference-0.7.3.json index b25843e5..c227c9a7 100644 --- a/configs/solc-bin-zkevm-reference-0.7.3.json +++ b/configs/solc-bin-zkevm-reference-0.7.3.json @@ -2,13 +2,15 @@ "binaries": { "0.7.3": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.7.4.json b/configs/solc-bin-zkevm-reference-0.7.4.json index d379edef..c91d62e5 100644 --- a/configs/solc-bin-zkevm-reference-0.7.4.json +++ b/configs/solc-bin-zkevm-reference-0.7.4.json @@ -2,13 +2,15 @@ "binaries": { "0.7.4": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.7.5.json b/configs/solc-bin-zkevm-reference-0.7.5.json index 1e50e87c..a361bb5b 100644 --- a/configs/solc-bin-zkevm-reference-0.7.5.json +++ b/configs/solc-bin-zkevm-reference-0.7.5.json @@ -2,13 +2,15 @@ "binaries": { "0.7.5": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.7.6.json b/configs/solc-bin-zkevm-reference-0.7.6.json index 086670c2..30cfd408 100644 --- a/configs/solc-bin-zkevm-reference-0.7.6.json +++ b/configs/solc-bin-zkevm-reference-0.7.6.json @@ -2,13 +2,15 @@ "binaries": { "0.7.6": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.7.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.0.json b/configs/solc-bin-zkevm-reference-0.8.0.json index c7df36ab..f78e9bf6 100644 --- a/configs/solc-bin-zkevm-reference-0.8.0.json +++ b/configs/solc-bin-zkevm-reference-0.8.0.json @@ -2,13 +2,15 @@ "binaries": { "0.8.0": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.0" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.1.json b/configs/solc-bin-zkevm-reference-0.8.1.json index 1e2a1c07..e14e3591 100644 --- a/configs/solc-bin-zkevm-reference-0.8.1.json +++ b/configs/solc-bin-zkevm-reference-0.8.1.json @@ -2,13 +2,15 @@ "binaries": { "0.8.1": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.1" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.10.json b/configs/solc-bin-zkevm-reference-0.8.10.json index 31de493f..536539d7 100644 --- a/configs/solc-bin-zkevm-reference-0.8.10.json +++ b/configs/solc-bin-zkevm-reference-0.8.10.json @@ -2,13 +2,15 @@ "binaries": { "0.8.10": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.10" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.11.json b/configs/solc-bin-zkevm-reference-0.8.11.json index 2fabc7f7..1c2e29ff 100644 --- a/configs/solc-bin-zkevm-reference-0.8.11.json +++ b/configs/solc-bin-zkevm-reference-0.8.11.json @@ -2,13 +2,15 @@ "binaries": { "0.8.11": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.11" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.12.json b/configs/solc-bin-zkevm-reference-0.8.12.json index 23c36cfb..740d00ec 100644 --- a/configs/solc-bin-zkevm-reference-0.8.12.json +++ b/configs/solc-bin-zkevm-reference-0.8.12.json @@ -2,13 +2,15 @@ "binaries": { "0.8.12": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.12" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.13.json b/configs/solc-bin-zkevm-reference-0.8.13.json index 01486927..0df8c085 100644 --- a/configs/solc-bin-zkevm-reference-0.8.13.json +++ b/configs/solc-bin-zkevm-reference-0.8.13.json @@ -2,13 +2,15 @@ "binaries": { "0.8.13": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.13" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.14.json b/configs/solc-bin-zkevm-reference-0.8.14.json index 1a73a210..7f0cabf3 100644 --- a/configs/solc-bin-zkevm-reference-0.8.14.json +++ b/configs/solc-bin-zkevm-reference-0.8.14.json @@ -2,13 +2,15 @@ "binaries": { "0.8.14": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.14" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.15.json b/configs/solc-bin-zkevm-reference-0.8.15.json index 53a34348..1c164e6d 100644 --- a/configs/solc-bin-zkevm-reference-0.8.15.json +++ b/configs/solc-bin-zkevm-reference-0.8.15.json @@ -2,13 +2,15 @@ "binaries": { "0.8.15": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.15" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.16.json b/configs/solc-bin-zkevm-reference-0.8.16.json index 45f64ece..c0675f5f 100644 --- a/configs/solc-bin-zkevm-reference-0.8.16.json +++ b/configs/solc-bin-zkevm-reference-0.8.16.json @@ -2,13 +2,15 @@ "binaries": { "0.8.16": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.16" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.17.json b/configs/solc-bin-zkevm-reference-0.8.17.json index 58d6b0d0..601cd26f 100644 --- a/configs/solc-bin-zkevm-reference-0.8.17.json +++ b/configs/solc-bin-zkevm-reference-0.8.17.json @@ -2,13 +2,15 @@ "binaries": { "0.8.17": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.17" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.18.json b/configs/solc-bin-zkevm-reference-0.8.18.json index b719023b..a75e9b38 100644 --- a/configs/solc-bin-zkevm-reference-0.8.18.json +++ b/configs/solc-bin-zkevm-reference-0.8.18.json @@ -2,13 +2,15 @@ "binaries": { "0.8.18": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.18" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.19.json b/configs/solc-bin-zkevm-reference-0.8.19.json index 14fe1585..4da5bf0d 100644 --- a/configs/solc-bin-zkevm-reference-0.8.19.json +++ b/configs/solc-bin-zkevm-reference-0.8.19.json @@ -2,13 +2,15 @@ "binaries": { "0.8.19": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.19" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.2.json b/configs/solc-bin-zkevm-reference-0.8.2.json index f12fe7c9..072ce4a0 100644 --- a/configs/solc-bin-zkevm-reference-0.8.2.json +++ b/configs/solc-bin-zkevm-reference-0.8.2.json @@ -2,13 +2,15 @@ "binaries": { "0.8.2": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.2" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.20.json b/configs/solc-bin-zkevm-reference-0.8.20.json index 45979ba0..c545ba13 100644 --- a/configs/solc-bin-zkevm-reference-0.8.20.json +++ b/configs/solc-bin-zkevm-reference-0.8.20.json @@ -2,13 +2,15 @@ "binaries": { "0.8.20": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.20" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.21.json b/configs/solc-bin-zkevm-reference-0.8.21.json index 05565fe8..1851be1b 100644 --- a/configs/solc-bin-zkevm-reference-0.8.21.json +++ b/configs/solc-bin-zkevm-reference-0.8.21.json @@ -2,13 +2,15 @@ "binaries": { "0.8.21": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.21" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.22.json b/configs/solc-bin-zkevm-reference-0.8.22.json index 4aabf118..f8016e3e 100644 --- a/configs/solc-bin-zkevm-reference-0.8.22.json +++ b/configs/solc-bin-zkevm-reference-0.8.22.json @@ -2,13 +2,15 @@ "binaries": { "0.8.22": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.22" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.23.json b/configs/solc-bin-zkevm-reference-0.8.23.json index ace07352..1c41ec57 100644 --- a/configs/solc-bin-zkevm-reference-0.8.23.json +++ b/configs/solc-bin-zkevm-reference-0.8.23.json @@ -2,13 +2,15 @@ "binaries": { "0.8.23": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.23" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.24.json b/configs/solc-bin-zkevm-reference-0.8.24.json new file mode 100644 index 00000000..b6a4a765 --- /dev/null +++ b/configs/solc-bin-zkevm-reference-0.8.24.json @@ -0,0 +1,16 @@ +{ + "binaries": { + "0.8.24": { + "is_enabled": true, + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" + } + }, + "platforms": { + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" + } +} diff --git a/configs/solc-bin-zkevm-reference-0.8.3.json b/configs/solc-bin-zkevm-reference-0.8.3.json index 90a48950..dd53fd62 100644 --- a/configs/solc-bin-zkevm-reference-0.8.3.json +++ b/configs/solc-bin-zkevm-reference-0.8.3.json @@ -2,13 +2,15 @@ "binaries": { "0.8.3": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.3" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.4.json b/configs/solc-bin-zkevm-reference-0.8.4.json index 96d108ea..dddb0e3d 100644 --- a/configs/solc-bin-zkevm-reference-0.8.4.json +++ b/configs/solc-bin-zkevm-reference-0.8.4.json @@ -2,13 +2,15 @@ "binaries": { "0.8.4": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.4" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.5.json b/configs/solc-bin-zkevm-reference-0.8.5.json index b03d94bc..a42f64cf 100644 --- a/configs/solc-bin-zkevm-reference-0.8.5.json +++ b/configs/solc-bin-zkevm-reference-0.8.5.json @@ -2,13 +2,15 @@ "binaries": { "0.8.5": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.5" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.6.json b/configs/solc-bin-zkevm-reference-0.8.6.json index c907aa78..366bbf7f 100644 --- a/configs/solc-bin-zkevm-reference-0.8.6.json +++ b/configs/solc-bin-zkevm-reference-0.8.6.json @@ -2,13 +2,15 @@ "binaries": { "0.8.6": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.6" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.7.json b/configs/solc-bin-zkevm-reference-0.8.7.json index de451713..b961a5ae 100644 --- a/configs/solc-bin-zkevm-reference-0.8.7.json +++ b/configs/solc-bin-zkevm-reference-0.8.7.json @@ -2,13 +2,15 @@ "binaries": { "0.8.7": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.7" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.8.json b/configs/solc-bin-zkevm-reference-0.8.8.json index ca96ccc5..4379448d 100644 --- a/configs/solc-bin-zkevm-reference-0.8.8.json +++ b/configs/solc-bin-zkevm-reference-0.8.8.json @@ -2,13 +2,15 @@ "binaries": { "0.8.8": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.8" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/solc-bin-zkevm-reference-0.8.9.json b/configs/solc-bin-zkevm-reference-0.8.9.json index 9d50570f..8153ac7c 100644 --- a/configs/solc-bin-zkevm-reference-0.8.9.json +++ b/configs/solc-bin-zkevm-reference-0.8.9.json @@ -2,13 +2,15 @@ "binaries": { "0.8.9": { "is_enabled": true, - "protocol": "solc-bin-list", - "source": "https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/${PLATFORM}/list.json", - "destination": "./solc-bin/solc-0.8.9" + "protocol": "https", + "source": "https://github.com/matter-labs/era-solidity/releases/download/${VERSION}-1.0.0/solc-${PLATFORM}-${VERSION}-1.0.0", + "destination": "./solc-bin/solc-${VERSION}" } }, "platforms": { - "linux": "linux-amd64", - "macos": "macosx-amd64" + "linux-amd64": "linux-amd64", + "linux-arm64": "linux-arm64", + "macos-amd64": "macosx-amd64", + "macos-arm64": "macosx-arm64" } } diff --git a/configs/vyper-bin-default.json b/configs/vyper-bin-default.json index ecc03e0f..a9e7b171 100644 --- a/configs/vyper-bin-default.json +++ b/configs/vyper-bin-default.json @@ -20,7 +20,8 @@ } }, "platforms": { - "linux": "linux", - "macos": "darwin" + "linux-amd64": "linux", + "macos-amd64": "darwin", + "macos-arm64": "darwin" } } diff --git a/coverage_watcher/Cargo.toml b/coverage_watcher/Cargo.toml index 4be6266b..18274203 100644 --- a/coverage_watcher/Cargo.toml +++ b/coverage_watcher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "coverage-watcher" -version = "1.3.3" +version = "1.4.1" authors = [ "Oleksandr Zarudnyi ", "Anton Dyadyuk ", @@ -20,4 +20,4 @@ anyhow = "1.0" serde = { version = "1.0", features = [ "derive" ] } serde_yaml = "0.9" -compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" } +era-compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" } diff --git a/coverage_watcher/src/coverage_watcher/main.rs b/coverage_watcher/src/coverage_watcher/main.rs index 2a406b95..8eeab2ec 100644 --- a/coverage_watcher/src/coverage_watcher/main.rs +++ b/coverage_watcher/src/coverage_watcher/main.rs @@ -36,7 +36,7 @@ fn main() -> anyhow::Result<()> { name: "solidity/simple".to_string(), directories: vec![TestsDirectory { path: PathBuf::from("tests/solidity/simple"), - extension: compiler_common::EXTENSION_SOLIDITY.to_string(), + extension: era_compiler_common::EXTENSION_SOLIDITY.to_string(), flatten: false, }], }, @@ -44,7 +44,7 @@ fn main() -> anyhow::Result<()> { name: "vyper/simple".to_string(), directories: vec![TestsDirectory { path: PathBuf::from("tests/vyper/simple"), - extension: compiler_common::EXTENSION_VYPER.to_string(), + extension: era_compiler_common::EXTENSION_VYPER.to_string(), flatten: false, }], }, @@ -54,7 +54,7 @@ fn main() -> anyhow::Result<()> { name: "solidity/complex".to_string(), directories: vec![TestsDirectory { path: PathBuf::from("tests/solidity/complex"), - extension: compiler_common::EXTENSION_JSON.to_string(), + extension: era_compiler_common::EXTENSION_JSON.to_string(), flatten: false, }], }, @@ -62,7 +62,7 @@ fn main() -> anyhow::Result<()> { name: "vyper/complex".to_string(), directories: vec![TestsDirectory { path: PathBuf::from("tests/vyper/complex"), - extension: compiler_common::EXTENSION_JSON.to_string(), + extension: era_compiler_common::EXTENSION_JSON.to_string(), flatten: false, }], }, @@ -72,7 +72,7 @@ fn main() -> anyhow::Result<()> { name: "solidity/external".to_string(), directories: vec![TestsDirectory { path: PathBuf::from("solidity/test/libsolidity/semanticTests"), - extension: compiler_common::EXTENSION_SOLIDITY.to_string(), + extension: era_compiler_common::EXTENSION_SOLIDITY.to_string(), flatten: false, }], }, @@ -81,12 +81,12 @@ fn main() -> anyhow::Result<()> { directories: vec![ TestsDirectory { path: PathBuf::from("tests/vyper/external"), - extension: compiler_common::EXTENSION_VYPER.to_string(), + extension: era_compiler_common::EXTENSION_VYPER.to_string(), flatten: false, }, TestsDirectory { path: PathBuf::from("tests/vyper/complex/external"), - extension: compiler_common::EXTENSION_JSON.to_string(), + extension: era_compiler_common::EXTENSION_JSON.to_string(), flatten: true, }, ], diff --git a/era-contracts b/era-contracts new file mode 160000 index 00000000..2dfbc6ba --- /dev/null +++ b/era-contracts @@ -0,0 +1 @@ +Subproject commit 2dfbc6bac84ecada93cab4a0dea113bc2aceba1c diff --git a/solidity b/solidity index 58811f13..cc79c91b 160000 --- a/solidity +++ b/solidity @@ -1 +1 @@ -Subproject commit 58811f134ac369b20c2ec1120907321edf08fff1 +Subproject commit cc79c91b93d322cd38beec08a1ce575d3622c7e4 diff --git a/solidity_adapter/Cargo.toml b/solidity_adapter/Cargo.toml index 0849e5fd..9caaf456 100644 --- a/solidity_adapter/Cargo.toml +++ b/solidity_adapter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "solidity-adapter" -version = "1.3.3" +version = "1.4.1" authors = [ "Oleksandr Zarudnyi ", "Anton Dyadyuk ", @@ -27,7 +27,7 @@ semver = { version = "1.0", features = [ "serde" ] } regex = "1.7" md5 = "0.7" -compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" } +era-compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" } [dependencies.web3] version = "0.19" diff --git a/solidity_adapter/src/lib.rs b/solidity_adapter/src/lib.rs index 921412a3..6c86c190 100644 --- a/solidity_adapter/src/lib.rs +++ b/solidity_adapter/src/lib.rs @@ -43,9 +43,10 @@ pub fn account_address(index: usize) -> web3::types::Address { let address = web3::types::U256::from_str(ZERO_ADDRESS).expect("Default address"); let address = address.add(index * ADDRESS_INDEX_MULTIPLIER); - let mut bytes = [0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut bytes = [0u8; era_compiler_common::BYTE_LENGTH_FIELD]; address.to_big_endian(&mut bytes); web3::types::Address::from_slice( - &bytes[compiler_common::BYTE_LENGTH_FIELD - compiler_common::BYTE_LENGTH_ETH_ADDRESS..], + &bytes[era_compiler_common::BYTE_LENGTH_FIELD + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS..], ) } diff --git a/solidity_adapter/src/test/function_call/mod.rs b/solidity_adapter/src/test/function_call/mod.rs index 96c37b1e..8c513209 100644 --- a/solidity_adapter/src/test/function_call/mod.rs +++ b/solidity_adapter/src/test/function_call/mod.rs @@ -201,7 +201,7 @@ impl TryFrom for FunctionCall { Ok(Self::IsoltestSideEffectsTest { input, expected }) } "balance" => { - if input.len() > compiler_common::BYTE_LENGTH_FIELD { + if input.len() > era_compiler_common::BYTE_LENGTH_FIELD { anyhow::bail!("balance function expect one or zero element"); } if expected.len() != 1 { @@ -214,8 +214,8 @@ impl TryFrom for FunctionCall { if !input .iter() .take( - compiler_common::BYTE_LENGTH_FIELD - - compiler_common::BYTE_LENGTH_ETH_ADDRESS, + era_compiler_common::BYTE_LENGTH_FIELD + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS, ) .all(|byte| byte.eq(&0)) { @@ -224,8 +224,8 @@ impl TryFrom for FunctionCall { ); } Some(web3::types::Address::from_slice( - &input[compiler_common::BYTE_LENGTH_FIELD - - compiler_common::BYTE_LENGTH_ETH_ADDRESS..], + &input[era_compiler_common::BYTE_LENGTH_FIELD + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS..], )) }, expected: expected.into_iter().next().expect("Always valid"), @@ -251,7 +251,7 @@ impl TryFrom for FunctionCall { }) } "account" => { - if input.len() != compiler_common::BYTE_LENGTH_FIELD { + if input.len() != era_compiler_common::BYTE_LENGTH_FIELD { anyhow::bail!("account function expect one element"); } if expected.len() != 1 { @@ -265,13 +265,13 @@ impl TryFrom for FunctionCall { } let input = web3::types::U256::from_big_endian(input.as_slice()); let expected = expected.into_iter().next().expect("Always valid"); - let mut expected_bytes = [0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut expected_bytes = [0u8; era_compiler_common::BYTE_LENGTH_FIELD]; expected.to_big_endian(&mut expected_bytes); Ok(Self::Account { input: input.as_usize(), expected: web3::types::Address::from_slice( &expected_bytes[expected_bytes.len() - - compiler_common::BYTE_LENGTH_ETH_ADDRESS..], + - era_compiler_common::BYTE_LENGTH_ETH_ADDRESS..], ), }) } @@ -347,9 +347,9 @@ fn signature(identifier: Option, types: Option>) -> String /// fn bytes_as_u256(bytes: &[u8]) -> Vec { let mut result = Vec::new(); - for value in bytes.chunks(compiler_common::BYTE_LENGTH_FIELD) { + for value in bytes.chunks(era_compiler_common::BYTE_LENGTH_FIELD) { let mut value = value.to_owned(); - while value.len() < compiler_common::BYTE_LENGTH_FIELD { + while value.len() < era_compiler_common::BYTE_LENGTH_FIELD { value.push(0); } result.push(web3::types::U256::from_big_endian(value.as_slice())); diff --git a/solidity_adapter/src/test/function_call/parser/lexical/mod.rs b/solidity_adapter/src/test/function_call/parser/lexical/mod.rs index 6a2aca22..1047b449 100644 --- a/solidity_adapter/src/test/function_call/parser/lexical/mod.rs +++ b/solidity_adapter/src/test/function_call/parser/lexical/mod.rs @@ -11,7 +11,6 @@ mod token; pub use self::error::Error; pub use self::stream::TokenStream; -pub use self::token::lexeme::identifier::Identifier; pub use self::token::lexeme::keyword::Keyword; pub use self::token::lexeme::literal::boolean::Boolean as BooleanLiteral; pub use self::token::lexeme::literal::hex::Hex as HexLiteral; diff --git a/solidity_adapter/src/test/function_call/parser/lexical/stream/word/tests.rs b/solidity_adapter/src/test/function_call/parser/lexical/stream/word/tests.rs index 8a1543f1..46561a09 100644 --- a/solidity_adapter/src/test/function_call/parser/lexical/stream/word/tests.rs +++ b/solidity_adapter/src/test/function_call/parser/lexical/stream/word/tests.rs @@ -76,7 +76,7 @@ fn ok_keyword_unsigned_integer_max() { let expected = Output::new( input.len(), Lexeme::Keyword(Keyword::new_integer_unsigned( - compiler_common::BIT_LENGTH_FIELD, + era_compiler_common::BIT_LENGTH_FIELD, )), ); let result = parse(input); diff --git a/solidity_adapter/src/test/function_call/parser/lexical/token/lexeme/keyword.rs b/solidity_adapter/src/test/function_call/parser/lexical/token/lexeme/keyword.rs index 0833da86..afe1da02 100644 --- a/solidity_adapter/src/test/function_call/parser/lexical/token/lexeme/keyword.rs +++ b/solidity_adapter/src/test/function_call/parser/lexical/token/lexeme/keyword.rs @@ -75,11 +75,11 @@ pub enum Keyword { impl Keyword { /// The range including the minimal and maximal integer bit-lengths. pub const INTEGER_BIT_LENGTH_RANGE: RangeInclusive = - compiler_common::BIT_LENGTH_BYTE..=compiler_common::BIT_LENGTH_FIELD; + era_compiler_common::BIT_LENGTH_BYTE..=era_compiler_common::BIT_LENGTH_FIELD; /// The range including the minimal and maximal bytes byte-lengths. pub const BYTES_BYTE_LENGTH_RANGE: RangeInclusive = - compiler_common::BYTE_LENGTH_BYTE..=compiler_common::BYTE_LENGTH_FIELD; + era_compiler_common::BYTE_LENGTH_BYTE..=era_compiler_common::BYTE_LENGTH_FIELD; /// /// Creates a `uint{N}` keyword. @@ -180,10 +180,10 @@ impl TryFrom<&str> for Keyword { Self::INTEGER_BIT_LENGTH_RANGE, )); } - if bit_length % compiler_common::BIT_LENGTH_BYTE != 0 { + if bit_length % era_compiler_common::BIT_LENGTH_BYTE != 0 { return Err(Error::IntegerBitLengthNotMultipleOfEight( bit_length, - compiler_common::BIT_LENGTH_BYTE, + era_compiler_common::BIT_LENGTH_BYTE, )); } return Ok(Self::new_integer_unsigned(bit_length)); @@ -203,10 +203,10 @@ impl TryFrom<&str> for Keyword { Self::INTEGER_BIT_LENGTH_RANGE, )); } - if bit_length % compiler_common::BIT_LENGTH_BYTE != 0 { + if bit_length % era_compiler_common::BIT_LENGTH_BYTE != 0 { return Err(Error::IntegerBitLengthNotMultipleOfEight( bit_length, - compiler_common::BIT_LENGTH_BYTE, + era_compiler_common::BIT_LENGTH_BYTE, )); } return Ok(Self::new_integer_signed(bit_length)); diff --git a/solidity_adapter/src/test/function_call/parser/mod.rs b/solidity_adapter/src/test/function_call/parser/mod.rs index cfd70c0a..e258099a 100644 --- a/solidity_adapter/src/test/function_call/parser/mod.rs +++ b/solidity_adapter/src/test/function_call/parser/mod.rs @@ -5,28 +5,13 @@ mod lexical; mod syntax; -pub use lexical::BooleanLiteral as LexicalBooleanLiteral; -pub use lexical::Error as LexicalError; -pub use lexical::HexLiteral as LexicalHexLiteral; -pub use lexical::IntegerLiteral as LexicalIntegerLiteral; -pub use lexical::StringLiteral as LexicalStringLiteral; -pub use syntax::Alignment; -pub use syntax::BooleanLiteral; pub use syntax::Call; pub use syntax::CallVariant; -pub use syntax::Error as SyntaxError; pub use syntax::Event; pub use syntax::EventVariant; pub use syntax::Gas; pub use syntax::GasVariant; -pub use syntax::HexLiteral; pub use syntax::Identifier; -pub use syntax::IntegerLiteral; -pub use syntax::Literal; pub use syntax::Parser; -pub use syntax::ParsingError; -pub use syntax::StringLiteral; pub use syntax::Type; -pub use syntax::TypeVariant; pub use syntax::Unit; -pub use syntax::Value; diff --git a/solidity_adapter/src/test/function_call/parser/syntax/mod.rs b/solidity_adapter/src/test/function_call/parser/syntax/mod.rs index 1795b154..661bfdbc 100644 --- a/solidity_adapter/src/test/function_call/parser/syntax/mod.rs +++ b/solidity_adapter/src/test/function_call/parser/syntax/mod.rs @@ -6,8 +6,6 @@ mod error; mod parser; mod tree; -pub use self::error::Error; -pub use self::error::ParsingError; pub use self::parser::Parser; pub use self::tree::call::variant::Variant as CallVariant; pub use self::tree::call::Call; @@ -16,13 +14,5 @@ pub use self::tree::event::Event; pub use self::tree::gas::variant::Variant as GasVariant; pub use self::tree::gas::Gas; pub use self::tree::identifier::Identifier; -pub use self::tree::literal::alignment::Alignment; -pub use self::tree::literal::boolean::Literal as BooleanLiteral; -pub use self::tree::literal::hex::Literal as HexLiteral; -pub use self::tree::literal::integer::Literal as IntegerLiteral; -pub use self::tree::literal::string::Literal as StringLiteral; -pub use self::tree::literal::Literal; -pub use self::tree::r#type::variant::Variant as TypeVariant; pub use self::tree::r#type::Type; pub use self::tree::value::unit::Unit; -pub use self::tree::value::Value; diff --git a/solidity_adapter/src/test/function_call/parser/syntax/parser/event.rs b/solidity_adapter/src/test/function_call/parser/syntax/parser/event.rs index 96e7e24e..d0cbdc17 100644 --- a/solidity_adapter/src/test/function_call/parser/syntax/parser/event.rs +++ b/solidity_adapter/src/test/function_call/parser/syntax/parser/event.rs @@ -339,9 +339,6 @@ impl Parser { #[cfg(test)] mod tests { - - use crate::test::function_call::parser::lexical::Identifier as LexicalIdentifier; - use crate::test::function_call::parser::lexical::Lexeme; use crate::test::function_call::parser::lexical::Location; diff --git a/solidity_adapter/src/test/function_call/parser/syntax/parser/type/tuple.rs b/solidity_adapter/src/test/function_call/parser/syntax/parser/type/tuple.rs index 62c0a01d..70619529 100644 --- a/solidity_adapter/src/test/function_call/parser/syntax/parser/type/tuple.rs +++ b/solidity_adapter/src/test/function_call/parser/syntax/parser/type/tuple.rs @@ -163,7 +163,7 @@ mod tests { TypeVariant::tuple(vec![ Type::new( Location::test(1, 2), - TypeVariant::integer_unsigned(compiler_common::BIT_LENGTH_FIELD), + TypeVariant::integer_unsigned(era_compiler_common::BIT_LENGTH_FIELD), ), Type::new(Location::test(1, 11), TypeVariant::tuple(Vec::new())), Type::new( diff --git a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/boolean.rs b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/boolean.rs index 02b2df8a..6ee818c6 100644 --- a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/boolean.rs +++ b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/boolean.rs @@ -35,7 +35,7 @@ impl Literal { /// Converts literal to bytes. /// pub fn as_bytes_be(&self) -> Vec { - let mut result = vec![0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut result = vec![0u8; era_compiler_common::BYTE_LENGTH_FIELD]; if self.inner == LexicalBooleanLiteral::True { if self.alignment == Alignment::Left { result[0] = 1; diff --git a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/hex.rs b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/hex.rs index 7221d217..24827e6f 100644 --- a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/hex.rs +++ b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/hex.rs @@ -37,7 +37,7 @@ impl Literal { /// Converts literal to bytes. /// pub fn as_bytes_be(&self) -> Vec { - let mut result = vec![0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut result = vec![0u8; era_compiler_common::BYTE_LENGTH_FIELD]; web3::types::U256::from_str(self.inner.inner.as_str()) .expect("Always valid") .to_big_endian(&mut result); diff --git a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/integer.rs b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/integer.rs index fed3c492..b513bf48 100644 --- a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/integer.rs +++ b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/integer.rs @@ -39,7 +39,7 @@ impl Literal { /// Converts literal to bytes. /// pub fn as_bytes_be(&self) -> Vec { - let mut result = vec![0u8; compiler_common::BYTE_LENGTH_FIELD]; + let mut result = vec![0u8; era_compiler_common::BYTE_LENGTH_FIELD]; match &self.inner { LexicalIntegerLiteral::Decimal { inner, negative } => { let mut number = @@ -63,9 +63,12 @@ impl Literal { } } if self.alignment == Alignment::Left { - result.extend(vec![0; compiler_common::BYTE_LENGTH_FIELD - result.len()]); + result.extend(vec![ + 0; + era_compiler_common::BYTE_LENGTH_FIELD - result.len() + ]); } else { - let mut zeroes = vec![0; compiler_common::BYTE_LENGTH_FIELD - result.len()]; + let mut zeroes = vec![0; era_compiler_common::BYTE_LENGTH_FIELD - result.len()]; zeroes.extend(result); result = zeroes; } diff --git a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/string.rs b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/string.rs index cc198c2a..5f781b92 100644 --- a/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/string.rs +++ b/solidity_adapter/src/test/function_call/parser/syntax/tree/literal/string.rs @@ -93,9 +93,9 @@ impl Literal { anyhow::bail!("Unterminated escape sequence"); } let mut pad_len = 0; - if result.len() % compiler_common::BYTE_LENGTH_FIELD != 0 || result.is_empty() { - pad_len = compiler_common::BYTE_LENGTH_FIELD - - result.len() % compiler_common::BYTE_LENGTH_FIELD; + if result.len() % era_compiler_common::BYTE_LENGTH_FIELD != 0 || result.is_empty() { + pad_len = era_compiler_common::BYTE_LENGTH_FIELD + - result.len() % era_compiler_common::BYTE_LENGTH_FIELD; } if self.alignment == Alignment::Right { let mut zeroes = vec![0; pad_len]; diff --git a/solidity_adapter/src/test/mod.rs b/solidity_adapter/src/test/mod.rs index 4e2a4f8b..d631f1b6 100644 --- a/solidity_adapter/src/test/mod.rs +++ b/solidity_adapter/src/test/mod.rs @@ -41,7 +41,7 @@ impl TryFrom<&Path> for Test { let comment_start = if path .extension() .ok_or_else(|| anyhow::anyhow!("Failed to get file extension"))? - == compiler_common::EXTENSION_VYPER + == era_compiler_common::EXTENSION_VYPER { "# ".to_owned() } else { @@ -123,13 +123,10 @@ fn process_sources(data: &str, path: &Path) -> anyhow::Result ( captures.get(1).expect("Always exists").as_str().to_owned(), - PathBuf::try_from(captures.get(2).expect("Always exists").as_str()), + PathBuf::from(captures.get(2).expect("Always exists").as_str()), ), - None => (data.to_owned(), PathBuf::try_from(data)), + None => (data.to_owned(), PathBuf::from(data)), }; - let relative_path = relative_path.map_err(|err| { - anyhow::anyhow!("Invalid path on line {}: {}", index + 1, err) - })?; let path = path .parent() diff --git a/solidity_adapter/src/test/params/evm_version.rs b/solidity_adapter/src/test/params/evm_version.rs index fa058bc8..b21ea982 100644 --- a/solidity_adapter/src/test/params/evm_version.rs +++ b/solidity_adapter/src/test/params/evm_version.rs @@ -105,6 +105,8 @@ pub enum EVM { Paris, /// Shanghai EVM version. Shanghai, + /// Cancun EVM version. + Cancun, } impl TryFrom<&str> for EVM { @@ -123,6 +125,7 @@ impl TryFrom<&str> for EVM { "london" => EVM::London, "paris" => EVM::Paris, "shanghai" => EVM::Shanghai, + "cancun" => EVM::Cancun, _ => anyhow::bail!("Invalid EVM: {}", value), }) } diff --git a/system-contracts b/system-contracts deleted file mode 160000 index 408dffdf..00000000 --- a/system-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 408dffdf089a81183daada55f6a5cacacc4cde1c diff --git a/system-contracts-stable-build b/system-contracts-stable-build index 67b04b6a..b559b130 100644 Binary files a/system-contracts-stable-build and b/system-contracts-stable-build differ diff --git a/tests b/tests index 78314c55..102f0fdd 160000 --- a/tests +++ b/tests @@ -1 +1 @@ -Subproject commit 78314c558db4c052412dfc93590bd45272e02283 +Subproject commit 102f0fddf185b9b6eaf1a96ab9c2693c1f05ed56