Skip to content

fix(fault-proof): follow genesis-rooted catch-up chains to their tip #802

fix(fault-proof): follow genesis-rooted catch-up chains to their tip

fix(fault-proof): follow genesis-rooted catch-up chains to their tip #802

Workflow file for this run

name: Lint
on:
push:
tags:
- v[0-9]+.*
branches:
- main
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}
jobs:
changes:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: filter
with:
filters: |
code:
- '.github/workflows/lint.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'justfile'
- 'rust-toolchain.toml'
- 'crates/**'
- 'programs/**'
- 'scripts/**'
- 'utils/**'
- 'fault-proof/**'
- 'validity/**'
- 'bindings/**'
lint:
needs: changes
if: always() && (github.event_name != 'pull_request' || needs.changes.result != 'success' || needs.changes.outputs.code == 'true')
name: Formatting & Clippy
runs-on:
- runs-on
- runner=32cpu-linux-arm64
- run-id=${{ github.run_id }}
- spot=false
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check SP1 version consistency
run: |
SP1_VERSION=$(grep 'sp1-sdk' Cargo.toml | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
echo "Expected SP1 version from Cargo.toml: $SP1_VERSION"
MISMATCHES=$(grep -rn 'sp1up -v' --include='Dockerfile*' | grep -v "$SP1_VERSION" || true)
MISMATCHES+=$(grep -rn 'sp1up -v' .github/workflows/ --exclude='lint.yml' | grep -v "$SP1_VERSION" || true)
MISMATCHES+=$(grep -n -- '--tag v' justfile | grep -v "$SP1_VERSION" || true)
if [ -n "$MISMATCHES" ]; then
echo "::error::SP1 version mismatch found. Expected $SP1_VERSION (from Cargo.toml):"
echo "$MISMATCHES"
exit 1
fi
echo "SP1 version consistency check passed"
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt, clippy
- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Install Go
run: |
GO_ARCH=$(dpkg --print-architecture)
curl -LO https://go.dev/dl/go1.24.0.linux-${GO_ARCH}.tar.gz
sudo tar -C /usr/local -xzf go1.24.0.linux-${GO_ARCH}.tar.gz
echo "/usr/local/go/bin" >> $GITHUB_PATH
- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up -v 6.1.0
~/.sp1/bin/cargo-prove prove --version
source ~/.bashrc
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: lint
cache-on-failure: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets --all-features --tests
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets -- -D warnings -A incomplete-features