Skip to content

Commit a764c00

Browse files
authored
Merge branch 'main' into fix/vm-reverts
2 parents ba1d922 + 3e01dfa commit a764c00

File tree

132 files changed

+12682
-1830
lines changed

Some content is hidden

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

132 files changed

+12682
-1830
lines changed

.env.e2e

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
RUST_LOG=info
2+
CARGO_TARGET_DIR=target
23
#### AWS CONFIG ####
34
AWS_ACCESS_KEY_ID=test
45
AWS_SECRET_ACCESS_KEY=test
@@ -11,15 +12,16 @@ AWS_DEFAULT_REGION=localhost
1112
## MONGODB ##
1213

1314
MADARA_ORCHESTRATOR_DATABASE_NAME=orchestrator
14-
MADARA_ORCHESTRATOR_MADARA_VERSION=0.13.3
15+
MADARA_ORCHESTRATOR_MADARA_VERSION=0.14.0
1516

1617
#### PROVER ####
1718

1819

1920
#### BATCHING ####
20-
MADARA_ORCHESTRATOR_MAX_BATCH_TIME_SECONDS=30
21+
MADARA_ORCHESTRATOR_MAX_BATCH_TIME_SECONDS=90
2122
MADARA_ORCHESTRATOR_MAX_BATCH_SIZE=40
2223
MADARA_ORCHESTRATOR_BATCHING_LOCK_DURATION_SECONDS=3600
24+
MADARA_ORCHESTRATOR_MAX_BLOCKS_PER_SNOS_BATCH=10 # Need to add this since Pathfinder doesn't store builtin weights
2325

2426
## ATLANTIC ##
2527

@@ -29,8 +31,9 @@ MADARA_ORCHESTRATOR_ATLANTIC_MOCK_FACT_HASH=true # Whether to use mock fact regi
2931
MADARA_ORCHESTRATOR_ATLANTIC_PROVER_TYPE="herodotus" # ("herodotus" | "starkware")
3032
MADARA_ORCHESTRATOR_ATLANTIC_SETTLEMENT_LAYER="ethereum" # ("ethereum" | "starknet")
3133
MADARA_ORCHESTRATOR_ATLANTIC_VERIFIER_CONTRACT_ADDRESS=0x07ec0D28e50322Eb0C159B9090ecF3aeA8346DFe
32-
MADARA_ORCHESTRATOR_ATLANTIC_CAIRO_VM=python
34+
MADARA_ORCHESTRATOR_ATLANTIC_CAIRO_VM=rust # use Rust CairoVM with 0.14.0 aggregator
3335
MADARA_ORCHESTRATOR_ATLANTIC_RESULT=proof-generation
36+
3437
#### SETTLEMENT ####
3538

3639
## ETHEREUM ##

.github/actions/setup-rust/action.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,35 @@ runs:
5050
- name: Install dependencies
5151
shell: bash
5252
run: |
53-
sudo apt-get update -y && sudo apt-get install -y \
54-
clang llvm libudev-dev protobuf-compiler gcc g++ build-essential libssl-dev pkg-config curl wget git libgmp3-dev netcat-openbsd
53+
# Install LLVM 19 using Makefile target
54+
make install-llvm19 SUDO=sudo CODENAME=jammy
55+
56+
# Set LLVM environment variables for Cairo Native
57+
echo "MLIR_SYS_190_PREFIX=/usr/lib/llvm-19" >> $GITHUB_ENV
58+
echo "LLVM_SYS_191_PREFIX=/usr/lib/llvm-19" >> $GITHUB_ENV
59+
echo "TABLEGEN_190_PREFIX=/usr/lib/llvm-19" >> $GITHUB_ENV
60+
61+
# Configure linker search paths for Cairo Native runtime compilation
62+
echo "LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib:/lib/x86_64-linux-gnu:/lib" >> $GITHUB_ENV
63+
echo "LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib:/lib/x86_64-linux-gnu:/lib" >> $GITHUB_ENV
64+
65+
# Set up clang-19 as default clang for Cairo Native
66+
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-19/bin/clang-19 100
67+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-19/bin/clang++ 100
68+
69+
# Also set explicit compiler environment variables for Cairo Native runtime
70+
# Note: clang-19 handles both C and C++ compilation
71+
echo "CC=clang-19" >> $GITHUB_ENV
72+
echo "CXX=clang-19" >> $GITHUB_ENV
73+
74+
# Configure linker for clang - use lld-19 for Cairo Native runtime compilation
75+
# These flags are passed to clang when it invokes the linker
76+
echo "LDFLAGS=-fuse-ld=lld-19" >> $GITHUB_ENV
77+
78+
# Add LLVM 19 binaries to PATH
79+
echo "/usr/lib/llvm-19/bin" >> $GITHUB_PATH
5580
5681
- name: Setup mold
5782
uses: rui314/setup-mold@v1
5883
with:
59-
make-default: true
84+
make-default: false # Don't make mold the default - Cairo Native runtime compilation needs lld-19

