Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions .github/actions/load-release-versions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Load release versions"
description: "Export release/versions.env into the job environment (single pin source)."

runs:
using: composite
steps:
- name: Load release/versions.env
shell: bash
run: |
set -euo pipefail
file="release/versions.env"
if [[ ! -f "${file}" ]]; then
echo "missing ${file}" >&2
exit 1
fi
while IFS= read -r line || [[ -n "${line}" ]]; do
line="${line%%#*}"
line="$(echo "${line}" | xargs)"
if [[ -z "${line}" ]]; then
continue
fi
if [[ "${line}" != *"="* ]]; then
echo "invalid line in ${file}: ${line}" >&2
exit 1
fi
echo "${line}" >> "${GITHUB_ENV}"
done < "${file}"
34 changes: 25 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ on:
push:
pull_request:

env:
RUST_TOOLCHAIN: "1.95.0"
XGENEXT2FS_VERSION: v1.5.6
XGENEXT2FS_SHA256_AMD64: 996e4e68a638b5dc5967d3410f92ecb8d2f41e32218bbe0f8b4c4474d7eebc59
XGENEXT2FS_SHA256_ARM64: e5aca81164b762bbe5447bacef41e4fa9e357fd9c8f44e519c5206227d43144d
CARTESI_MACHINE_VERSION: v0.20.0-test2
CARTESI_MACHINE_SHA256_AMD64: 39bbfc96a6cc6606307294b719df65f4f2725e8d200d062bcbd8c22355b99b56
CARTESI_MACHINE_SHA256_ARM64: 787d823756000cdecd72da8a3494b4c08613087379035959e561bbaef7a220ba

jobs:
rust:
runs-on: ubuntu-latest
Expand All @@ -22,6 +13,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Load release versions
uses: ./.github/actions/load-release-versions

- name: Verify release version alignment
run: bash scripts/verify-release-versions.sh

- name: Install system dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -55,6 +52,9 @@ jobs:
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

- name: Watchdog Lua tests
run: lua watchdog/tests/run.lua

- name: Test
timeout-minutes: 15
run: cargo test --workspace --all-targets --all-features --locked
Expand All @@ -68,6 +68,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Load release versions
uses: ./.github/actions/load-release-versions

- name: Setup guest toolchain
uses: ./.github/actions/setup-guest-toolchain
with:
Expand All @@ -94,6 +97,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Load release versions
uses: ./.github/actions/load-release-versions

- name: Setup guest toolchain
uses: ./.github/actions/setup-guest-toolchain
with:
Expand All @@ -111,5 +117,15 @@ jobs:
sudo apt-get update
sudo apt-get install -y faketime libfaketime

- name: Build watchdog Lua deps
run: |
sudo apt-get install -y libcurl4-openssl-dev build-essential pkg-config
just watchdog-lua-deps

- name: Run rollups E2E tests
run: just test-rollups-e2e

- name: Run watchdog genesis compare harness
run: |
cargo run -p rollups-e2e --bin rollups-e2e -- \
watchdog_genesis_compare_test --exact --nocapture
86 changes: 76 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ on:
permissions:
contents: write

env:
RUST_TOOLCHAIN: "1.95.0"
XGENEXT2FS_VERSION: v1.5.6
XGENEXT2FS_SHA256_AMD64: 996e4e68a638b5dc5967d3410f92ecb8d2f41e32218bbe0f8b4c4474d7eebc59
XGENEXT2FS_SHA256_ARM64: e5aca81164b762bbe5447bacef41e4fa9e357fd9c8f44e519c5206227d43144d
CARTESI_MACHINE_VERSION: v0.20.0-test2
CARTESI_MACHINE_SHA256_AMD64: 39bbfc96a6cc6606307294b719df65f4f2725e8d200d062bcbd8c22355b99b56
CARTESI_MACHINE_SHA256_ARM64: 787d823756000cdecd72da8a3494b4c08613087379035959e561bbaef7a220ba

