Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
92b1255
docs: plan the shared recovery tool and fix the cockroach recovery docs
GCdePaula Oct 29, 2026
7129233
docs: redesign the shared recovery tool as an L1-only segment
GCdePaula Oct 30, 2026
aeae798
docs: settle bases, the count and client backups in the recovery plan
GCdePaula Oct 30, 2026
e7575c5
docs: rewrite the recovery plan around the two-phase replay
GCdePaula Nov 2, 2026
d676406
docs: add a simpler recovery plan candidate, and settle the L' floor
GCdePaula Nov 3, 2026
e8b47b1
docs: add the sequencer recovery plan, built on the owner's procedure
GCdePaula Nov 4, 2026
acc013f
docs: layer the sequencer recovery plan for Bart's team
GCdePaula Nov 5, 2026
8f4d741
docs: fold the design review's findings into the recovery plan
GCdePaula Nov 5, 2026
2180bd0
docs: setup refuses any non-empty data directory
GCdePaula Nov 5, 2026
44de290
docs: drop the recovery plan's decisions ledger
GCdePaula Nov 5, 2026
f83b51f
docs: add the user-op matrix and the interfaces to the recovery plan
GCdePaula Nov 10, 2026
b691d88
feat: free-standing canonical scheduler and shared executor
GCdePaula Nov 10, 2026
52b242d
feat(setup): rebuild the history from L1 with setup --base
GCdePaula Nov 10, 2026
36337b9
test: prove the recovery with vectors, devnet drills and measurements
GCdePaula Nov 10, 2026
09ca87c
docs: name the revision the recovery measurements ran on
GCdePaula Nov 10, 2026
e38baab
refactor: rename the executed-input count to the L2 tx count
GCdePaula Nov 10, 2026
1fa206a
docs: read template hashes from the released images
GCdePaula Nov 10, 2026
fa8f3d0
test(setup): rebuild the worked boundary
GCdePaula Nov 10, 2026
676fd0a
feat(egress): stop serving raw L1 inputs for projection replay
GCdePaula Nov 10, 2026
2d1f9ce
docs: the devnet recovery drills now run in CI
GCdePaula Nov 10, 2026
6dcda8a
refactor(commands): the black-box echo no longer compares a fault wit…
GCdePaula Nov 10, 2026
b1dea93
refactor(setup): pin the deployment identity with a plain insert
GCdePaula Nov 10, 2026
8e2fa51
refactor(storage): storage decides when the accepted frontier is main…
GCdePaula Nov 10, 2026
2a413fe
refactor(storage): STRICT tables and one SQL name for the L2 tx count
GCdePaula Nov 10, 2026
f5d26ff
feat(storage): the era is one immutable row
GCdePaula Nov 10, 2026
93b79e0
feat(setup): rebuilt history rows are written once, already executed
GCdePaula Nov 10, 2026
b5d1a01
feat(storage): the valid batches are a list by constraint
GCdePaula Nov 10, 2026
3e7a15f
feat(storage): acceptance is a write-once column on the batch
GCdePaula Nov 10, 2026
d660d68
feat(storage): one snapshots table; download leases live in the process
GCdePaula Nov 10, 2026
611a8e1
refactor(storage): the lane's head is opaque and storage is crate-pri…
GCdePaula Nov 10, 2026
9ad1b6f
refactor(run): one migrating open; read-only opens where nothing writes
GCdePaula Nov 10, 2026
2d5aee7
feat(storage): pin the direct-payload cap with the deployment identity
GCdePaula Nov 10, 2026
2c77909
refactor(storage): named results and an opaque local batch id
GCdePaula Nov 10, 2026
82162db
refactor(storage): test-only surface leaves production; storage tests…
GCdePaula Nov 10, 2026
0fd99e3
refactor(l1): the reader's append takes the time
GCdePaula Nov 10, 2026
252caed
feat(l1): a witness for write-before-broadcast
GCdePaula Nov 10, 2026
9178a95
docs: plan one recovery, without the standard recovery
GCdePaula Nov 11, 2026
93fa991
feat: the staleness window comes from the application
GCdePaula Nov 11, 2026
a124b11
docs: settle the outage plan's open points
GCdePaula Nov 11, 2026
3cac797
refactor(l1): the mempool flusher lives with the other L1 code
GCdePaula Nov 11, 2026
4d72b77
feat: the sequencer stops for good on a void history
GCdePaula Nov 11, 2026
caa2a4b
feat(storage): the batches are an append-only list
GCdePaula Nov 11, 2026
6e8447f
refactor(storage): a batch's key is its nonce
GCdePaula Nov 11, 2026
7ec9856
feat(egress): a history's identity is its era
GCdePaula Nov 11, 2026
9871a91
docs: correct what an audit against the code found
GCdePaula Nov 11, 2026
98c98ed
feat(wallet): the staleness window is 7200 blocks
GCdePaula Nov 11, 2026
3651aa0
refactor(storage): name the accepted snapshot for what it is
GCdePaula Nov 11, 2026
0db8bb8
docs: retire the outage plan's page
GCdePaula Nov 11, 2026
67dc5dc
fix(commands): the black box does not copy a terminal fact
GCdePaula Nov 11, 2026
2aaa4d7
docs(plan): an application's author may bring their own scheduler
GCdePaula Nov 11, 2026
3f91ba7
docs(review): record libdex's answers and what they open
GCdePaula Nov 12, 2026
02ee33e
docs(plan): ask how libdex authenticates a user op sent by L1
GCdePaula Nov 12, 2026
0399665
test(fee-oracle): a poll that meets a busy database tries again
GCdePaula Nov 12, 2026
50a6831
docs(review): the safe tag's cadence depends on the L1 node
GCdePaula Nov 12, 2026
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
124 changes: 103 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,20 @@ env:
jobs:
build-wallet-sequencer:
name: Build wallet-sequencer (${{ matrix.arch }})
runs-on: ubuntu-24.04
# Each arch builds natively on its own runner, the way CI builds: the
# sequencer links the pinned emulator's static archive, which the
# cartesi-machine .deb ships only for the host's arch and which links only
# against GCC 14's libstdc++.
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
target: x86_64-unknown-linux-gnu
- arch: arm64
runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu

