feat: merge-train/spartan - #24834
Merged
Merged
Conversation
Reduce the mainnet SLASH_INACTIVITY_TARGET_PERCENTAGE default from 0.8 (80%) to 0.7 (70%) in spartan/environments/network-defaults.yml. Only the networks.mainnet preset is changed; devnet/testnet and the top-level slasher anchor (all 0.9) are untouched.
The sweep resolves the nightly git tag + docker image for the current day and verifies the tag exists. It was scheduled at 03:30 UTC, before the Nightly Release Tag workflow (04:00 UTC) creates that tag, so "Verify source git ref" failed with "couldn't find remote ref". Align it with the other nightly consumers (spartan-bench, deploy-next-net) at 06:00 UTC.
Lowers the mainnet `SLASH_INACTIVITY_TARGET_PERCENTAGE` default from `0.8` (80%) to `0.7` (70%) in `spartan/environments/network-defaults.yml`. This is the per-epoch attestation miss ratio at which a validator is counted inactive. Only the `networks.mainnet` preset changes; devnet/testnet and the top-level slasher anchor (all `0.9`) are untouched. Changes a baked-in default for future builds — does not retroactively affect the running network.
WorkerWallet.call unconditionally JSON.parse'd the transport response, but void-returning methods (registerContract, registerContractClass) come back as `undefined` from the worker. JSON.parse(undefined) throws `SyntaxError: "undefined" is not valid JSON`, which crashed registerSponsoredFPC during n_tps.test.ts setup and failed every nightly bench inclusion-sweep point (1/5/10 TPS) deterministically. Pass an undefined response straight to the method's schema, whose z.void() output accepts it, and widen callRaw's return type to string | undefined to match.
## Problem The **Nightly Bench Inclusion Sweep** ([failing run](https://github.com/AztecProtocol/aztec-packages/actions/runs/29801774127)) resolves the nightly git tag + docker image for the current day and verifies the tag exists: ``` git fetch --depth 1 origin refs/tags/v6.0.0-nightly.20260721:... fatal: couldn't find remote ref refs/tags/v6.0.0-nightly.20260721 ``` That tag is created by the separate **Nightly Release Tag** workflow at `0 4 * * *` (04:00 UTC), but the sweep was scheduled at `30 3 * * *` (03:30 UTC) — 30 min *before* the tag exists. GitHub's scheduled-run jitter preserves the gap (today the sweep ran at 04:38 UTC, the tag was created at 05:04 UTC), so `Verify source git ref` fails and the downstream `cleanup`/`notify-failure` jobs cascade. ## Fix Move the sweep to `0 6 * * *` (06:00 UTC), aligning it with the other nightly *consumers* (`nightly-spartan-bench`, `deploy-next-net`) which already run at 06:00 — a 2h margin over the 04:00 tag job.
) ## Problem Every point of the [Nightly Bench Inclusion Sweep](https://github.com/AztecProtocol/aztec-packages/actions/runs/29801774127) (1/5/10 TPS) failed identically, ~5ms into the `n_tps.test.ts` body, during `registerSponsoredFPC` setup: ``` SyntaxError: "undefined" is not valid JSON at JSON.parse (<anonymous>) at WorkerWallet.call (test-wallet/worker_wallet.ts:127) at registerSponsoredFPC (fixtures/setup.ts:821) ``` `WorkerWallet.call` unconditionally `JSON.parse`d the worker's transport response. But void-returning methods — `registerContract`, `registerContractClass` (both `output: z.void()` in `WalletSchema`) — return nothing, and `jsonStringify(undefined)` yields `undefined`, which arrives at the client as the JS value `undefined` over the structured-clone transport. `JSON.parse(undefined)` coerces to `JSON.parse("undefined")` and throws. The crash is in test setup, before any transactions are sent, so it is deterministic and independent of TPS — hence all three points failed the same way. The deployed network and the `6.0.0-nightly.20260721` image are not implicated. ## Fix Pass an `undefined` response straight to the method's schema (its `z.void()` output accepts `undefined`) instead of `JSON.parse`-ing it, and widen `callRaw`'s return type to `string | undefined`. ## Test Adds `worker_wallet.test.ts`, which builds a `WorkerWallet` over a stub transport that returns `undefined` and asserts `registerContract` / `registerContractClass` resolve. Verified red/green: against the old code it fails with the exact CI error (`"undefined" is not valid JSON`); with the fix it passes.
Collaborator
Author
|
🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEGIN_COMMIT_OVERRIDE
chore(spartan): lower mainnet inactivity slash target to 70% (#24827)
chore: add rate-limited testnet rpc client (#24836)
fix(ci): move nightly bench inclusion sweep to 06:00 UTC (#24830)
fix(bench): handle void worker-wallet returns in inclusion sweep (#24843)
END_COMMIT_OVERRIDE