jobs:
build-sequencer:
name: Build sequencer (${{ matrix.arch }})
Expand All @@ -45,6 +36,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Load release versions
uses: ./.github/actions/load-release-versions

- name: Install system dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -85,6 +79,10 @@ jobs:

mkdir -p "package/sequencer-${TAG}-linux-${ARCH}"
cp "target/${TARGET}/release/sequencer" "package/sequencer-${TAG}-linux-${ARCH}/sequencer"
bash scripts/generate-release-manifest.sh \
--tag "${TAG}" \
--git-sha "${GITHUB_SHA}" \
--output "package/sequencer-${TAG}-linux-${ARCH}/RELEASE.json"

cat > "package/sequencer-${TAG}-linux-${ARCH}/RUNNING.md" <<'EOF'
## Running
Expand Down Expand Up @@ -122,6 +120,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Load release versions
uses: ./.github/actions/load-release-versions

- name: Setup guest toolchain
uses: ./.github/actions/setup-guest-toolchain
with:
Expand Down Expand Up @@ -159,29 +160,93 @@ jobs:
name: canonical-machine-images
path: dist/canonical-machine-image-*.tar.gz

build-watchdog-image:
name: Build watchdog image (${{ matrix.arch }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
platform: linux/amd64
deb_sha_env: CARTESI_MACHINE_SHA256_AMD64
- arch: arm64
platform: linux/arm64
deb_sha_env: CARTESI_MACHINE_SHA256_ARM64

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Load release versions
uses: ./.github/actions/load-release-versions

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Build and export watchdog image
env:
TAG: ${{ inputs.tag || github.ref_name }}
DEB_SHA_ENV: ${{ matrix.deb_sha_env }}
run: |
set -euo pipefail
DEB_SHA="${!DEB_SHA_ENV}"
image="sequencer-watchdog:${TAG}"
docker build \
--platform "${{ matrix.platform }}" \
--build-arg "RELEASE_TAG=${TAG}" \
--build-arg "GIT_COMMIT=${GITHUB_SHA}" \
--build-arg "CARTESI_MACHINE_VERSION=${CARTESI_MACHINE_VERSION}" \
--build-arg "CARTESI_MACHINE_DEB_SHA256=${DEB_SHA}" \
--build-arg "LUA_CURL_UPSTREAM_SHA=${LUA_CURL_UPSTREAM_SHA}" \
-f watchdog/Dockerfile \
-t "${image}" \
.
mkdir -p dist
docker save "${image}" | gzip -9 > "dist/sequencer-watchdog-${TAG}-linux-${{ matrix.arch }}.tar.gz"

- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: watchdog-image-linux-${{ matrix.arch }}
path: dist/sequencer-watchdog-*.tar.gz

publish:
name: Publish GitHub Release
runs-on: ubuntu-latest
needs:
- build-sequencer
- build-canonical-machine-image
- build-watchdog-image
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Load release versions
uses: ./.github/actions/load-release-versions

- name: Download build artifacts
uses: actions/download-artifact@v6
with:
path: dist

- name: Flatten artifacts
env:
TAG: ${{ inputs.tag || github.ref_name }}
run: |
set -euo pipefail
mkdir -p out
find dist -type f -name '*.tar.gz' -exec cp -v '{}' out/ \;
bash scripts/generate-release-manifest.sh \
--tag "${TAG}" \
--git-sha "${GITHUB_SHA}" \
--output "out/release-manifest-${TAG}.json"

- name: Generate checksums
working-directory: out
run: |
set -euo pipefail
sha256sum *.tar.gz > SHA256SUMS
sha256sum *.tar.gz *.json > SHA256SUMS

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand All @@ -191,4 +256,5 @@ jobs:
fail_on_unmatched_files: true
files: |
out/*.tar.gz
out/*.json
out/SHA256SUMS
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
/target
.deps/
watchdog/third_party/lua-curl/*
!watchdog/third_party/lua-curl/UPSTREAM
watchdog-e2e-*/
.env
.env.fish
sequencer.db
sequencer.db-shm
sequencer.db-wal
/out/
examples/canonical-app/out/
/.DS_Store
.vscode/
soljson-latest.js
**/states/
__pycache__/
/benchmarks/
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,7 @@ Before finishing a change, ensure:
- [`docs/threat-model/README.md`](docs/threat-model/README.md) — trust boundaries, in-scope and out-of-scope threats.
- [`docs/recovery/README.md`](docs/recovery/README.md) — recovery design, TLA+ formal verification, design history.
- [`docs/snapshots/`](docs/snapshots/) — app snapshots: [`format.md`](docs/snapshots/format.md) (dump trait + wire format) and [`lifecycle.md`](docs/snapshots/lifecycle.md) (take/promote/GC/lease design + crash-safety).
- [`docs/watchdog/operator-deployment.md`](docs/watchdog/operator-deployment.md) — production-like watchdog (Sepolia / mainnet; internal snapshot API).
- [`docs/watchdog/getting-started.md`](docs/watchdog/getting-started.md) — local dev: watchdog + `sequencer-devnet` on Anvil.
- [`docs/watchdog/README.md`](docs/watchdog/README.md) — watchdog architecture, compare vs advance modes, test commands.
- [`sequencer-core/`](sequencer-core/) — shared domain types and protocol contracts.
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ Rust edition 2024 / Axum API / SQLite (rusqlite, WAL) / EIP-712 signing / SSZ en
- **[`docs/threat-model/README.md`](docs/threat-model/README.md)** — trust boundaries and in-scope threats.
- **[`docs/recovery/README.md`](docs/recovery/README.md)** — preemptive recovery design + TLA+ proofs.
- **[`docs/snapshots/lifecycle.md`](docs/snapshots/lifecycle.md)** — snapshot lifecycle design + invariants (take/promote/GC, crash-safety). Read before touching the inclusion lane's safe-frontier/snapshot path.
- **[`docs/watchdog/operator-deployment.md`](docs/watchdog/operator-deployment.md)** — watchdog on live L1 (Sepolia / mainnet, production-like).
- **[`docs/watchdog/getting-started.md`](docs/watchdog/getting-started.md)** — local dev: watchdog + `sequencer-devnet` on Anvil.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ released even on client disconnect.

Related docs:
- App snapshots (format + lifecycle): `docs/snapshots/`
- Watchdog — local dev: [`docs/watchdog/getting-started.md`](docs/watchdog/getting-started.md); Sepolia/mainnet: [`docs/watchdog/operator-deployment.md`](docs/watchdog/operator-deployment.md)

## Prototype Limits

Expand Down Expand Up @@ -217,6 +218,9 @@ Some tests require [Foundry](https://getfoundry.sh) (`anvil` on PATH). They run
- [`CLAUDE.md`](CLAUDE.md) — quick reference for shell setup and commands.
- [`docs/threat-model/README.md`](docs/threat-model/README.md) — trust boundaries, in-scope and out-of-scope threats.
- [`docs/recovery/README.md`](docs/recovery/README.md) — recovery design, TLA+ formal verification, design history.
- [`docs/watchdog/getting-started.md`](docs/watchdog/getting-started.md) — step-by-step: run the watchdog with a local sequencer.
- [`docs/watchdog/operator-deployment.md`](docs/watchdog/operator-deployment.md) — watchdog on live L1 (Sepolia staging, mainnet production).
- [`docs/watchdog/README.md`](docs/watchdog/README.md) — watchdog architecture, modules, and test commands.
- [`sequencer-core/`](sequencer-core/) — shared domain types (`Application`, `SignedUserOp`, `Batch`, `Frame`).
- [`examples/app-core/`](examples/app-core/) — placeholder wallet app implementing the `Application` trait.

Expand Down
Loading
Loading