steps:
Expand All @@ -66,17 +72,27 @@ jobs:
- name: Load toolchain pins
uses: ./.github/actions/load-toolchain-pins

# libclang for the emulator bindings' bindgen; cmake for aws-lc-sys; the
# .deb's libcartesi.a references libslirp.
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
ca-certificates \
lua5.4 \
liblua5.4-dev \
libslirp-dev \
build-essential \
pkg-config \
libssl-dev
cmake \
libclang-dev \
libslirp-dev \
pkg-config

# Exports LIBCARTESI_PATH / INCLUDECARTESI_PATH; the binary links the
# archive statically, so the release host needs no emulator install.
- name: Install cartesi-machine
uses: ./.github/actions/install-cartesi-machine
with:
version: ${{ env.CARTESI_MACHINE_VERSION }}
sha256-amd64: ${{ env.CARTESI_MACHINE_SHA256_AMD64 }}
sha256-arm64: ${{ env.CARTESI_MACHINE_SHA256_ARM64 }}

# rust-toolchain.toml is the only Rust pin.
- name: Install Rust toolchain
Expand All @@ -85,15 +101,26 @@ jobs:
rustup toolchain install
rustup target add ${{ matrix.target }}

- name: Install cross
uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 # v2.87.28
with:
tool: cross@${{ env.CROSS_VERSION }}

# `sequencer` is a library crate; the runnable reference binary is the
# `wallet-sequencer` example app (sequencer lib + the placeholder wallet).
- name: Build (release)
run: cross build -p wallet-sequencer --release --locked --target ${{ matrix.target }}
run: cargo build -p wallet-sequencer --release --locked --target ${{ matrix.target }}

# The runner has libcartesi.so installed, so loading proves little on its
# own: the binary must not name it, or release hosts would need the .deb.
- name: Check the binary's shared libraries
env:
TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
bin="target/${TARGET}/release/wallet-sequencer"
needed="$(readelf -d "${bin}" | grep NEEDED)"
echo "${needed}"
if grep -q libcartesi <<< "${needed}"; then
echo "::error::wallet-sequencer links libcartesi dynamically"
exit 1
fi
"${bin}" setup --help > /dev/null

- name: Package
env:
Expand All @@ -114,22 +141,77 @@ jobs:
cat > "package/wallet-sequencer-${TAG}-linux-${ARCH}/RUNNING.md" <<'EOF'
## Running

Required environment variables:
`wallet-sequencer` is the reference sequencer: the sequencer library with the
placeholder wallet. A data directory is set up once with `setup`, then served
with `run`.

