Skip to content

Commit 16933d5

Browse files
authored
chore: remove unused l1-contracts repo mirror from release flow (#24929)
Stop pushing release tags to the AztecProtocol/l1-contracts mirror; the @aztec/l1-artifacts npm package is the supported distribution channel. The public and private release flows now share the same l1-contracts release entrypoint (the npm publish). To cover the mirror's remaining consumers: - expose the bundled foundry subtree via package exports - ship the governance payload contracts the rollup-upgrade tutorial deploys (RegisterNewRollupVersionPayload, TestPayloads) - point the tutorials at @aztec/l1-artifacts instead of the mirror
1 parent 2565b8f commit 16933d5

8 files changed

Lines changed: 64 additions & 133 deletions

File tree

bootstrap.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -660,12 +660,10 @@ function private_release {
660660
fi
661661

662662
# Publish @aztec/l1-artifacts to the internal registry. 13 yarn-project packages depend on it at the
663-
# release version, so it must exist before yarn-project's release smoke-test installs them. We call
664-
# only the npm publish, not l1-contracts' full `release` — that also git-mirrors tags to the public
665-
# AztecProtocol/l1-contracts repo, which the private flow must not do. amd64 only (npm packages are
666-
# platform-independent; mirrors the publish guard below).
663+
# release version, so it must exist before yarn-project's release smoke-test installs them. amd64
664+
# only (npm packages are platform-independent; mirrors the publish guard below).
667665
if [ $(arch) != arm64 ]; then
668-
l1-contracts/bootstrap.sh release_l1_artifacts_npm
666+
l1-contracts/bootstrap.sh release
669667
fi
670668

671669
# Publish for real, in dependency order: bb.js, the noir packages, ipc-runtime, and wsdb must be on

docs/docs-developers/docs/foundational-topics/ethereum-aztec-messaging/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,29 @@ The following diagram shows the overall architecture, combining the earlier sect
118118

119119
<Image img={require("@site/static/img/com-abs-7.png")} />
120120

121+
## Using the L1 contract interfaces in your own project
122+
123+
Portal contracts import Aztec's L1 interfaces (`IRegistry`, `IInbox`, `IOutbox`, `IRollup`, and supporting libraries). These ship in the [`@aztec/l1-artifacts`](https://www.npmjs.com/package/@aztec/l1-artifacts) npm package as a self-contained Foundry project under `l1-contracts/`, versioned to match each Aztec release:
124+
125+
```bash
126+
npm install @aztec/l1-artifacts@<aztec-version>
127+
```
128+
129+
In a Foundry project, add remappings so `@aztec/*` imports (and the bundled OpenZeppelin copy) resolve into the package:
130+
131+
```toml
132+
# foundry.toml
133+
remappings = [
134+
"@aztec/=node_modules/@aztec/l1-artifacts/l1-contracts/src/",
135+
"@oz/=node_modules/@aztec/l1-artifacts/l1-contracts/lib/openzeppelin-contracts/contracts/",
136+
"@aztec-blob-lib/=node_modules/@aztec/l1-artifacts/l1-contracts/src/core/libraries/rollup/"
137+
]
138+
```
139+
140+
Then import interfaces as `@aztec/core/interfaces/IRollup.sol`, `@aztec/governance/interfaces/IRegistry.sol`, and so on. Note that `forge install` cannot fetch the package: it only clones whole git repositories, and the L1 contract sources include generated files that exist only in built distributions, so npm is the supported channel.
141+
142+
In a Hardhat project, import with full package paths (`@aztec/l1-artifacts/l1-contracts/src/core/interfaces/IRollup.sol`), or configure equivalent aliases pointing at `node_modules/@aztec/l1-artifacts/l1-contracts/src`.
143+
121144
## See also
122145

123146
- [Communicating Cross-Chain](../../aztec-nr/framework-description/ethereum_aztec_messaging.md) - Practical guide with code examples for L1-L2 messaging

docs/docs-developers/docs/tutorials/js_tutorials/aave_bridge.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,14 @@ Start with the Hardhat + Aztec template. This provides a pre-configured Hardhat
110110

111111
This template is a community-maintained starter. If the repository is unavailable, you can set up a Hardhat project manually and add the `@aztec/*` Solidity remappings from the [cross-chain messaging docs](../../foundational-topics/ethereum-aztec-messaging/index.md).
112112

113-
You may need to update the `@aztec/l1-contracts` tag in the template's `package.json` to match your Aztec version, e.g.:
113+
You may need to replace the `@aztec/l1-contracts` dependency in `package.json` with the `@aztec/l1-artifacts` npm package at the version matching your Aztec version, e.g.:
114114

115115
```json
116-
"@aztec/l1-contracts": "git+https://github.com/AztecProtocol/l1-contracts.git#v5.0.1"
116+
"@aztec/l1-artifacts": "5.0.1"
117117
```
118118

119+
The package ships the L1 contract sources under `@aztec/l1-artifacts/l1-contracts/src`; update any `@aztec/*` Solidity remappings or aliases in the project to point at `node_modules/@aztec/l1-artifacts/l1-contracts/src`.
120+
119121
:::
120122

121123
```bash
@@ -312,13 +314,13 @@ The portal is where the magic happens. It bridges Aztec's cross-chain messages w
312314
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
313315
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
314316
315-
import {IRegistry} from "@aztec/l1-contracts/src/governance/interfaces/IRegistry.sol";
316-
import {IInbox} from "@aztec/l1-contracts/src/core/interfaces/messagebridge/IInbox.sol";
317-
import {IOutbox} from "@aztec/l1-contracts/src/core/interfaces/messagebridge/IOutbox.sol";
318-
import {IRollup} from "@aztec/l1-contracts/src/core/interfaces/IRollup.sol";
319-
import {DataStructures} from "@aztec/l1-contracts/src/core/libraries/DataStructures.sol";
320-
import {Hash} from "@aztec/l1-contracts/src/core/libraries/crypto/Hash.sol";
321-
import {Epoch} from "@aztec/l1-contracts/src/core/libraries/TimeLib.sol";
317+
import {IRegistry} from "@aztec/l1-artifacts/l1-contracts/src/governance/interfaces/IRegistry.sol";
318+
import {IInbox} from "@aztec/l1-artifacts/l1-contracts/src/core/interfaces/messagebridge/IInbox.sol";
319+
import {IOutbox} from "@aztec/l1-artifacts/l1-contracts/src/core/interfaces/messagebridge/IOutbox.sol";
320+
import {IRollup} from "@aztec/l1-artifacts/l1-contracts/src/core/interfaces/IRollup.sol";
321+
import {DataStructures} from "@aztec/l1-artifacts/l1-contracts/src/core/libraries/DataStructures.sol";
322+
import {Hash} from "@aztec/l1-artifacts/l1-contracts/src/core/libraries/crypto/Hash.sol";
323+
import {Epoch} from "@aztec/l1-artifacts/l1-contracts/src/core/libraries/TimeLib.sol";
322324
323325
#include_code portal_setup /docs/examples/solidity/aave_bridge/AavePortal.sol raw
324326
}

docs/docs-developers/docs/tutorials/js_tutorials/token_bridge.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ cd hardhat-aztec-example
3939
yarn add @aztec/aztec.js@#include_version_without_prefix @aztec/accounts@#include_version_without_prefix @aztec/stdlib@#include_version_without_prefix @aztec/wallets@#include_version_without_prefix @aztec/viem@2.38.2 tsx
4040
```
4141

42-
:::note Match the `@aztec/l1-contracts` version
43-
The starter repo pins its `@aztec/l1-contracts` dependency to an older release. In `package.json`, update the tag to match the network version used in this tutorial, then run `yarn install` again:
42+
:::note Use `@aztec/l1-artifacts` for the L1 interfaces
43+
The starter repo may still pin `@aztec/l1-contracts` as a git dependency; that repository is no longer updated. In `package.json`, replace it with the `@aztec/l1-artifacts` npm package at the version used in this tutorial, then run `yarn install` again:
4444

4545
```json
46-
"@aztec/l1-contracts": "git+https://github.com/AztecProtocol/l1-contracts.git##include_aztec_version"
46+
"@aztec/l1-artifacts": "#include_version_without_prefix"
4747
```
4848

49-
The L1 interfaces the portal imports later in this tutorial must match the contracts deployed by your running network.
49+
The package ships the L1 contract sources under `@aztec/l1-artifacts/l1-contracts/src`. If the project resolves `@aztec/*` Solidity imports through remappings or aliases, point them at `node_modules/@aztec/l1-artifacts/l1-contracts/src`. The interfaces the portal imports later in this tutorial must match the contracts deployed by your running network.
5050
:::
5151

5252
Now start the local network in another terminal:

docs/docs-developers/docs/tutorials/testing_governance_rollup_upgrade.md

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -50,40 +50,22 @@ Note the `registryAddress` from the output.
5050

5151
---
5252

53-
## Step 2: Clone and Set Up l1-contracts
53+
## Step 2: Download the l1-contracts bundle
5454

55-
Clone the l1-contracts repo and checkout the version matching your Aztec installation. Run `aztec --version` to find your version:
55+
The [`@aztec/l1-artifacts`](https://www.npmjs.com/package/@aztec/l1-artifacts) npm package bundles a self-contained Foundry project with the L1 contract sources, prebuilt artifacts, deploy scripts, and governance payload contracts. Download the version matching your Aztec installation (run `aztec --version` to find it):
5656

5757
```bash
58-
git clone https://github.com/AztecProtocol/l1-contracts.git
58+
npm pack @aztec/l1-artifacts@#release_version
59+
mkdir l1-contracts
60+
tar xzf aztec-l1-artifacts-#release_version.tgz --strip-components=2 -C l1-contracts package/l1-contracts
5961
cd l1-contracts
60-
git checkout #release_version
6162
```
6263

63-
Install dependencies and set up the build environment:
64+
No further setup is needed: the bundle includes the library dependencies and the generated verifier, and forge downloads the matching solc version automatically on first use.
6465

65-
```bash
66-
# Install forge dependencies
67-
mkdir -p lib
68-
cd lib
69-
git clone --depth 1 https://github.com/foundry-rs/forge-std forge-std
70-
git clone --depth 1 https://github.com/OpenZeppelin/openzeppelin-contracts openzeppelin-contracts
71-
cd ..
72-
73-
# Install solc (uses forge's built-in svm). The Aztec installer ships
74-
# Foundry as `aztec-forge`/`aztec-cast`/`aztec-anvil` -- substitute your
75-
# own `forge` install if you have one.
76-
aztec-forge build --use 0.8.30 src/core/libraries/ConstantsGen.sol
77-
cp ~/.svm/0.8.30/solc-0.8.30 ./solc-0.8.30
78-
79-
# Copy the HonkVerifier to the generated directory (required for build)
80-
mkdir -p generated
81-
cp src/HonkVerifier.sol generated/HonkVerifier.sol
82-
83-
# Remove zkpassport-dependent files (not needed for rollup deployment)
84-
rm -f src/mock/StakingAssetHandler.sol
85-
rm -rf src/mock/staking_asset_handler/
86-
```
66+
:::note
67+
The Aztec installer ships Foundry as `aztec-forge`, `aztec-cast`, and `aztec-anvil`. Substitute your own `forge` and `cast` installs in the commands below if you have them.
68+
:::
8769

8870
---
8971

@@ -119,7 +101,7 @@ export AZTEC_SLASHING_VETOER=0x0000000000000000000000000000000000000000
119101
export AZTEC_SLASHING_DISABLE_DURATION=0
120102
export AZTEC_MANA_TARGET=100000000
121103
export AZTEC_EXIT_DELAY_SECONDS=0
122-
export AZTEC_PROVING_COST_PER_MANA=0
104+
export AZTEC_PROVING_COST_PER_MANA=100
123105
export AZTEC_SLASH_AMOUNT_SMALL=0
124106
export AZTEC_SLASH_AMOUNT_MEDIUM=0
125107
export AZTEC_SLASH_AMOUNT_LARGE=0
@@ -147,6 +129,10 @@ export NEW_ROLLUP_ADDRESS=0x...
147129

148130
## Step 5: Deploy Governance Payload
149131

132+
:::tip
133+
The deploy script in Step 4 also deploys this payload and prints it as `payloadAddress` in its JSON output. You can export that address as `PAYLOAD_ADDRESS` and skip this step.
134+
:::
135+
150136
**Important:** Place flags before the contract path to avoid argument parsing issues.
151137

152138
```bash
@@ -156,7 +142,7 @@ aztec-forge create \
156142
--rpc-url $L1_RPC_URL \
157143
--private-key $PRIVATE_KEY \
158144
--broadcast \
159-
test/governance/scenario/RegisterNewRollupVersionPayload.sol:RegisterNewRollupVersionPayload \
145+
src/periphery/RegisterNewRollupVersionPayload.sol:RegisterNewRollupVersionPayload \
160146
--constructor-args $REGISTRY_ADDRESS $NEW_ROLLUP_ADDRESS
161147
```
162148

l1-contracts/bootstrap.sh

Lines changed: 2 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -282,79 +282,6 @@ function validator_costs {
282282
python3 scripts/process_gas_reports.py no_validators.json 100_validators.json 100_validators_slashing.json
283283
}
284284

285-
# First argument is a branch name (e.g. master, or the latest version e.g. 1.2.3) to push to the head of.
286-
# Second argument is the tag name (e.g. v1.2.3, or commit-<hash>).
287-
# Third argument is the semver for package.json (e.g. 1.2.3 or 1.2.3-commit.<hash>)
288-
#
289-
# v1.2.3 commit-123cafebabe
290-
# | /
291-
# v1.2.2 commit-123deadbeef
292-
# | /
293-
# v1.2.1
294-
#
295-
function release_git_push {
296-
local branch_name=$1
297-
local tag_name=$2
298-
local version=$3
299-
local mirrored_repo_url="https://github.com/AztecProtocol/l1-contracts.git"
300-
301-
# Clean up our release directory.
302-
rm -rf release-out && mkdir release-out
303-
304-
# Copy our git files to our release directory.
305-
git archive HEAD | tar -x -C release-out
306-
307-
# Copy from noir-projects. Bootstrap must have ran in noir-projects.
308-
cp ../noir-projects/noir-protocol-circuits/target/keys/rollup_root_verifier.sol release-out/src/HonkVerifier.sol
309-
310-
# Push the release from the clean export of HEAD, in a subshell so the caller's working directory
311-
# is preserved. Later release steps (e.g. release_l1_artifacts_npm) rely on the gitignored build
312-
# outputs that live in the working tree, outside this git-archive copy.
313-
(
314-
cd release-out
315-
316-
# Update the package version in package.json.
317-
# TODO remove package.json.
318-
release_prep_package_json $version
319-
320-
# CI needs to authenticate from GITHUB_TOKEN.
321-
gh auth setup-git &>/dev/null || true
322-
323-
git init &>/dev/null
324-
git remote add origin "$mirrored_repo_url" &>/dev/null
325-
git fetch origin --quiet
326-
327-
# Checkout the existing branch or create it if it doesn't exist.
328-
if git ls-remote --heads origin "$branch_name" | grep -q "$branch_name"; then
329-
# Update branch reference without checkout.
330-
git branch -f "$branch_name" origin/"$branch_name"
331-
# Point HEAD to the branch.
332-
git symbolic-ref HEAD refs/heads/"$branch_name"
333-
# Move to latest commit, keep working tree.
334-
git reset --soft origin/"$branch_name"
335-
else
336-
git checkout -b "$branch_name"
337-
fi
338-
339-
if git rev-parse "$tag_name" >/dev/null 2>&1; then
340-
echo "Tag $tag_name already exists. Skipping release."
341-
else
342-
git add .
343-
git commit -m "Release $tag_name." >/dev/null
344-
git tag -a "$tag_name" -m "Release $tag_name."
345-
do_or_dryrun git push origin "$branch_name" --quiet
346-
do_or_dryrun git push origin --quiet --force "$tag_name" --tags
347-
348-
echo "Release complete ($tag_name) on branch $branch_name."
349-
fi
350-
351-
do_or_dryrun git push origin "$branch_name" --quiet
352-
do_or_dryrun git push origin --quiet --force "$tag_name" --tags
353-
354-
echo "Release complete ($tag_name) on branch $branch_name."
355-
)
356-
}
357-
358285
function coverage {
359286
echo_header "l1-contracts coverage"
360287
forge --version
@@ -507,8 +434,8 @@ function coverage_serve {
507434
# by the runtime forge deploy path). yarn-project consumes this via portal in-repo and via the
508435
# published version downstream, so it must publish before yarn-project's release (whose smoke test
509436
# installs packages that depend on @aztec/l1-artifacts@<version>).
510-
function release_l1_artifacts_npm {
511-
echo_header "l1-contracts release l1-artifacts npm"
437+
function release {
438+
echo_header "l1-contracts release"
512439
local version=${REF_NAME#v}
513440

514441
# dest/ and the bundled foundry subtree are gitignored build outputs left in the working tree by
@@ -529,17 +456,6 @@ function release_l1_artifacts_npm {
529456
(cd l1-artifacts && retry "deploy_npm $version")
530457
}
531458

532-
function release {
533-
echo_header "l1-contracts release"
534-
local branch=$(dist_tag)
535-
if [ $branch = latest ]; then
536-
branch=master
537-
fi
538-
539-
release_git_push $branch $REF_NAME ${REF_NAME#v}
540-
release_l1_artifacts_npm
541-
}
542-
543459
case "$cmd" in
544460
"")
545461
build

l1-contracts/l1-artifacts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"type": "module",
55
"exports": {
66
"./network-defaults.json": "./l1-contracts/scripts/network-defaults.json",
7+
"./l1-contracts/*": "./l1-contracts/*",
78
"./*": "./dest/*.js",
89
".": "./dest/index.js"
910
},

l1-contracts/l1-artifacts/scripts/copy-foundry-artifacts.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ cp -rp "$src/script/deploy" "l1-contracts/script/" # only deploy/, other script
2323
mkdir -p "l1-contracts/test/script"
2424
cp -p "$src/test/shouting.t.sol" "l1-contracts/test/"
2525
cp -p "$src"/test/script/*.sol "l1-contracts/test/script/"
26+
# EmptyPayload for the rollup-upgrade docs tutorial's quick-test path
27+
# (docs/docs-developers/docs/tutorials/testing_governance_rollup_upgrade.md); the tutorial's main
28+
# payload, RegisterNewRollupVersionPayload, ships with src/periphery. Compiles against src/ only.
29+
mkdir -p "l1-contracts/test/governance/governance"
30+
cp -p "$src/test/governance/governance/TestPayloads.sol" "l1-contracts/test/governance/governance/"
2631
cp -p "$src"/{foundry.toml,foundry.lock,package.json,solc-*} "l1-contracts/"
2732
# Copy the forge broadcast wrapper (now a plain .js source file) and the network defaults
2833
# (read at deploy time via foundry fs_permissions / vm.readFile).

0 commit comments

Comments
 (0)