-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/cancun' into type2_cancun
- Loading branch information
Showing
111 changed files
with
5,998 additions
and
7,944 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[build] | ||
# https://github.com/rust-lang/rust/pull/124129 | ||
# https://github.com/dtolnay/linkme/pull/88 | ||
rustflags = ["-Zlinker-features=-lld"] | ||
rustflags = ["-Z", "linker-features=-lld"] |
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,28 @@ | ||
# this is loosely based on `docker init`'s rust template. | ||
|
||
**/.DS_Store | ||
**/.classpath | ||
**/.dockerignore | ||
# **/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
/bin | ||
/target | ||
LICENSE | ||
README.md |
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,26 @@ | ||
name: Docker Build & Run | ||
|
||
on: | ||
push: | ||
branches: [develop, main] | ||
pull_request: | ||
branches: | ||
- "**" | ||
workflow_dispatch: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
docker: | ||
name: Regression test docker images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- run: | | ||
docker build --progress=plain --build-arg=PROFILE=dev --tag scratch . | ||
docker run --rm --init --entrypoint leader scratch --help | ||
docker run --rm --init --entrypoint worker scratch --help | ||
docker run --rm --init --entrypoint rpc scratch --help | ||
docker run --rm --init --entrypoint verifier scratch --help |
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,55 @@ | ||
name: Docker Build & Push | ||
|
||
on: | ||
push: | ||
branches: [develop, main] | ||
release: | ||
types: [created] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
docker: | ||
name: Build and push leader and worker docker images to GitHub Container Registry | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-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: Extract metadata (tags, labels) | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
name=${{ env.REGISTRY }}/${{ github.repository }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- name: Push to GitHub Container Registry | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
# platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,98 @@ | ||
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 | ||
ref: 'feat/kurtosis-network' | ||
path: jerigon-test-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: Install kurtosis | ||
run: | | ||
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list | ||
sudo apt update | ||
sudo apt install kurtosis-cli | ||
#It is much easier to use cast tool in scripts so install foundry | ||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
|
||
- name: Run cancun test network | ||
run: | | ||
docker pull ghcr.io/0xpolygonzero/erigon:feat-zero | ||
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] --args-file jerigon-test-network/network_params.yml | ||
- name: Generate blocks with transactions | ||
run: | | ||
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)" | ||
cast rpc eth_blockNumber --rpc-url $ETH_RPC_URL | ||
cd jerigon-test-network && set -a && source .env && set +a | ||
bash ./tests/generate_transactions.sh | ||
- name: Run prove blocks in test_only mode | ||
run: | | ||
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)" | ||
cd zero_bin/tools | ||
ulimit -n 8192 | ||
OUTPUT_TO_TERMINAL=true ./prove_rpc.sh 0x1 0xf $ETH_RPC_URL jerigon true 3000 100 test_only | ||
echo "Proving blocks in test_only mode finished" | ||
- name: Run prove blocks in real mode | ||
run: | | ||
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)" | ||
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 0x2 0x8 $ETH_RPC_URL jerigon true 3000 100 | ||
echo "Proving blocks in real mode finished" | ||
- name: Shut down network | ||
run: | | ||
kurtosis enclave rm -f cancun-testnet | ||
kurtosis engine stop | ||
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 == 'FIRST_TIME_CONTRIBUTOR' }} | ||
run: gh pr close ${{ github.event.pull_request.number }} --comment "Spam detected" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.