### Host

The binary links the Cartesi Machine emulator statically (the version is
`toolchain.cartesi_machine` in RELEASE.json), so the emulator need not be
installed. The binary is built on Ubuntu 24.04 and the emulator's archive
with GCC 14, so the host needs that glibc and GCC 14's libstdc++: Ubuntu
24.04, Debian 13, or a newer release. At run time it loads libslirp, libgomp
and libstdc++, and its
L1 client reads the system's CA certificates:

- `CARTESI_SEQUENCER_BLOCKCHAIN_HTTP_ENDPOINT`
- `CARTESI_SEQUENCER_BLOCKCHAIN_ID`
- `CARTESI_SEQUENCER_APP_ADDRESS`
- `CARTESI_SEQUENCER_AUTH_PRIVATE_KEY` (or `CARTESI_SEQUENCER_AUTH_PRIVATE_KEY_FILE`)
```bash
apt-get install ca-certificates libgomp1 libslirp0 libstdc++6
```

Example:
### setup

`setup` starts an era in an empty data directory. It pins the deployment
identity, flushes the batch submitter's wallet with its key, which pins the
stop block, syncs L1, rebuilds the history from its base through the stop
block, and publishes the era.

- The base is genesis by default. `--base <MACHINE_DIR>` starts from a stored
canonical machine of the deployment's template, stopped between inputs and
stored by the emulator version this binary links.
- `--dry-run` prints the base's counts, the submitter's activity past it and
the rebuild's size, then exits. It needs no key and never touches the data
directory.
- It needs `CARTESI_SEQUENCER_BLOCKCHAIN_HTTP_ENDPOINT`,
`CARTESI_SEQUENCER_BLOCKCHAIN_ID`, `CARTESI_SEQUENCER_APP_ADDRESS`,
`CARTESI_SEQUENCER_BATCH_SUBMITTER_ADDRESS` and, unless `--dry-run`, the
submitter's key, `CARTESI_SEQUENCER_AUTH_PRIVATE_KEY` or
`CARTESI_SEQUENCER_AUTH_PRIVATE_KEY_FILE` (whose first line is the key),
which must sign for that address. Chains other than Ethereum mainnet and
Sepolia also need a fee-oracle source, such as
`CARTESI_SEQUENCER_FEE_ORACLE_FIXED_LOG_GAS_PRICE`.

Setup refuses a data directory that holds anything (exit 30), so it runs once
per directory; never run it on every boot. Its retryable L1 checks run before
it writes anything, so retry an exit 20 in the same directory; if the retry
is refused because the directory is not empty, or setup failed any other
way, discard the directory and run setup again. Exit 40 means the old
instance's submitter landed an input past the stop block or still has a
transaction pending: stop the old instance, discard this data directory,
run setup again.

### run

`run` serves a directory that setup completed, reading the identity from it.
It needs `CARTESI_SEQUENCER_BLOCKCHAIN_HTTP_ENDPOINT` and the same key.

### Example

```bash
CARTESI_SEQUENCER_BLOCKCHAIN_HTTP_ENDPOINT=http://127.0.0.1:8545 \
export CARTESI_SEQUENCER_BLOCKCHAIN_HTTP_ENDPOINT=http://127.0.0.1:8545
export CARTESI_SEQUENCER_AUTH_PRIVATE_KEY_FILE=/run/secrets/submitter-key
export CARTESI_SEQUENCER_DATA_DIR=/var/lib/sequencer

CARTESI_SEQUENCER_BLOCKCHAIN_ID=31337 \
CARTESI_SEQUENCER_APP_ADDRESS=0x1111111111111111111111111111111111111111 \
CARTESI_SEQUENCER_AUTH_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
./wallet-sequencer
CARTESI_SEQUENCER_BATCH_SUBMITTER_ADDRESS=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
CARTESI_SEQUENCER_FEE_ORACLE_FIXED_LOG_GAS_PRICE=0 \
./wallet-sequencer setup # or: setup --base ./canonical-machine

./wallet-sequencer run
```

Each subcommand's `--help` lists every option and its environment variable.
EOF

tar -C package -czf "dist/wallet-sequencer-${TAG}-linux-${ARCH}.tar.gz" "wallet-sequencer-${TAG}-linux-${ARCH}"
Expand Down
Loading
Loading