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

Blocks Running Workflow #869

Merged
merged 65 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8b25ab6
execute block with native
FrancoGiachetta Oct 18, 2024
e02e677
add vm execution and diff checking
FrancoGiachetta Oct 18, 2024
9d25c93
Merge branch 'main' into workflow-small-execute-blocks
FrancoGiachetta Oct 18, 2024
45ca7da
path native version in replay
FrancoGiachetta Oct 18, 2024
96f6ff6
fix ci
FrancoGiachetta Oct 18, 2024
8e1155f
fix ci
FrancoGiachetta Oct 18, 2024
c939925
fix ci
FrancoGiachetta Oct 18, 2024
bc08421
fix ci
FrancoGiachetta Oct 18, 2024
49bd822
changes features
FrancoGiachetta Oct 18, 2024
28725f7
fixes
FrancoGiachetta Oct 21, 2024
4e8dcbe
fix typos
FrancoGiachetta Oct 21, 2024
7dec231
fix echo patch native version
FrancoGiachetta Oct 21, 2024
20346ac
fix echo patch native version
FrancoGiachetta Oct 21, 2024
976375d
Merge branch 'workflow-small-execute-blocks' of github.com:lambdaclas…
FrancoGiachetta Oct 21, 2024
ae64a3a
fix echo patch native version
FrancoGiachetta Oct 21, 2024
477e975
fix echo patch native version
FrancoGiachetta Oct 21, 2024
4a2043d
use sed to replace version
FrancoGiachetta Oct 21, 2024
3e58bdd
use sed to replace version
FrancoGiachetta Oct 21, 2024
bb71cca
use sed to replace version
FrancoGiachetta Oct 21, 2024
4d7ff9f
use sed to replace version
FrancoGiachetta Oct 21, 2024
b025885
use sed to replace version
FrancoGiachetta Oct 21, 2024
a67e204
change runtime library path
FrancoGiachetta Oct 21, 2024
9b75a07
adapt path script
FrancoGiachetta Oct 21, 2024
aea6a54
adapt path script
FrancoGiachetta Oct 21, 2024
51556dc
Merge branch 'main' into workflow-small-execute-blocks
FrancoGiachetta Oct 21, 2024
b567f1e
adapt path script
FrancoGiachetta Oct 21, 2024
f62fbab
change sed command
FrancoGiachetta Oct 21, 2024
6afdd0d
use replay's main
FrancoGiachetta Oct 21, 2024
dfa7e31
fix library path + add for macos
FrancoGiachetta Oct 22, 2024
e0334c4
fix macos uploaded files
FrancoGiachetta Oct 22, 2024
b1c59d7
change library path
FrancoGiachetta Oct 22, 2024
2efd56e
change library path
FrancoGiachetta Oct 22, 2024
7a81b95
change library path
FrancoGiachetta Oct 22, 2024
60ed197
change library path
FrancoGiachetta Oct 22, 2024
5c3e70a
rework + add block exec concurrency
FrancoGiachetta Oct 22, 2024
f484ffd
fix
FrancoGiachetta Oct 22, 2024
fb4a065
fix cargo run command
FrancoGiachetta Oct 22, 2024
104c444
fix cargo run command
FrancoGiachetta Oct 22, 2024
98ac67b
fix cargo run command
FrancoGiachetta Oct 22, 2024
e7c95d2
fix cargo run command
FrancoGiachetta Oct 22, 2024
cde522c
Merge branch 'main' into workflow-small-execute-blocks
FrancoGiachetta Oct 22, 2024
e21b744
fix cargo run command
FrancoGiachetta Oct 22, 2024
afe07bb
Merge branch 'workflow-small-execute-blocks' of github.com:lambdaclas…
FrancoGiachetta Oct 22, 2024
f914016
fix cargo run command
FrancoGiachetta Oct 22, 2024
8ba8546
fix action needs
FrancoGiachetta Oct 22, 2024
25ae4be
fix action needs
FrancoGiachetta Oct 22, 2024
d81fdbc
fix action needs
FrancoGiachetta Oct 22, 2024
b888e58
fix upload dumps
FrancoGiachetta Oct 22, 2024
5f49efb
fix sed accident
FrancoGiachetta Oct 22, 2024
bb7c523
fix dump comparison
FrancoGiachetta Oct 22, 2024
55d8d71
add more blocks
FrancoGiachetta Oct 22, 2024
0cd0112
swap block
FrancoGiachetta Oct 22, 2024
6217bbf
fix dump comparison
FrancoGiachetta Oct 23, 2024
eee683f
dont fail fast to check every block
FrancoGiachetta Oct 23, 2024
4794821
ping replay version
FrancoGiachetta Oct 23, 2024
a847487
better naming
FrancoGiachetta Oct 23, 2024
afc6568
make requested changes
FrancoGiachetta Oct 23, 2024
f68bc55
run replay in release
FrancoGiachetta Oct 23, 2024
7e24932
make more requested changes
FrancoGiachetta Oct 23, 2024
5b6f8cf
fix if
FrancoGiachetta Oct 23, 2024
2d9e032
forgot to checkout
FrancoGiachetta Oct 23, 2024
2723c95
forgot to checkout
FrancoGiachetta Oct 23, 2024
05d85d6
fix if
FrancoGiachetta Oct 23, 2024
13735ca
fix if
FrancoGiachetta Oct 23, 2024
586efc1
change blocks
FrancoGiachetta Oct 24, 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
133 changes: 133 additions & 0 deletions .github/workflows/starknet-blocks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Execute blocks

