Skip to content

feat: merge-train/spartan - #24993

Merged
AztecBot merged 12 commits into
nextfrom
merge-train/spartan
Jul 27, 2026
Merged

feat: merge-train/spartan#24993
AztecBot merged 12 commits into
nextfrom
merge-train/spartan

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

BEGIN_COMMIT_OVERRIDE
chore(bench): retire github-action-benchmark for network benchmarks (#24942)
fix(sequencer): diagnose why no committee exists instead of a scary log (#24760)
chore: add create-rpc-api-key skill (#24778)
END_COMMIT_OVERRIDE

spalladino and others added 10 commits July 16, 2026 23:07
Operators saw "Cannot propose at target slot N since the committee does not
exist on L1" and panicked. Replace it with a diagnosis derived from the live
attester count and whether the chain has ever produced a block:

- enough validators staked -> committee just waiting for the sampling lag (info)
- too few staked and no blocks yet -> bootstrap, waiting for validators (info)
- too few staked but blocks exist -> validator set shrank on a live chain (warn)

Dedupe the log per epoch instead of per slot, and make the diagnostic L1 reads
best-effort so the propose path never throws.
…atSeconds

The "no committee yet" diagnosis reported the epoch a committee should exist by
as currentEpoch + lag + 1 — a moving target that re-added the lag on every check
and never counted down. Replay L1's validator-set sampling rule instead: a
committee for epoch E exists iff at least targetCommitteeSize attesters were
staked at epochStart(E) - lag * epochDuration, so read the historical attester
count (via GSE.getAttesterCountAtTime) at each candidate epoch's sample time and
report the first epoch that actually qualifies. The estimate is now a fixed
epoch whose ETA converges and counts down, tagged by provenance (historical /
projected-future / fallback) so the log wording reflects its confidence.

Also moves formatSeconds out of the sequencer into @aztec/foundation/string.
…ittee.ts

Move logMissingCommittee, estimateFirstCommitteeEpoch, and formatEpochEta out of
the Sequencer class into missing_committee.ts as free functions taking a
MissingCommitteeContext deps object, so the sequencer only wires them in. Drop
the FirstCommitteeEpochProvenance enum: findFirstEpochWithCommittee now returns
EpochNumber | undefined, and the caller reports a bounded epoch when it is
undefined. Behavior-focused tests move alongside the functions.
spartan/.claude was missing the agents symlink required of every subdir
.claude/, and spartan/.codex/agents was missing its mirror, both caught
by the agents_symlink_test regression test.
The custom network-dashboard pipeline is now the single source of truth for
the nightly/weekly network benchmarks, so the duplicate github-action-benchmark
publishing path is removed:

- nightly-spartan-bench.yml: drop the legacy tps-scenario benchmark leg
  (deploy/wait/benchmark/cleanup/notify) entirely — it published only to
  github-action-benchmark and is superseded by the inclusion sweep
  (nightly-bench-inclusion-sweep.yml). The status job no longer gates on it.
- nightly-spartan-bench.yml: drop the github-action-benchmark upload from the
  proving and block-capacity jobs; both now publish to the custom pipeline.
- weekly-proving-bench.yml: drop the github-action-benchmark upload; real
  proving now publishes to the custom pipeline.

The on-demand PR-triggered ci-network-bench job (ci3.yml, 'ci-network-bench'
label) and the e2e microbenchmark suite are unaffected — their plumbing
(network-bench / gh-bench) is left in place.

Depends on the block-capacity (#24913) and real-proving (#24914) custom-pipeline
PRs; must merge after them so nothing goes dark mid-migration.
…24942)

A-1230. Makes the custom `network-dashboard` pipeline the single source
of truth for the nightly/weekly network benchmarks and removes the
duplicate github-action-benchmark publishing path.

## Changes

- **`nightly-spartan-bench.yml`** — remove the legacy **tps-scenario**
benchmark leg entirely (`deploy-bench-network` / `wait-bench-l2-block` /
`benchmark` / `cleanup-bench` / `notify-bench`). It published *only* to
github-action-benchmark and is superseded by the inclusion sweep
(`nightly-bench-inclusion-sweep.yml`). The `status` job no longer gates
on it.
- **`nightly-spartan-bench.yml`** — remove the github-action-benchmark
upload from the **proving** and **block-capacity** jobs (they now
publish to the custom pipeline).
- **`weekly-proving-bench.yml`** — remove the github-action-benchmark
upload (real proving now publishes to the custom pipeline).

Net: **zero `github-action-benchmark` references** remain in either
workflow (232 lines removed from nightly, 27 from weekly).

## Deliberately left in place

- The on-demand **PR-triggered `ci-network-bench` job** (`ci3.yml`,
opt-in `ci-network-bench` label) and its `network-bench` /
`gh-spartan-bench` plumbing — a developer tool, not the nightly
dashboard.
- The **e2e microbenchmark** suite (`gh-bench` / `gh-deploy-bench`,
`yarn-project/end-to-end/src/bench/*`) — a separate benchmark system.

## Merge order (important)

Depends on and **must merge after** the custom-pipeline PRs so nothing
goes dark mid-migration:
- #24913 (block capacity → custom pipeline)
- #24914 (real proving → custom pipeline)
- plus the inclusion sweep, already live.

Both custom-pipeline paths also need helm-sa `roles/logging.viewer`
applied for populated data. Recommend confirming a nightly + weekly
actually upload to the dashboard before merging this.
…og (#24760)

## Context

Operators on a freshly-canonical rollup saw `Cannot propose at target
slot N since the committee does not exist on L1` and panicked. The
message was cryptic and, worse, my first attempt reasoned about it
wrong: I assumed validators join at genesis, but they actually join
after the rollup is made canonical via governance. Verified against the
mainnet incident on `0x91ff…`: attester count stayed **0** for ~2 weeks
after genesis, then jumped to ~3462 the night the rollup went canonical
— so "committee should have formed by epoch 2" was nonsense.

## Approach

Diagnose the cause from two cheap live signals the sequencer already has
— the current attester count and whether the chain has ever produced a
block — rather than any genesis- or governance-time anchor
(canonical-registration time is an expensive log scan and predicts
validator *eligibility*, not *behavior*):

- `count ≥ target` → committee is just waiting for the sampling window
to advance; expected by `current + lag + 1` (**info**, with ETA).
- `count < target` and no blocks ever → bootstrap, waiting for
validators to stake (**info**).
- `count < target` but blocks exist → the validator set shrank below the
required size on a live chain, a genuine incident (**warn**).

The chain-tip signal (blocks-ever-produced) is what separates expected
bootstrap from a real validator-set regression. The classification is a
pure, unit-tested function; the sequencer composes and formats the log.
The diagnostic is deduped per epoch (was per slot, so it spammed every
~36–72s) and the extra L1 reads are best-effort so the propose path
never throws.

Fixes A-1423
Adds a `create-rpc-api-key` skill under `spartan/.claude/skills/` (new
skills directory for the spartan folder) that documents the end-to-end
workflow for adding a public RPC API key consumer to a mainnet/testnet
RPC environment.

Captures the steps proven while adding the recent mainnet clients: mint
the secret with `scripts/create_api_key.sh`, add the consumer to the
environment's Terraform, plan (guardrail: exactly 2 resources to add),
apply, verify the KongConsumer/ExternalSecret are live, and open the
one-line `chore: add new client` PR against `merge-train/spartan`. Also
covers prerequisites (gcloud/ADC, kubectl context, Terraform
state-version match), the working-directory/absolute-path gotcha, and
how to retrieve and hand over the key.

@ludamad ludamad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot
AztecBot enabled auto-merge July 27, 2026 11:02
@AztecBot

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

@AztecBot
AztecBot added this pull request to the merge queue Jul 27, 2026
Merged via the queue into next with commit 6dfe305 Jul 27, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants