Skip to content

Commit

Permalink
Merge branch 'main' into add-trace-dump-contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Jan 17, 2025
2 parents 8411019 + 965e3f9 commit 365bb7d
Show file tree
Hide file tree
Showing 39 changed files with 1,883 additions and 1,039 deletions.
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/daily_failure.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
---
title: "Daily Workflow Failure: Block Range {{ env.BLOCK_START }}-{{ env.BLOCK_END }}"
title: "Daily Workflow Failure"
labels: bug
---

Comparing VM execution against Native in the given block range produced diffs:
Comparing VM execution against Native produced diffs:

- Commit: {{ env.COMMIT_SHA }}
- Block Start: {{ env.BLOCK_START }}
- Block End: {{ env.BLOCK_END }}
- Workflow URL: {{ env.WORKFLOW_URL }}

## Compare Output

The transaction were not compared in order. You should rerun the whole block to find the error root
The transaction were not compared in order. You should rerun the whole failing block to find the error root

```
{{ env.OUTPUT }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bench-hyperfine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
df -h
- uses: dtolnay/rust-toolchain@1.83.0
- uses: dtolnay/rust-toolchain@1.84.0
with:
components: clippy
- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
df -h
- name: Install Rust
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }}
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
- name: add llvm deb repository
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }}
uses: myci-actions/add-deb-repo@11
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.83.0
- uses: dtolnay/rust-toolchain@1.84.0
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
Expand All @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.83.0
- uses: dtolnay/rust-toolchain@1.84.0
with:
components: rustfmt
- run: cargo fmt --all -- --check
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
sudo rm -rf /usr/local/lib/android
df -h
- name: Setup rust env
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
with:
components: clippy
- name: Rust `$PATH` workaround.
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
sudo rm -rf /usr/local/lib/android
df -h
- name: Setup rust env
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
needs: [coverage]
steps:
- name: Setup rust env
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
- name: Retreive cached dependencies
uses: Swatinem/rust-cache@v2
- name: Install testing tools
Expand Down
128 changes: 59 additions & 69 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
RPC_ENDPOINT_TESTNET: ${{ secrets.RPC_ENDPOINT_TESTNET }}
RPC_ENDPOINT_MAINNET: ${{ secrets.RPC_ENDPOINT_MAINNET }}
strategy:
max-parallel: 15
max-parallel: 30
matrix:
block:
- 740000
Expand All @@ -41,16 +41,6 @@ jobs:
- 800350
- 800400
- 800450
- 800500
- 801550
- 801600
- 800650
- 800700
- 800750
- 800800
- 800850
- 800900
- 800950
- 900000
- 900100
- 900200
Expand All @@ -61,6 +51,16 @@ jobs:
- 900700
- 900800
- 900900
- 1000400
- 1000500
- 1002000
- 1003000
- 1004000
- 1005000
- 1006000
- 1007000
- 1008000
- 1009000
runner:
- native
- vm
Expand All @@ -71,35 +71,73 @@ jobs:
working-directory: ./starknet-replay

steps:
# We checkout replay first, as it's the main repository for this workflow
# We checkout replay as it's the main repository for this workflow
- name: Checkout Replay
uses: actions/checkout@v4
with:
repository: lambdaclass/starknet-replay
path: starknet-replay
# We need native for building the runtime
# We need native if we want to run with cairo native main
- name: Checkout Native
uses: actions/checkout@v4
with:
path: cairo_native
# We need sequencer if we want to run with cairo native main
- name: Checkout Native
uses: actions/checkout@v4
with:
repository: lambdaclass/sequencer
path: sequencer
ref: replay

- name: Cache RPC Calls
uses: actions/cache@v4
with:
path: starknet-replay/rpc_cache
key: cache-${{matrix.block}}

# Install dependencies
- uses: ./cairo_native/.github/actions/install-linux-deps
- name: Setup rust env
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
starknet-replay
cairo_native
- name: Build Cairo Native Runtime Library
shell: bash
run: |
cd ../cairo_native
make runtime
echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/libcairo_native_runtime.a" > $GITHUB_ENV
- name: Patch dependencies
- name: Patch replay dependencies
run: |
# Patches native dependency to local path, to use current cairo native version
echo -e "\n[patch.crates-io]\ncairo-native = { path = \"../cairo_native\" }" >> Cargo.toml
# Updates sequencer dependency to local path
name='[[:alnum:]_-]+'
sequencer_url='"https:\/\/github.com\/lambdaclass\/sequencer\.git"'
rev='"[[:alnum:]]+"'
new_path='"..\/sequencer\/crates\/\1"'
sed -i'' -r "s/^($name) = \{ git = $sequencer_url, rev = $rev/\1 = { path = $new_path/" Cargo.toml
# Updates native dependency to local path
new_path='"..\/cairo_native"'
sed -i'' -r "s/^cairo-native = .*/cairo-native.path = $new_path/" Cargo.toml
git diff
- name: Patch sequencer dependencies
run: |
cd ../sequencer
# Updates native dependency to local path
new_path='"..\/cairo_native"'
sed -i'' -r "s/^cairo-native = .*/cairo-native.path = $new_path/" Cargo.toml
git diff
- name: Run with Native
if: ${{ matrix.runner == 'native' }}
Expand Down Expand Up @@ -128,50 +166,6 @@ jobs:
# We always run the compare job, to ensure that a single run job failing
# would not cancel the whole comparison.
if: ${{ always() }}
strategy:
matrix:
block:
- 740000
- 741000
- 742000
- 743000
- 744000
- 745000
- 746000
- 747000
- 748000
- 749000
- 800000
- 800050
- 800100
- 800150
- 800200
- 800250
- 800300
- 800350
- 800400
- 800450
- 800500
- 800550
- 800600
- 800650
- 800700
- 800750
- 800800
- 800850
- 800900
- 800950
- 900000
- 900100
- 900200
- 900300
- 900400
- 900500
- 900600
- 900700
- 900800
- 900900
fail-fast: false
defaults:
run:
shell: bash
Expand All @@ -181,14 +175,16 @@ jobs:
- name: Fetch Native dumps
uses: actions/download-artifact@v4
with:
name: dump-${{matrix.block}}-native
pattern: dump-*-native
path: state_dumps/native
merge-multiple: true
continue-on-error: true
- name: Fetch VM dumps
uses: actions/download-artifact@v4
with:
name: dump-${{matrix.block}}-vm
pattern: dump-*-vm
path: state_dumps/vm
merge-multiple: true
continue-on-error: true

- name: Compare states
Expand All @@ -198,12 +194,6 @@ jobs:
- name: Prepare env vars
if: ${{ always() }}
run: |
# Save blocks to env var
BLOCK_START=${{ matrix.block }}
BLOCK_END=$(($BLOCK_START + $RANGE_SIZE - 1))
echo "BLOCK_END=$BLOCK_END" | tee -a $GITHUB_ENV
echo "BLOCK_START=$BLOCK_START" | tee -a $GITHUB_ENV
# Save workflow url
REPO_URL="${{ github.server_url }}/${{ github.repository }}"
echo "WORKFLOW_URL=$REPO_URL/actions/runs/${{ github.run_id }}" | tee -a $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
- name: Setup rust env
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
- name: Setup rust env
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@1.83.0
uses: dtolnay/rust-toolchain@1.84.0
with:
components: clippy
- name: Rust `$PATH` workaround.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.83.0
- uses: dtolnay/rust-toolchain@1.84.0
- uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@11
Expand Down
Loading

0 comments on commit 365bb7d

Please sign in to comment.