on:
push:
branches: [main]
pull_request:
merge_group:
types: [checks_requested]

jobs:
run-blocks:
name: Run Blocks
runs-on: ubuntu-latest
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
RPC_ENDPOINT_TESTNET: ${{ secrets.RPC_ENDPOINT_TESTNET }}
RPC_ENDPOINT_MAINNET: ${{ secrets.RPC_ENDPOINT_MAINNET }}
strategy:
matrix:
runner: [native, vm]
block: [742001, 754725, 749929, 769597, 779328]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
components: clippy
- uses: Swatinem/rust-cache@v2

- name: Check and free hdd space left
if: ${{ matrix.runner == 'native' }}
run: |
echo "Listing 20 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20
df -h
sudo apt-get update
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^temurin-.*'
sudo apt-get remove -y azure-cli microsoft-edge-stable google-chrome-stable firefox mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
# deleting 15GB
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
df -h

- 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

- name: Install Cairo Native deps
if: ${{ matrix.runner == 'native' }}
run: make deps
- name: Build Cairo Native project
if: ${{ matrix.runner == 'native' }}
run: cargo b --release --all-features
- name: Build runtime
if: ${{ matrix.runner == 'native' }}
run: |
make runtime
cargo update
echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/libcairo_native_runtime.a" > $GITHUB_ENV

- name: Checkout Starknet Replay
uses: actions/checkout@v4
with:
repository: lambdaclass/starknet-replay
ref: 08aa133b11e1e319036354c9acd8270483c844b5
path: replay

- name: Install Starknet Replay deps
run: make deps

- name: Patch Cairo Native's version
if: ${{ matrix.runner == 'native' }}
run: |
cd replay
sed -r -i 's/cairo_native.*rev.*[0-9a-z]+./cairo_native.git", rev = "${{ github.event.pull_request.head.sha }}"/' Cargo.toml
pefontana marked this conversation as resolved.
Show resolved Hide resolved

- name: Run Blocks Native
if: ${{ matrix.runner == 'native' }}
run: |
cd replay
cargo build --release --bin replay
cargo run --release --features state_dump block mainnet ${{ matrix.block }}

- name: Run Blocks VM
if: ${{ matrix.runner == 'vm' }}
run: |
cd replay
cargo build --release --bin replay
cargo run --release --features "state_dump,only_cairo_vm" block mainnet ${{ matrix.block }}

- name: Upload dumps
uses: actions/upload-artifact@v4
with:
name: dump-${{matrix.block}}-${{matrix.runner}}
path: replay/state_dumps/${{matrix.runner}}

compare-dumps:
needs: [run-blocks]
runs-on: ubuntu-latest
strategy:
matrix:
block: [742001, 754725, 749929, 769597, 779328]
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Fetch Native dumps
uses: actions/download-artifact@v4
with:
name: dump-${{matrix.block}}-native
path: state_dumps/native

- name: Fetch VM dumps
uses: actions/download-artifact@v4
with:
name: dump-${{matrix.block}}-vm
path: state_dumps/vm

- name: Check Diffs
run: ./scripts/diff-check.sh
Loading
Loading