-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebase downstream patches onto 0.8.24
- Loading branch information
Showing
98 changed files
with
2,200 additions
and
1,005 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,39 @@ | ||
--- | ||
name: Bug Report | ||
about: Problems, deficiencies, inaccuracies or crashes discovered on Solidity. | ||
name: Bug report | ||
about: Use this template for reporting issues | ||
title: '' | ||
labels: 'bug :bug:' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!--## Prerequisites | ||
### 🐛 Bug Report | ||
|
||
#### 📝 Description | ||
|
||
Provide a clear and concise description of the bug. | ||
|
||
#### 🔄 Reproduction Steps | ||
|
||
- First, many thanks for taking part in the community. We really appreciate that. | ||
- We realize there is a lot of information requested here. We ask only that you do your best to provide as much information as possible so we can better help you. | ||
- Support questions are better asked in one of the following locations: | ||
- [Solidity chat](https://gitter.im/ethereum/solidity) | ||
- [Stack Overflow](https://ethereum.stackexchange.com/) | ||
- Ensure the issue isn't already reported. | ||
- The issue should be reproducible with the latest solidity version; however, this isn't a hard requirement and being reproducible with an older version is sufficient. | ||
Steps to reproduce the behaviour | ||
|
||
*Delete the above section and the instructions in the sections below before submitting* | ||
--> | ||
#### 🤔 Expected Behavior | ||
|
||
## Description | ||
Describe what you expected to happen. | ||
|
||
<!--Please shortly describe the bug you have found, and what you expect instead.--> | ||
#### 😯 Current Behavior | ||
|
||
## Environment | ||
Describe what actually happened. | ||
|
||
- Compiler version: | ||
- Target EVM version (as per compiler settings): | ||
- Framework/IDE (e.g. Truffle or Remix): | ||
- EVM execution environment / backend / blockchain client: | ||
- Operating system: | ||
#### 🖥️ Environment | ||
|
||
## Steps to Reproduce | ||
Any relevant environment details. | ||
|
||
<!-- | ||
Please provide a *minimal* source code example to trigger the bug you have found. | ||
Please also mention any command-line flags that are necessary for triggering the bug. | ||
Provide as much information as necessary to reproduce the bug. | ||
#### 📋 Additional Context | ||
|
||
```solidity | ||
// Some *minimal* Solidity source code to reproduce the bug. | ||
// ... | ||
Add any other context about the problem here. If applicable, add screenshots to help explain. | ||
|
||
#### 📎 Log Output | ||
|
||
``` | ||
Paste any relevant log output here. | ||
``` | ||
--> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,21 @@ | ||
--- | ||
name: Feature Request | ||
about: Ideas, comments or messages asking for a particular functionality to be added | ||
to Solidity. | ||
name: Feature request | ||
about: Use this template for requesting features | ||
title: '' | ||
labels: feature | ||
labels: feat | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!--## Prerequisites | ||
- First, many thanks for taking part in the community. We really appreciate that. | ||
- We realize there is a lot of data requested here. We ask only that you do your best to provide as much information as possible so we can better help you. | ||
- Support questions are better asked in one of the following locations: | ||
- [Solidity chat](https://gitter.im/ethereum/solidity) | ||
- [Stack Overflow](https://ethereum.stackexchange.com/) | ||
- Ensure the issue isn't already reported (check `feature` and `language design` labels). | ||
- If you feel uncertain about your feature request, perhaps it's better to open a language design or feedback forum thread via the issue selector, or by going to the forum directly. | ||
- [Solidity forum](https://forum.soliditylang.org/) | ||
*Delete the above section and the instructions in the sections below before submitting* | ||
--> | ||
|
||
## Abstract | ||
|
||
<!--Please describe by example what problem you see in the current Solidity language and reason about it.--> | ||
|
||
## Motivation | ||
### 🌟 Feature Request | ||
|
||
<!--In this section you describe how you propose to address the problem you described earlier, including by giving one or more exemplary source code snippets for demonstration.--> | ||
#### 📝 Description | ||
|
||
## Specification | ||
Provide a clear and concise description of the feature you'd like to see. | ||
|
||
<!--The technical specification should describe the syntax and semantics of any new feature. The specification should be detailed enough to allow any developer to implement the functionality.--> | ||
#### 🤔 Rationale | ||
|
||
## Backwards Compatibility | ||
Explain why this feature is important and how it benefits the project. | ||
|
||
<!-- | ||
All language changes that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. | ||
#### 📋 Additional Context | ||
|
||
Please describe how you propose to deal with these incompatibilities. | ||
--> | ||
Add any other context or information about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# What ❔ | ||
|
||
<!-- What are the changes this PR brings about? --> | ||
<!-- Example: This PR adds a PR template to the repo. --> | ||
<!-- (For bigger PRs adding more context is appreciated) --> | ||
|
||
## Why ❔ | ||
|
||
<!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> | ||
<!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> | ||
|
||
## Checklist | ||
|
||
<!-- Check your PR fulfills the following items. --> | ||
<!-- For draft PRs check the boxes as you complete them. --> | ||
|
||
- [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). | ||
- [ ] Tests for the changes have been added / updated. | ||
- [ ] Documentation comments have been added / updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
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: [self-hosted, ci-runner-compiler] | ||
container: | ||
image: matterlabs/llvm_runner:latest | ||
credentials: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
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 || 'tests/solidity/' }}" >> $GITHUB_ENV | ||
echo "CANDIDATE_BRANCH_NAME=${{ github.event.inputs.compiler_tester_candidate_branch }}" >> $GITHUB_ENV | ||
- name: Getting the branch name (pull request) | ||
if: github.event_name == 'pull_request' | ||
shell: bash | ||
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Checking out the Solidity repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
path: solidity | ||
|
||
- name: Checking out the compiler-tester candidate | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: matter-labs/era-compiler-tester | ||
submodules: recursive | ||
path: compiler-tester | ||
|
||
- name: Building the Solidity compiler | ||
working-directory: solidity | ||
run: | | ||
mkdir -p ./build | ||
cd ./build | ||
cmake .. -DCMAKE_BUILD_TYPE='Release' -DSOLC_VERSION_ZKEVM='1.0.0-lts' -DPEDANTIC=OFF -DCMAKE_CXX_FLAGS='-w' -DUSE_Z3=OFF -DUSE_CVC4=OFF | ||
make -j$(nproc) | ||
- name: Benchmarking the Solidity compiler candidate | ||
id: compiler_tester_run | ||
working-directory: compiler-tester | ||
run: | | ||
mkdir -p './solc-bin/' | ||
cp '../solidity/build/solc/solc' "./solc-bin/solc-${BRANCH_NAME}" | ||
chmod +x "./solc-bin/solc-${BRANCH_NAME}" | ||
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' \ | ||
--solc-bin-config-path="configs/solc-bin-zkevm-candidate-${BRANCH_NAME}.json" | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: candidate-benchmark | ||
path: compiler-tester/candidate.json | ||
|
||
benchmarks_reference: | ||
runs-on: [self-hosted, ci-runner-compiler] | ||
container: | ||
image: matterlabs/llvm_runner:latest | ||
credentials: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
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 || 'tests/solidity/' }}" >> $GITHUB_ENV | ||
echo "REFERENCE_BRANCH_NAME=${{ github.event.inputs.compiler_tester_reference_branch }}" >> $GITHUB_ENV | ||
- name: Getting the branch name (pull request) | ||
if: github.event_name == 'pull_request' | ||
shell: bash | ||
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Checking out the Solidity repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
path: solidity | ||
|
||
- name: Checking out the compiler-tester reference | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: matter-labs/era-compiler-tester | ||
ref: main | ||
submodules: recursive | ||
path: compiler-tester | ||
|
||
- name: Benchmarking the Solidity compiler reference | ||
working-directory: compiler-tester | ||
id: compiler_tester_run | ||
run: | | ||
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' \ | ||
--solc-bin-config-path="configs/solc-bin-zkevm-reference-${BRANCH_NAME}.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: Getting the branch name (pull request) | ||
if: github.event_name == 'pull_request' | ||
shell: bash | ||
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Checking out the compiler-tester repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: matter-labs/era-compiler-tester | ||
submodules: recursive | ||
path: compiler-tester | ||
|
||
- 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: Comparing the benchmark 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: Posting the benchmark results to the step summary | ||
run: | | ||
printf "Benchmark results:\n" >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat ./compiler-tester/result.txt >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat $GITHUB_STEP_SUMMARY > ./compiler-tester/result.txt | ||
- name: Posting the benchmark results to a PR comment | ||
if: github.event_name == 'pull_request' | ||
uses: mshick/add-pr-comment@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
message-path: ./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 |
Oops, something went wrong.