Skip to content

Commit 2e13f2c

Browse files
authored
Merge pull request #4 from bobanetwork/afae216
afae216 upstream merge
2 parents 512297b + afae216 commit 2e13f2c

File tree

102 files changed

+3114
-3066
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+3114
-3066
lines changed

.github/actions/setup/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ runs:
3535
~/.cargo/registry/cache/
3636
~/.cargo/git/db/
3737
target/
38-
key: rust-1.79.0-${{ hashFiles('**/Cargo.toml') }}
39-
restore-keys: rust-1.79.0-
38+
key: rust-nightly-${{ hashFiles('**/Cargo.toml') }}
39+
restore-keys: rust-nightly-
4040

4141
- name: Setup toolchain
4242
id: rustc-toolchain
4343
shell: bash
4444
run: |
45-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.79.0 -y
45+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y
46+
source "$HOME/.cargo/env"
47+
rustup default nightly

.github/workflows/compile.yaml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,8 @@ jobs:
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v4
20-
- name: Compile the fault proof program
21-
run: cargo build --profile release-client-lto
22-
working-directory: programs/fault-proof
20+
- name: Setup CI
21+
uses: ./.github/actions/setup
2322
- name: Compile the range program
2423
run: cargo build --profile release-client-lto
2524
working-directory: programs/range
26-
build_zkvm_programs:
27-
runs-on:
28-
- runs-on
29-
- runner=64cpu-linux-arm64
30-
- run-id=${{ github.run_id }}
31-
steps:
32-
- name: Checkout code
33-
uses: actions/checkout@v4
34-
- name: Install SP1 toolchain
35-
run: |
36-
curl -L https://sp1.succinct.xyz | bash
37-
~/.sp1/bin/sp1up
38-
~/.sp1/bin/cargo-prove prove --version
39-
source ~/.bashrc
40-
- name: Compile the fault proof program
41-
run: ~/.sp1/bin/cargo-prove prove build --binary fault-proof
42-
working-directory: programs/fault-proof
43-
- name: Compile the range program
44-
run: ~/.sp1/bin/cargo-prove prove build --binary range
45-
working-directory: programs/range
46-
- name: Compile the aggregation program
47-
run: ~/.sp1/bin/cargo-prove prove build --binary aggregation
48-
working-directory: programs/aggregation

.github/workflows/cost-estimator-manual.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,8 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020

21-
- name: rust-cache
22-
uses: actions/cache@v3
23-
with:
24-
path: |
25-
~/.cargo/registry/index/
26-
~/.cargo/registry/cache/
27-
~/.cargo/git/db/
28-
target/
29-
restore-keys: rust-1.81.0-
30-
key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }}
31-
32-
- name: Install Rust
33-
uses: actions-rs/toolchain@v1
34-
with:
35-
profile: minimal
36-
toolchain: stable
37-
override: true
21+
- name: Setup CI
22+
uses: ./.github/actions/setup
3823

