Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to latest sequencer with Native support #768

Merged
merged 53 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5deb374
wip: cairo native
enitrat Sep 20, 2024
65ba38c
use contract executor
enitrat Sep 24, 2024
40741c3
update cargo
enitrat Sep 24, 2024
46bdde0
unskip eip1559 for repro
enitrat Sep 24, 2024
34166f2
update to llvm 19
enitrat Sep 25, 2024
ddf10d1
update remote
enitrat Sep 26, 2024
c1f1c49
bump gas limits
enitrat Sep 28, 2024
f45fd7e
restore skipfile
enitrat Sep 28, 2024
2ff9cb8
make tests not quiet
enitrat Sep 29, 2024
29694a5
update used rev
enitrat Sep 29, 2024
e85dde5
fix rev
enitrat Sep 29, 2024
f95e186
reduce max steps
enitrat Sep 29, 2024
74930b2
nocapture to have more logs in CI
enitrat Sep 30, 2024
0f9e0dc
bump native
enitrat Oct 1, 2024
65b4696
downgrade native to main
enitrat Oct 2, 2024
45677cc
bump native
enitrat Oct 2, 2024
758ac6a
bump native
enitrat Oct 3, 2024
d701a01
latest native main
enitrat Oct 3, 2024
f476b4a
remove blockchain-skipped tests
enitrat Oct 3, 2024
b89280e
bump native
enitrat Oct 4, 2024
93b098b
bump native
enitrat Oct 7, 2024
0c6d877
fix build
enitrat Oct 7, 2024
092472d
bump native
enitrat Oct 10, 2024
a58104c
bump cairo
enitrat Oct 10, 2024
4363c7d
bump native
enitrat Oct 13, 2024
8291289
idk
enitrat Oct 13, 2024
6d210ac
bump native
enitrat Oct 14, 2024
864fc65
bump native
enitrat Oct 15, 2024
a4b9a96
bump native
enitrat Oct 16, 2024
ce95cdb
bump cargo
enitrat Oct 16, 2024
4178b80
bump native
enitrat Oct 29, 2024
ba27e64
fix sequencer build
enitrat Oct 29, 2024
6a59ab6
debug ram only on macos targets
enitrat Oct 31, 2024
a0976a2
bump native
enitrat Nov 5, 2024
4a75663
bump native
enitrat Nov 9, 2024
62fa964
bump cairo
enitrat Nov 20, 2024
b974c97
custom macro to track long tests
enitrat Nov 21, 2024
cdfcc62
update to latest sequencer
enitrat Dec 3, 2024
9e64186
update on main
enitrat Dec 4, 2024
2c46a78
fix ef-testing crate
enitrat Dec 4, 2024
ff7b32b
restore native feature
enitrat Dec 4, 2024
876c286
bump sequencer to get proper versioned constant parsing
enitrat Dec 4, 2024
4d4faca
add required dependencies for native build
enitrat Dec 5, 2024
04e8642
checkout before using composite actions
enitrat Dec 5, 2024
9c5b8ea
make llvm deps in path
enitrat Dec 5, 2024
87e029d
fix workflow
enitrat Dec 5, 2024
70f5db1
install LLVM in action instead of sh script
enitrat Dec 5, 2024
ecd32a3
bump sequencer dep for proper support of serde
enitrat Dec 5, 2024
67665de
fix trunk
enitrat Dec 5, 2024
f7f2ab4
remove old llvm in ci
enitrat Dec 5, 2024
d8fa195
set LLVM_CONFIG var to llvm-19
enitrat Dec 5, 2024
d4a7dbd
add llvm bin to path
enitrat Dec 5, 2024
ca366fc
apply suggestions
enitrat Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Required to have the proper environment variables set to
# build the starkware-libs/sequencer dependencies with Native mode.

[env]
CAIRO_NATIVE_RUNTIME_LIBRARY = "./libcairo_native_runtime.a"

# Use `lld` for linking instead of `ld`, since we run out of memory while linking with `ld` on
# 16-cores linux machines, see:
# https://nnethercote.github.io/perf-book/build-configuration.html#linking.
# TODO: remove this once `rust` stabilizes `lld` as the default linker, currently only on nightly:
# https://github.com/rust-lang/rust/issues/39915#issuecomment-618726211
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Clink-arg=-fuse-ld=lld"]
env = { "MLIR_SYS_190_PREFIX" = "/usr/lib/llvm-19", "LLVM_SYS_191_PREFIX" = "/usr/lib/llvm-19", "TABLEGEN_190_PREFIX" = "/usr/lib/llvm-19", "CAIRO_NATIVE_RUNTIME_LIBRARY" = "./libcairo_native_runtime.a" }

[target.x86_64-apple-darwin]
env = { "LIBRARY_PATH" = "/opt/homebrew/lib", "MLIR_SYS_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "LLVM_SYS_191_PREFIX" = "/opt/homebrew/opt/llvm@19", "TABLEGEN_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "CAIRO_NATIVE_RUNTIME_LIBRARY" = "./libcairo_native_runtime.a" }

[target.aarch64-apple-darwin]
env = { "LIBRARY_PATH" = "/opt/homebrew/lib", "MLIR_SYS_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "LLVM_SYS_191_PREFIX" = "/opt/homebrew/opt/llvm@19", "TABLEGEN_190_PREFIX" = "/opt/homebrew/opt/llvm@19", "CAIRO_NATIVE_RUNTIME_LIBRARY" = "./libcairo_native_runtime.a" }
88 changes: 80 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,95 @@
---
name: Workflow - CI

# trunk-ignore-all(checkov/CKV2_GHA_1)

on:
push:
branches: [main]
pull_request:
branches:
- main

permissions: read-all

jobs:
trunk:
name: Trunk
uses: ./.github/workflows/trunk-check.yml
permissions:
checks: write
contents: read
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Update and upgrade APT
shell: bash
run: sudo apt-get update && sudo apt-get upgrade -y
- name: Install LLVM
run:
sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19
clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
libgmp3-dev libzstd-dev lld libssl-dev zstd
- name: Add llvm bin to PATH
run: echo "/usr/lib/llvm-19/bin" >> $GITHUB_PATH
- name: Trunk Check
uses: trunk-io/[email protected]

tests:
name: Rust tests
uses: ./.github/workflows/test.yml
runs-on: ubuntu-latest-16-cores
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
run:
sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19
clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
libgmp3-dev libzstd-dev lld libssl-dev zstd
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: fetch ef tests
run: make setup
- name: fetch Kakarot
run: make setup-kakarot
env:
GITHUB_TOKEN: ${{ github.token }}
- name: run tests v0
run: |
set -o pipefail
make vm-tests-v0-ci | tee test_v0.out
- name: run tests v1
run: |
make vm-tests-v1-ci | tee test_v1.out
set +o pipefail
- name: Retrieve ef-tests execution resources
run: python scripts/compute_resources.py
env:
KAKAROT_VERSION: v0,v1
# upload artifacts
- name: upload resources
uses: actions/upload-artifact@v3
with:
path: ./resources/
name: resources-usage
55 changes: 0 additions & 55 deletions .github/workflows/test.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/trunk-check.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ tmp*
# Ignore the generated tests
/crates/ef-testing/tests/*

/crates/ef-testing/native_cache/*

# Ignore the launch file
launch.json

Expand Down
Loading