Skip to content

Commit 4e00dc4

Browse files
committed
chore: hot fixes
1 parent f540fbe commit 4e00dc4

File tree

6 files changed

+35
-19
lines changed

6 files changed

+35
-19
lines changed

.github/workflows/publish-aztec-packages.yml

-10
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,6 @@ jobs:
324324
--VERSION=${{ steps.version_step.outputs.VERSION }} \
325325
--DRY_RUN=${{ (github.event.inputs.publish == 'false') && '1' || '0' }}
326326
327-
- name: Publish spartan NPM package
328-
run: |
329-
earthly-ci \
330-
--no-output \
331-
--secret NPM_TOKEN=${{ env.NPM_TOKEN }} \
332-
./spartan/releases/rough-rhino+publish-npm \
333-
--DIST_TAG=${{ steps.version_step.outputs.DIST_TAG }} \
334-
--VERSION=${{ steps.version_step.outputs.VERSION }} \
335-
--DRY_RUN=${{ (github.event.inputs.publish == 'false') && '1' || '0' }}
336-
337327
publish-aztec-up:
338328
needs: [configure, publish-manifests]
339329
runs-on: ubuntu-latest

spartan/aztec-network/templates/boot-node.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ spec:
6868
- -c
6969
- |
7070
source /shared/config/service-addresses
71-
cast publish --rpc-url ${ETHEREUM_HOST} 0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222
71+
output=$(cast code 0x4e59b44847b379578588920cA78FbF26c0B4956C --rpc-url ${ETHEREUM_HOST})
72+
if [ "$output" == "0x" ]; then
73+
echo "Deploying create2 deployer"
74+
cast publish --rpc-url ${ETHEREUM_HOST} 0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222
75+
else
76+
echo "Create2 deployer already deployed"
77+
fi
7278
volumeMounts:
7379
- name: config
7480
mountPath: /shared/config

spartan/aztec-network/templates/reth.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ spec:
9999
name: {{ include "aztec-network.fullname" . }}-reth-genesis
100100
- name: genesis-output
101101
emptyDir: {}
102-
{{if not .Values.network.public }}
103102
---
104103
apiVersion: v1
105104
kind: Service
@@ -108,7 +107,11 @@ metadata:
108107
labels:
109108
{{- include "aztec-network.labels" . | nindent 4 }}
110109
spec:
111-
type: {{ .Values.ethereum.service.type }}
110+
{{- if .Values.network.public }}
111+
type: LoadBalancer
112+
{{- else }}
113+
type: ClusterIP
114+
{{- end }}
112115
selector:
113116
{{- include "aztec-network.selectorLabels" . | nindent 4 }}
114117
app: ethereum
@@ -119,7 +122,6 @@ spec:
119122
{{- if and (eq .Values.ethereum.service.type "NodePort") .Values.ethereum.service.nodePort }}
120123
nodePort: {{ .Values.ethereum.service.nodePort }}
121124
{{- end }}
122-
{{ end }}
123125
---
124126
apiVersion: v1
125127
kind: ConfigMap

spartan/aztec-network/values.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ ethereum:
194194
gasLimit: "1000000000"
195195
args: ""
196196
service:
197-
type: ClusterIP
198197
port: 8545
199198
targetPort: 8545
200199
nodePort: ""

spartan/aztec-network/values/rc-1.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
network:
22
public: true
33

4+
ethereum:
5+
resources:
6+
requests:
7+
memory: "31Gi"
8+
cpu: "200m"
9+
410
aztec:
511
slotDuration: 36
612
epochDuration: 48

yarn-project/ethereum/src/deploy_l1_contracts.ts

+17-4
Original file line numberDiff line numberDiff line change
@@ -432,26 +432,38 @@ export const deployL1Contracts = async (
432432
txHashes.push(txHash);
433433
}
434434

435-
if (args.initialValidators && args.initialValidators.length > 0) {
435+
const attesters = (await rollup.read
436+
.getAttesters([])
437+
.then(attesters =>
438+
(attesters as `0x${string}`[]).map(attester => EthAddress.fromString(attester.toString())),
439+
)) as EthAddress[];
440+
441+
logger.debug(`Existing attesters`, attesters);
442+
443+
const newAttesters = (args.initialValidators ?? []).filter(v => !attesters.some(a => a.equals(v)));
444+
445+
if (newAttesters.length > 0) {
436446
// Mint tokens, approve them, use cheat code to initialise validator set without setting up the epoch.
437-
const stakeNeeded = MINIMUM_STAKE * BigInt(args.initialValidators.length);
447+
const stakeNeeded = MINIMUM_STAKE * BigInt(newAttesters.length);
438448
await Promise.all(
439449
[
440450
await stakingAsset.write.mint([walletClient.account.address, stakeNeeded], {} as any),
441451
await stakingAsset.write.approve([rollupAddress.toString(), stakeNeeded], {} as any),
442452
].map(txHash => publicClient.waitForTransactionReceipt({ hash: txHash })),
443453
);
444454

455+
logger.info(`Minted ${newAttesters.length} validators`);
456+
445457
const initiateValidatorSetTxHash = await rollup.write.cheat__InitialiseValidatorSet([
446-
args.initialValidators.map(v => ({
458+
newAttesters.map(v => ({
447459
attester: v.toString(),
448460
proposer: v.toString(),
449461
withdrawer: v.toString(),
450462
amount: MINIMUM_STAKE,
451463
})),
452464
]);
453465
txHashes.push(initiateValidatorSetTxHash);
454-
logger.info(`Initialized validator set (${args.initialValidators.join(', ')}) in tx ${initiateValidatorSetTxHash}`);
466+
logger.info(`Initialized validator set (${newAttesters.join(', ')}) in tx ${initiateValidatorSetTxHash}`);
455467
}
456468

457469
// @note This value MUST match what is in `constants.nr`. It is currently specified here instead of just importing
@@ -521,6 +533,7 @@ export const deployL1Contracts = async (
521533
client: walletClient,
522534
});
523535
if (!(await registryContract.read.isRollupRegistered([getAddress(rollupAddress.toString())]))) {
536+
logger.info(`Registry ${registryAddress} is not registered to rollup ${rollupAddress}`);
524537
const upgradeTxHash = await registryContract.write.upgrade([getAddress(rollupAddress.toString())], { account });
525538
logger.verbose(
526539
`Upgrading registry contract at ${registryAddress} to rollup ${rollupAddress} in tx ${upgradeTxHash}`,

0 commit comments

Comments
 (0)