3924
- name: Run cost estimator
4025
run: |
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Docker Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- 'v*'
10+
pull_request:
11+
branches:
12+
- main
13+
14+
jobs:
15+
build:
16+
name: Build Docker Images
17+
runs-on:
18+
- runs-on
19+
- cpu=16
20+
- ram=64
21+
- family=m7a+m7i-flex
22+
- image=ubuntu22-full-x64
23+
- run-id=${{ github.run_id }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Docker meta for op-proposer
33+
id: meta-op-proposer
34+
uses: docker/metadata-action@v5
35+
with:
36+
images: ghcr.io/${{ github.repository }}/op-proposer
37+
tags: |
38+
type=ref,event=branch
39+
type=ref,event=pr
40+
type=semver,pattern={{version}}
41+
type=semver,pattern={{major}}.{{minor}}
42+
type=sha
43+
44+
- name: Docker meta for succinct-proposer
45+
id: meta-succinct
46+
uses: docker/metadata-action@v5
47+
with:
48+
images: ghcr.io/${{ github.repository }}/succinct-proposer
49+
tags: |
50+
type=ref,event=branch
51+
type=ref,event=pr
52+
type=semver,pattern={{version}}
53+
type=semver,pattern={{major}}.{{minor}}
54+
type=sha
55+
56+
- name: Login to GitHub Container Registry
57+
if: github.event_name != 'pull_request'
58+
uses: docker/login-action@v3
59+
with:
60+
registry: ghcr.io
61+
username: ${{ github.actor }}
62+
password: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- name: Pre-build debug
65+
run: |
66+
echo "Meta tags: ${{ steps.meta-op-proposer.outputs.tags }}"
67+
echo "Push condition: ${{ github.event_name != 'pull_request' }}"
68+
echo "Event name: ${{ github.event_name }}"
69+
70+
- name: Build and push op-proposer
71+
uses: docker/build-push-action@v6
72+
with:
73+
context: .
74+
file: proposer/op/Dockerfile.op_proposer
75+
push: ${{ github.event_name != 'pull_request' }}
76+
tags: ${{ steps.meta-op-proposer.outputs.tags }}
77+
labels: ${{ steps.meta-op-proposer.outputs.labels }}
78+
cache-from: type=gha
79+
cache-to: type=gha,mode=max
80+
81+
- name: Post-build debug
82+
run: |
83+
docker images
84+
echo "Checking authentication:"
85+
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} 2>&1 || true
86+
87+
- name: Build and push succinct-proposer
88+
uses: docker/build-push-action@v6
89+
with:
90+
context: .
91+
file: proposer/succinct/Dockerfile
92+
push: ${{ github.event_name != 'pull_request' }}
93+
tags: ${{ steps.meta-succinct.outputs.tags }}
94+
labels: ${{ steps.meta-succinct.outputs.labels }}
95+
cache-from: type=gha
96+
cache-to: type=gha,mode=max

.github/workflows/docker.yaml renamed to .github/workflows/docker-test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ jobs:
1717
- ram=64
1818
- family=m7a+m7i-flex
1919
- image=ubuntu22-full-x64
20+
- disk=large
2021
- run-id=${{ github.run_id }}
2122
steps:
22-
- uses: actions/checkout@v4
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
2325

2426
- name: Set up Docker Compose
2527
uses: docker/setup-buildx-action@v1

.github/workflows/elf.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: ELF
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
elf:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.pull_request.head.ref }}
20+
- name: Install SP1 toolchain
21+
run: |
22+
curl -L https://sp1.succinct.xyz | bash
23+
~/.sp1/bin/sp1up
24+
~/.sp1/bin/cargo-prove prove --version
25+
source ~/.bashrc
26+
- name: Setup Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
- name: Verify the OP Succinct binaries
29+
run: |
30+
# Build the binaries
31+
cd programs/range
32+
~/.sp1/bin/cargo-prove prove build --elf-name range-elf --docker --tag v4.0.0-rc.10 --output-directory ../../elf
33+
cd ../aggregation
34+
~/.sp1/bin/cargo-prove prove build --elf-name aggregation-elf --docker --tag v4.0.0-rc.10 --output-directory ../../elf
35+
cd ../../
36+
37+
# Check for any changes in the elf directory
38+
if [ -n "$(git status --porcelain elf/)" ]; then
39+
echo "❌ ELF files changed during build!"
40+
git diff elf/
41+
exit 1
42+
else
43+
echo "✅ ELF files remained unchanged"
44+
fi

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,8 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121

22-
- name: rust-cache
23-
uses: actions/cache@v3
24-
with:
25-
path: |
26-
~/.cargo/registry/index/
27-
~/.cargo/registry/cache/
28-
~/.cargo/git/db/
29-
target/
30-
restore-keys: rust-1.81.0-
31-
key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }}
32-
33-
- name: Install Rust
34-
uses: actions-rs/toolchain@v1
35-
with:
36-
profile: minimal
37-
toolchain: stable
38-
override: true
22+
- name: Setup CI
23+
uses: ./.github/actions/setup
3924

4025
- name: OP Sepolia cost estimator on recent block range
4126
run: |

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions-rs/toolchain@v1
3434
with:
3535
profile: minimal
36-
toolchain: stable
36+
toolchain: nightly
3737
components: rustfmt
3838

3939
- name: Run rustfmt

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "contracts/lib/sp1-contracts"]
1111
path = contracts/lib/sp1-contracts
1212
url = https://github.com/succinctlabs/sp1-contracts
13+
[submodule "contracts/lib/solady"]
14+
path = contracts/lib/solady
15+
url = https://github.com/vectorized/solady

0 commit comments

Comments
 (0)