.github/workflows/task-build-and-publish-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ jobs:
103103
username: ${{ github.actor }}
104104
password: ${{ secrets.GITHUB_TOKEN }}
105105

106+
- name: Set up Docker Buildx
107+
uses: useblacksmith/setup-docker-builder@v1
108+
106109
- name: Build Docker Image and Publish
107110
id: push
108-
uses: docker/build-push-action@v6
111+
uses: useblacksmith/build-push-action@v2
109112
with:
110113
context: .
111114
push: true

.github/workflows/task-build-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
echo "artifacts-pr=$ARTIFACTS_PR" >> $GITHUB_OUTPUT
7777
7878
- name: Set up Docker Buildx
79-
uses: docker/setup-buildx-action@v3
79+
uses: useblacksmith/setup-docker-builder@v1
8080

8181
- name: Build Docker image
8282
id: push

.github/workflows/task-build-manual-and-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ jobs:
7878
username: ${{ github.actor }}
7979
password: ${{ secrets.GITHUB_TOKEN }}
8080

81+
- name: Set up Docker Buildx
82+
uses: useblacksmith/setup-docker-builder@v1
83+
8184
- name: Build Docker Image and Publish
8285
id: push
83-
uses: docker/build-push-action@v6
86+
uses: useblacksmith/build-push-action@v2
8487
with:
8588
context: .
8689
push: true

.github/workflows/task-build-nightly-and-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,12 @@ jobs:
8484
username: ${{ github.actor }}
8585
password: ${{ secrets.GITHUB_TOKEN }}
8686

87+
- name: Set up Docker Buildx
88+
uses: useblacksmith/setup-docker-builder@v1
89+
8790
- name: Build Docker Image and Publish
8891
id: push
89-
uses: docker/build-push-action@v6
92+
uses: useblacksmith/build-push-action@v2
9093
with:
9194
context: .
9295
push: true

.github/workflows/task-lint-cargo.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ jobs:
3333
run: yes | make artifacts
3434

3535
- name: Cargo fmt
36-
run: cargo fmt -- --check
36+
run: |
37+
cargo fmt -- --check
38+
39+
# TODO(mehul 21/11/2025, hotfix): This is a temporary fix to ensure that the madara is fmt checked.
40+
# Madara does not belong to the toplevel workspace, so we need to lint it separately.
41+
# Remove this once we add madara back to toplevel workspace.
42+
cd madara
43+
cargo fmt -- --check
3744
3845
- name: Python Cairo setup (before clippy)
3946
uses: ./.github/actions/setup-python-cairo

.github/workflows/task-test-end-to-end.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ on:
2424
description: "Hash used to retrieve the cairo artifacts"
2525
required: true
2626
type: string
27+
secrets:
28+
ETHEREUM_SEPOLIA_RPC:
29+
required: true
2730

2831
jobs:
2932
test-end-to-end:
@@ -141,6 +144,7 @@ jobs:
141144
env:
142145
# the self hosted runner has a different region so we override it here
143146
AWS_REGION: us-east-1
147+
MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL: ${{ secrets.ETHEREUM_SEPOLIA_RPC }}
144148
MADARA_ORCHESTRATOR_ATLANTIC_API_KEY: ${{ secrets.MADARA_ORCHESTRATOR_ATLANTIC_API_KEY }}
145149
run: |
146150
RUST_LOG=info cargo test \

.github/workflows/task-test-madara.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ jobs:
9494
PROPTEST_CASES: ${{ inputs.proptest-cases }}
9595
LLVM_PROFILE_FILE: "madara-%p-%m.profraw"
9696
ANVIL_URL: ${{ env.ANVIL_DEFAULT_URL }}
97+
# Cairo Native runtime compilation: use lld instead of mold
98+
LDFLAGS: "-fuse-ld=lld-19"
9799
run: |
98100
export COVERAGE_BIN=$(realpath target/release/madara)
99101
rm -f target/madara-* lcov.info

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ artifacts.tar.gz
2727
**/target/
2828
# These are backup files generated by rustfmt
2929
**/*.rs.bk
30+
# Cargo build cache files
31+
**/.rustc_info.json
32+
**/.future-incompat-report.json
3033

3134
# generated contracts for rpc-tests
3235
counter*/

0 commit comments

Comments
 (0)