diff --git a/.github/workflows/publish-aztec-packages.yml b/.github/workflows/publish-aztec-packages.yml index 9da6aad1589..ade937c872e 100644 --- a/.github/workflows/publish-aztec-packages.yml +++ b/.github/workflows/publish-aztec-packages.yml @@ -324,16 +324,6 @@ jobs: --VERSION=${{ steps.version_step.outputs.VERSION }} \ --DRY_RUN=${{ (github.event.inputs.publish == 'false') && '1' || '0' }} - - name: Publish spartan NPM package - run: | - earthly-ci \ - --no-output \ - --secret NPM_TOKEN=${{ env.NPM_TOKEN }} \ - ./spartan/releases/rough-rhino+publish-npm \ - --DIST_TAG=${{ steps.version_step.outputs.DIST_TAG }} \ - --VERSION=${{ steps.version_step.outputs.VERSION }} \ - --DRY_RUN=${{ (github.event.inputs.publish == 'false') && '1' || '0' }} - publish-aztec-up: needs: [configure, publish-manifests] runs-on: ubuntu-latest diff --git a/spartan/aztec-network/templates/boot-node.yaml b/spartan/aztec-network/templates/boot-node.yaml index 62dbcab873c..c963b3d88b8 100644 --- a/spartan/aztec-network/templates/boot-node.yaml +++ b/spartan/aztec-network/templates/boot-node.yaml @@ -68,7 +68,13 @@ spec: - -c - | source /shared/config/service-addresses - cast publish --rpc-url ${ETHEREUM_HOST} 0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222 + output=$(cast code 0x4e59b44847b379578588920cA78FbF26c0B4956C --rpc-url ${ETHEREUM_HOST}) + if [ "$output" == "0x" ]; then + echo "Deploying create2 deployer" + cast publish --rpc-url ${ETHEREUM_HOST} 0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222 + else + echo "Create2 deployer already deployed" + fi volumeMounts: - name: config mountPath: /shared/config diff --git a/spartan/aztec-network/templates/reth.yaml b/spartan/aztec-network/templates/reth.yaml index 938d48b649a..950ea3a4142 100644 --- a/spartan/aztec-network/templates/reth.yaml +++ b/spartan/aztec-network/templates/reth.yaml @@ -99,7 +99,6 @@ spec: name: {{ include "aztec-network.fullname" . }}-reth-genesis - name: genesis-output emptyDir: {} -{{if not .Values.network.public }} --- apiVersion: v1 kind: Service @@ -108,7 +107,11 @@ metadata: labels: {{- include "aztec-network.labels" . | nindent 4 }} spec: - type: {{ .Values.ethereum.service.type }} + {{- if .Values.network.public }} + type: LoadBalancer + {{- else }} + type: ClusterIP + {{- end }} selector: {{- include "aztec-network.selectorLabels" . | nindent 4 }} app: ethereum @@ -119,7 +122,6 @@ spec: {{- if and (eq .Values.ethereum.service.type "NodePort") .Values.ethereum.service.nodePort }} nodePort: {{ .Values.ethereum.service.nodePort }} {{- end }} -{{ end }} --- apiVersion: v1 kind: ConfigMap diff --git a/spartan/aztec-network/values.yaml b/spartan/aztec-network/values.yaml index 26cf80bb5f7..6d92e99c740 100644 --- a/spartan/aztec-network/values.yaml +++ b/spartan/aztec-network/values.yaml @@ -194,7 +194,6 @@ ethereum: gasLimit: "1000000000" args: "" service: - type: ClusterIP port: 8545 targetPort: 8545 nodePort: "" diff --git a/spartan/aztec-network/values/rc-1.yaml b/spartan/aztec-network/values/rc-1.yaml index 1f50b6b21b0..70ae78d2b66 100644 --- a/spartan/aztec-network/values/rc-1.yaml +++ b/spartan/aztec-network/values/rc-1.yaml @@ -1,6 +1,12 @@ network: public: true +ethereum: + resources: + requests: + memory: "31Gi" + cpu: "200m" + aztec: slotDuration: 36 epochDuration: 48 diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index 31b2c1eeb50..2aee401d401 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -432,9 +432,19 @@ export const deployL1Contracts = async ( txHashes.push(txHash); } - if (args.initialValidators && args.initialValidators.length > 0) { + const attesters = (await rollup.read + .getAttesters([]) + .then(attesters => + (attesters as `0x${string}`[]).map(attester => EthAddress.fromString(attester.toString())), + )) as EthAddress[]; + + logger.debug(`Existing attesters`, attesters); + + const newAttesters = (args.initialValidators ?? []).filter(v => !attesters.some(a => a.equals(v))); + + if (newAttesters.length > 0) { // Mint tokens, approve them, use cheat code to initialise validator set without setting up the epoch. - const stakeNeeded = MINIMUM_STAKE * BigInt(args.initialValidators.length); + const stakeNeeded = MINIMUM_STAKE * BigInt(newAttesters.length); await Promise.all( [ await stakingAsset.write.mint([walletClient.account.address, stakeNeeded], {} as any), @@ -442,8 +452,10 @@ export const deployL1Contracts = async ( ].map(txHash => publicClient.waitForTransactionReceipt({ hash: txHash })), ); + logger.info(`Minted ${newAttesters.length} validators`); + const initiateValidatorSetTxHash = await rollup.write.cheat__InitialiseValidatorSet([ - args.initialValidators.map(v => ({ + newAttesters.map(v => ({ attester: v.toString(), proposer: v.toString(), withdrawer: v.toString(), @@ -451,7 +463,7 @@ export const deployL1Contracts = async ( })), ]); txHashes.push(initiateValidatorSetTxHash); - logger.info(`Initialized validator set (${args.initialValidators.join(', ')}) in tx ${initiateValidatorSetTxHash}`); + logger.info(`Initialized validator set (${newAttesters.join(', ')}) in tx ${initiateValidatorSetTxHash}`); } // @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 ( client: walletClient, }); if (!(await registryContract.read.isRollupRegistered([getAddress(rollupAddress.toString())]))) { + logger.info(`Registry ${registryAddress} is not registered to rollup ${rollupAddress}`); const upgradeTxHash = await registryContract.write.upgrade([getAddress(rollupAddress.toString())], { account }); logger.verbose( `Upgrading registry contract at ${registryAddress} to rollup ${rollupAddress} in tx ${upgradeTxHash}`,