-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feat/cancun
- Loading branch information
Showing
23 changed files
with
1,724 additions
and
121 deletions.
There are no files selected for viewing
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
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,85 @@ | ||
name: Jerigon Integration | ||
|
||
on: | ||
push: | ||
branches: [develop, main] | ||
pull_request: | ||
branches: | ||
- "**" | ||
workflow_dispatch: | ||
branches: | ||
- "**" | ||
|
||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
test_jerigon_input_proving: | ||
name: Test proof generation with jerigon input | ||
runs-on: zero-ci | ||
timeout-minutes: 40 | ||
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout test-jerigon-network sources | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 0xPolygonZero/jerigon-test-network | ||
path: test-jerigon-network | ||
|
||
- name: Install nightly toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Run jerigon test network with docker compose | ||
run: | | ||
cd test-jerigon-network | ||
docker-compose -f docker-compose.yml up -d | ||
docker logs -f smart-contracts | ||
echo "Jerigon network is up and running, ready for testing" | ||
- name: Rpc test with curl | ||
run: | | ||
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id":83}' localhost:8545 | ||
env: | ||
RUST_LOG: info | ||
|
||
- name: Run prove blocks in test_only mode | ||
run: | | ||
cd zero_bin/tools | ||
OUTPUT_TO_TERMINAL=true ./prove_rpc.sh 0x2 0x3 http://localhost:8546 jerigon true 0 0 test_only | ||
echo "Proving blocks in test_only mode finished" | ||
- name: Run prove blocks in real mode | ||
run: | | ||
cd zero_bin/tools | ||
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out | ||
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./prove_rpc.sh 0x4 0x5 http://localhost:8546 jerigon true | ||
echo "Proving blocks in real mode finished" | ||
- name: Shut down network | ||
run: | | ||
cd test-jerigon-network | ||
docker-compose -f docker-compose.yml down -v | ||
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,56 @@ | ||
name: PR check | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
pr_check: | ||
name: Validate PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up keywords | ||
id: setup_keywords | ||
run: echo "RESTRICTED_KEYWORDS=$(echo '${{ secrets.RESTRICTED_KEYWORDS }}' | jq -r '.[]' | tr '\n' ' ')" >> $GITHUB_ENV | ||
|
||
- name: Check for spam PR | ||
id: check | ||
run: | | ||
# Initialize variables to track spam presence | ||
title_is_spam=false | ||
description_is_spam=false | ||
# Check title for spam | ||
for keyword in $RESTRICTED_KEYWORDS; do | ||
if echo "${{ github.event.pull_request.title }}" | grep -i -q "$keyword"; then | ||
title_is_spam=true | ||
break | ||
fi | ||
done | ||
# Check description for spam | ||
for keyword in $RESTRICTED_KEYWORDS; do | ||
if echo "${{ github.event.pull_request.body }}" | grep -i -q "$keyword"; then | ||
description_is_spam=true | ||
break | ||
fi | ||
done | ||
# Set the output based on the presence of spam | ||
if [ "$title_is_spam" = true ] || [ "$description_is_spam" = true ]; then | ||
echo "is_spam=true" >> $GITHUB_ENV | ||
else | ||
echo "is_spam=false" >> $GITHUB_ENV | ||
fi | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Close PR if spam are found and author is not a contributor or member | ||
if: ${{ env.is_spam == 'true' && github.event.pull_request.author_association != 'CONTRIBUTOR' && github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER' }} | ||
run: gh pr close ${{ github.event.pull_request.number }} --comment "Spam detected" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
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
Oops, something went wrong.