Skip to content

Commit d0352a1

Browse files
author
AztecBot
committed
chore: merge public-next into next
2 parents d6a30af + 80737fd commit d0352a1

43 files changed

Lines changed: 656 additions & 77 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
name: network-spot-check
3+
description: Spot-check the health of a live Aztec network deployment by sweeping recent GCP logs for warn/error messages, mapping each to the deployed code, classifying expected vs unexpected, and verifying the hard invariants (no slashing, no attestation timeouts, no unexplained prunes/conflicts). Use when asked to "spot-check", "review logs", or "health check" a network (staging, testnet, devnet, ...) over a recent window.
4+
argument-hint: <namespace and window, e.g. "staging-internal, last 4 hours">
5+
---
6+
7+
# Network spot-check
8+
9+
A structured review of a live network's recent logs. This goes deeper than a one-off
10+
`/network-logs` query: it sweeps a whole time window, maps every distinct warn/error to
11+
the code that emits it, verifies the network's hard invariants with explicit queries, and
12+
produces a classified report. It was designed from a staging-internal review; the
13+
procedure generalizes to any namespace.
14+
15+
## Parameters
16+
17+
- **Namespace**: which deployment (e.g. `staging-internal`, `testnet`, `devnet`). Ask if unclear.
18+
- **Window**: default the last 4 hours.
19+
- **Deployed branch**: which git branch the network runs. Do NOT assume it is the current
20+
checkout. As of 2026-07, `staging-internal` runs `v5-next` while the default checkout is
21+
`next` — a log string that exists on one line may not exist on the other. If unknown, ask,
22+
or determine it empirically: `git grep "<log message>" origin/<branch> -- yarn-project` and
23+
`git log -S "<log message>" --all --oneline` to see which line contains a given message.
24+
- **Invariants / acceptable errors**: unless the operator overrides, use the defaults below.
25+
26+
## Procedure
27+
28+
### 1. Delegate the sweep to a subagent
29+
30+
Spawn a **sonnet** `network-logs` subagent (keeps the token-heavy log dumps out of the main
31+
context). Its prompt must ask for, over the full window:
32+
33+
1. All warn+error entries from the core block-building/sync modules — **sequencer**,
34+
**validator**, **archiver**, and **slasher** (`slasher:*` plus the offense watchers:
35+
`attested-invalid-proposal-watcher`, `checkpoint-equivocation-watcher`,
36+
`data-withholding-watcher`, `broadcasted-invalid-checkpoint-proposal-watcher`) — and
37+
from the supporting subsystems where their failures actually surface: `p2p:*`
38+
(attestation pool/gossip, tx collection, peering), `world-state:*` (sync),
39+
`node:l1-tx-utils` / `ethereum:publisher` (L1 tx submission — where failed checkpoint
40+
pushes show up), and `prover-node:*` (epoch-monitor / epoch-proving-job — epochs that
41+
fail to prove are what eventually cause prunes). Page through the window; do not
42+
sample only the newest entries.
43+
2. Grouping by **distinct message template**, with count, first/last timestamp, and emitting pods.
44+
3. Code mapping: grep the checkout for each template to find the emitting `file:line` and
45+
understand the condition that fires it.
46+
4. Surrounding context (same pod, ±2 min, all severities) for anything significant: what led
47+
to it, and did the node recover.
48+
5. The explicit invariant checks from step 3 below, with the queries used.
49+
6. Overall health signals: checkpoint/block heights advancing monotonically with no gaps,
50+
archiver download lag, pod restarts (a restart marks a redeploy — relevant for classification).
51+
52+
Have it return raw structured data (tables, sample lines with timestamps and pods), not prose.
53+
54+
### 2. Verify the code mapping yourself
55+
56+
The subagent greps the working checkout; re-check anything it could not find against the
57+
**deployed branch** (`git grep "<msg>" origin/<deployed-branch>`, `git log -S`). Read the
58+
emitting function before classifying: the surrounding code and comments usually state whether
59+
the path is expected (e.g. an early-return for empty blocks) or a genuine failure.
60+
61+
### 3. Explicit invariant checks (never skip, even if the sweep looks clean)
62+
63+
Run these as direct queries over the window, all severities, and report each as a
64+
zero/non-zero with the query used:
65+
66+
- **Slashing** (must be zero): `[Ss]lash` — then distinguish real slashing from bookkeeping.
67+
`Starting new slashing round N` (slasher_client.ts `handleNewRound`) is routine round
68+
rotation, NOT slashing. Also check `executed with` (slash execution), `[Oo]ffen[cs]e`
69+
(offense detection), and `Slashing is disabled`. Any activity from the offense watchers
70+
listed in step 1 means a node misbehaved (equivocation, invalid proposal, data
71+
withholding) — investigate it even if no slash was ever executed.
72+
- **Attestation-collection timeouts** (must be zero): the exact string is
73+
`Timeout while waiting for attestations` (sequencer-client, checkpoint proposal job,
74+
fires on `AttestationTimeoutError`).
75+
- **Prunes**: `[Pp]run`. A short prune following a checkpoint that failed to push to L1
76+
under congestion is acceptable; anything else needs a root cause.
77+
- **Conflicts / reorgs**: `[Cc]onflict`, `[Rr]eorg` — must be zero.
78+
- **Timeout sweep**: `[Tt]imeout|[Tt]imed out` — classify every hit.
79+
80+
### 4. Classification
81+
82+
**Acceptable (list, don't alarm):**
83+
- Checkpoint push to L1 failing under L1 congestion, followed by a short prune.
84+
- Errors clearly caused by a redeploy/restart (correlate with pod restart times).
85+
- Known noise (verify these are still current before relying on the list):
86+
- `Uniswap V4 StateView contract not found, skipping fee asset price oracle` — StateView
87+
only exists on mainnet; expected everywhere else.
88+
- OTel telemetry noise: `BatchSpanProcessor dropping spans` and
89+
`PeriodicExportingMetricReader ... Request Timeout` blips (cross-pod, simultaneous =
90+
shared collector hiccup; confirm block production continued through it).
91+
- `Provided no txs to ... addTxs` from the prover orchestrator — expected for every empty
92+
block (demoted to verbose in PR #24593; only relevant on lines without that change).
93+
94+
**Investigate and report prominently (raw lines, timestamps, pods, counts, root cause):**
95+
any slashing, attestation-collection timeouts, unexplained prunes, conflicts/reorgs, sync
96+
failures, or unclassified timeouts.
97+
98+
### 5. Correlating L1-wait timeouts with actual L1 blocks
99+
100+
`Timed out waiting for previous L1 block before sending requests, proceeding`
101+
(sequencer-publisher, from PR #24037) is the designed fallback when the L1 slot right before
102+
the target slot appears skipped. To confirm each occurrence against ground truth:
103+
104+
1. Pull the entries with `--format=json`: the `jsonPayload` carries `previousL1BlockTs`,
105+
`waitDeadlineTs` (= previousL1BlockTs + 8s default), `targetSlot`.
106+
2. For each `previousL1BlockTs`, find the bracketing L1 blocks via an execution RPC
107+
(`eth_getBlockByNumber`; estimate the block number from a latest-block anchor at 12s/slot,
108+
then step). L1 slot timestamps are 12s-aligned: if no block carries exactly that timestamp
109+
(i.e. it falls inside a ≥24s gap), the slot was genuinely missed and the warn is benign.
110+
3. Ask the operator for an RPC endpoint for the network's L1 if none is configured. Be
111+
gentle with third-party endpoints: cache every block fetched, sleep between calls, and
112+
back off on HTTP 429.
113+
114+
If the slot was NOT missed, the node's L1 RPC served the block late — then (and only then)
115+
dig into what the node's L1 watchers/archiver were doing at that moment.
116+
117+
### 6. Deliverable
118+
119+
Full classified report (distinct-template table, invariant check results with queries,
120+
context samples, health signals) as a gist; short outcome-first summary in the thread. If a
121+
log turns out to be mis-leveled (routine control flow logged at warn), propose demoting it —
122+
but only open a PR when the operator asks, and against the branch they name.

.github/workflows/ensure-funded-environment.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,15 @@ jobs:
103103
run: |
104104
# Fetch the environment-specific secrets
105105
FUNDING_PRIVATE_KEY=$(gcloud secrets versions access latest --secret="sepolia-funding-private-key" --project="$GCP_PROJECT_ID")
106+
EXTERNAL_ETHEREUM_HOST=$(gcloud secrets versions access latest --secret="sepolia-external-ethereum-host" --project="$GCP_PROJECT_ID")
106107
echo "::add-mask::$FUNDING_PRIVATE_KEY"
108+
echo "::add-mask::$EXTERNAL_ETHEREUM_HOST"
107109
108110
# Export to environment
109-
echo "FUNDING_PRIVATE_KEY=$FUNDING_PRIVATE_KEY" >> $GITHUB_ENV
111+
{
112+
printf 'FUNDING_PRIVATE_KEY=%s\n' "$FUNDING_PRIVATE_KEY"
113+
printf 'EXTERNAL_ETHEREUM_HOST=%s\n' "$EXTERNAL_ETHEREUM_HOST"
114+
} >> "$GITHUB_ENV"
110115
111116
- name: Ensure funded environment
112117
env:

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Otherwise infer from the component being worked in:
4040
| `barretenberg/cpp/src/barretenberg/vm2/**` | `merge-train/avm` |
4141
| everything else | `next` |
4242

43-
The bases above target the `next` line. For work scoped to the v5 release line, use `merge-train/spartan-v5` (which targets `v5-next`) in place of `merge-train/spartan`.
43+
The bases above target the `next` line. For work scoped to a release line, use the matching `merge-train/spartan-v<N>` in place of `merge-train/spartan`: `merge-train/spartan-v5` targets `v5-next`, and `merge-train/spartan-v6` targets `v6-next` (the public staging line for v6 work).
4444

4545
Use the discovered base in `git diff origin/<base>...HEAD` and `git log origin/<base>..HEAD`. Always `git fetch` before creating branches so the base is not stale.
4646
</critical_never_assume_master>

barretenberg/sol/foundry.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ gas_limit = 900000000000000000
99
bytecode_hash = "none"
1010
evm_version = "cancun"
1111

12-
[fuzz]
13-
runs = 2
14-
1512
# Use the pre-downloaded solc binary from l1-contracts. l1-contracts' build is
1613
# the single owner of the svm download; pointing other forge projects at the
1714
# same binary avoids parallel svm downloads racing on ~/.svm.
1815
solc = "../../l1-contracts/solc-0.8.30"
1916

17+
[fuzz]
18+
runs = 2
19+
2020
[lint]
2121
ignore = ["./lib/**"]
2222
exclude_lints = [

docs/developer_versioned_docs/version-v4.3.1/docs/aztec-nr/framework-description/authentication_witnesses.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ references: ["noir-projects/noir-contracts/contracts/app/token_contract/src/main
88

99
Authentication witnesses (authwit) allow other contracts to execute actions on behalf of your account. This guide shows you how to implement and use authwits in your Aztec smart contracts.
1010

11+
import YouTubeEmbed from '@site/src/components/YouTubeEmbed';
12+
13+
For a video walkthrough of the concepts and the implementation pattern, watch this explainer (find more on the [video lessons](../../resources/video_lessons.mdx) page):
14+
15+
<YouTubeEmbed videoId="VRZVOCdjGZ4" title="How Authorization Works on Aztec" />
16+
1117
## Prerequisites
1218

1319
- An Aztec contract project set up with `aztec-nr` dependency

docs/developer_versioned_docs/version-v4.3.1/docs/foundational-topics/advanced/authwit.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ description: Learn about Aztec's Authentication Witness scheme that enables secu
88

99
Authentication Witness is a scheme for authenticating actions on Aztec, allowing users to authorize third-parties (protocols or other users) to execute actions on their behalf.
1010

11+
import YouTubeEmbed from '@site/src/components/YouTubeEmbed';
12+
13+
For a video walkthrough of how authwits work, including both the private and public flows, watch this explainer (find more on the [video lessons](../../resources/video_lessons.mdx) page):
14+
15+
<YouTubeEmbed videoId="VRZVOCdjGZ4" title="How Authorization Works on Aztec" />
16+
1117
## Summary
1218

1319
- **Authwits authorize specific actions**, not blanket allowances like ERC20 approvals

docs/developer_versioned_docs/version-v4.3.1/docs/foundational-topics/call_types.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ We say that a smart contract is called when one of its functions is invoked and
1818

1919
There are multiple types of calls, and some of the naming can make things **very** confusing. This page lists the different call types and execution modes, pointing out key differences between them.
2020

21+
import YouTubeEmbed from '@site/src/components/YouTubeEmbed';
22+
23+
A key property of Aztec calls is that contracts can call each other privately, keeping even the call stack itself private. This two-minute explainer covers the idea before we get into the details (find more on the [video lessons](../resources/video_lessons.mdx) page):
24+
25+
<YouTubeEmbed videoId="idxRuGQnQKs" title="What is Private Composability? An Aztec Explainer" />
26+
2127
## Ethereum Call Types
2228

2329
Aztec's design is heavily influenced by Ethereum, and many APIs and concepts are similar. This section provides background on Ethereum call types for context. If you're already familiar with Ethereum, you can skip to [Aztec Call Types](#aztec-call-types).

docs/developer_versioned_docs/version-v4.3.1/docs/foundational-topics/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@ description: Overview of Aztec, a privacy-first Layer 2 on Ethereum supporting s
66
---
77

88
import Image from "@theme/IdealImage";
9+
import YouTubeEmbed from "@site/src/components/YouTubeEmbed";
910

1011
This page outlines Aztec's fundamental technical concepts. It is recommended to read this before diving into building on Aztec.
1112

1213
## What is Aztec?
1314

1415
Aztec is a privacy-first Layer 2 on Ethereum. It supports smart contracts with both private & public state and private & public execution.
1516

17+
Prefer video? This explainer covers the core idea in under 90 seconds, and there are more [video lessons](../resources/video_lessons.mdx) available.
18+
19+
<YouTubeEmbed videoId="urcBvo2QJp0" title="What is Aztec: Explained in Under 90 Seconds" />
20+
1621
<Image img={require("@site/static/img/Aztec_overview.png")} />
1722

1823
## High level view

docs/developer_versioned_docs/version-v4.3.1/docs/foundational-topics/transactions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ references: ["noir-projects/noir-contracts/contracts/account/ecdsa_k_account_con
77
---
88

99
import Image from '@theme/IdealImage';
10+
import YouTubeEmbed from '@site/src/components/YouTubeEmbed';
1011

1112
On this page you'll learn:
1213

@@ -15,6 +16,10 @@ On this page you'll learn:
1516
- The private and public kernel circuits and how they execute function calls
1617
- The call stacks for private and public functions and how they determine a transaction's completion
1718

19+
For a two-minute visual overview of how a single transaction spans private and public execution, watch this explainer (find more on the [video lessons](../resources/video_lessons.mdx) page):
20+
21+
<YouTubeEmbed videoId="MayopgQ1FjI" title="One Transaction, Two Worlds: Private and Public State on Aztec" />
22+
1823
## Simple Example of the (Private) Transaction Lifecycle
1924

2025
The transaction lifecycle for an Aztec transaction is fundamentally different from the lifecycle of an Ethereum transaction.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Video lessons
3+
description: "Learn Aztec through short video explainers covering what Aztec is, private and public state, private composability, and getting started."
4+
tags: [videos, learning]
5+
sidebar_position: 0
6+
---
7+
8+
import YouTubeEmbed from "@site/src/components/YouTubeEmbed";
9+
10+
Prefer watching to reading? These short explainers, presented by Ciara Nightingale from the Aztec team, each cover a core Aztec concept in just a few minutes. Written pages that go deeper are linked below each video.
11+
12+
## What is Aztec?
13+
14+
Aztec is a privacy-first Layer 2 on Ethereum: a zero-knowledge rollup where smart contracts can have both public and private state, and private execution happens locally on your own device. This video explains the core idea in under 90 seconds.
15+
16+
<YouTubeEmbed videoId="urcBvo2QJp0" title="What is Aztec: Explained in Under 90 Seconds" />
17+
18+
Related reading: [Aztec overview](../../overview.md), [foundational topics](../foundational-topics/index.md)
19+
20+
## Private and public state in one transaction
21+
22+
A single Aztec transaction can span private and public execution. Using a private voting contract as the example, this video shows how private execution runs first on your device, producing a proof and side effects (nullifiers, note commitments, and enqueued public calls) that the sequencer then applies in public, keeping your vote private while the tally stays public.
23+
24+
<YouTubeEmbed videoId="MayopgQ1FjI" title="One Transaction, Two Worlds: Private and Public State on Aztec" />
25+
26+
Related reading: [transactions](../foundational-topics/transactions.md), [state management](../foundational-topics/state_management.md)
27+
28+
## What is private composability?
29+
30+
On Aztec, smart contracts can call each other privately. Because transactions execute and prove locally, not only the state but the call stack itself can stay private: nobody watching the chain learns which contract called which. This video explains how that lets you build on top of other apps permissionlessly, just like Ethereum, without leaking what you are doing.
31+
32+
<YouTubeEmbed videoId="idxRuGQnQKs" title="What is Private Composability? An Aztec Explainer" />
33+
34+
Related reading: [call types](../foundational-topics/call_types.md), [calling other contracts](../aztec-nr/framework-description/calling_contracts.md)
35+
36+
## How authorization works (authwits)
37+
38+
Authentication witnesses (authwits) are Aztec's generalized alternative to Ethereum's approve and transferFrom pattern: they authorize a specific action for a specific caller, work in both private and public execution, and prevent replay. This lesson walks through the message hash structure, the private and public flows, and the `#[authorize_once]` macro.
39+
40+
<YouTubeEmbed videoId="VRZVOCdjGZ4" title="How Authorization Works on Aztec" />
41+
42+
Related reading: [authentication witness concepts](../foundational-topics/advanced/authwit.md), [using authwits in aztec.nr](../aztec-nr/framework-description/authentication_witnesses.md)
43+
44+
## Get started in under 60 seconds
45+
46+
Ready to build? This video walks through installing the Aztec tooling, creating a new contract project, compiling it, and deploying it to a local network, all in under a minute.
47+
48+
<YouTubeEmbed videoId="_jgHNdNgFOg" title="Get Started on Aztec in Under 60 Seconds" />
49+
50+
Related reading: [getting started on a local network](../../getting_started_on_local_network.md)
51+
52+
## More videos
53+
54+
For a full-length course and more explainers, visit the [Aztec Network YouTube channel](https://www.youtube.com/@aztecnetwork).

0 commit comments

Comments
 (0)