-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds K8s config to deploy a network with proving enabled --------- Co-authored-by: PhilWindle <[email protected]> Co-authored-by: ludamad <[email protected]>
- Loading branch information
1 parent
bf53f5e
commit 392114a
Showing
12 changed files
with
242 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{{- if .Values.network.setupL2Contracts }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ include "aztec-network.fullname" . }}-deploy-l1-verifier | ||
labels: | ||
{{- include "aztec-network.labels" . | nindent 4 }} | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 8 }} | ||
app: deploy-l1-verifier | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: deploy-l1-verifier | ||
image: {{ .Values.images.aztec.image }} | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
set -e | ||
[ $ENABLE = "true" ] || exit 0 | ||
until curl -s -X GET "$AZTEC_NODE_URL/status"; do | ||
echo "Waiting for Aztec node $AZTEC_NODE_URL..." | ||
sleep 5 | ||
done | ||
echo "Boot node is ready!" | ||
export ROLLUP_CONTRACT_ADDRESS=$(curl -X POST -H 'Content-Type: application/json' \ | ||
-d '{"jsonrpc":"2.0","method":"node_getL1ContractAddresses","params":[],"id":1}' \ | ||
"$AZTEC_NODE_URL" \ | ||
| jq -r '.result.rollupAddress.data') | ||
echo "Rollup contract address: $ROLLUP_CONTRACT_ADDRESS" | ||
node /usr/src/yarn-project/aztec/dest/bin/index.js deploy-l1-verifier --verifier real | ||
echo "L1 verifier deployed" | ||
env: | ||
- name: ENABLE | ||
value: {{ .Values.jobs.deployL1Verifier.enable | quote }} | ||
- name: NODE_NO_WARNINGS | ||
value: "1" | ||
- name: DEBUG | ||
value: "aztec:*" | ||
- name: LOG_LEVEL | ||
value: "debug" | ||
- name: ETHEREUM_HOST | ||
value: {{ include "aztec-network.ethereumHost" . | quote }} | ||
- name: L1_CHAIN_ID | ||
value: {{ .Values.ethereum.chainId | quote }} | ||
- name: PRIVATE_KEY | ||
value: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" | ||
- name: AZTEC_NODE_URL | ||
value: {{ include "aztec-network.bootNodeUrl" . | quote }} | ||
{{ end }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{{- if .Values.proverAgent.enabled }} | ||
apiVersion: apps/v1 | ||
kind: ReplicaSet | ||
metadata: | ||
name: {{ include "aztec-network.fullname" . }}-prover-agent | ||
labels: | ||
{{- include "aztec-network.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.proverAgent.replicas }} | ||
selector: | ||
matchLabels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 6 }} | ||
app: prover-agent | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 8 }} | ||
app: prover-agent | ||
spec: | ||
initContainers: | ||
- name: wait-for-prover-node | ||
image: {{ .Values.images.curl.image }} | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
until curl -s -X POST "$PROVER_JOB_SOURCE_URL/status"; do | ||
echo "Waiting for Prover node $PROVER_JOB_SOURCE_URL ..." | ||
sleep 5 | ||
done | ||
echo "Prover node is ready!" | ||
{{- if .Values.telemetry.enabled }} | ||
until curl --head --silent {{ include "aztec-network.otelCollectorMetricsEndpoint" . }} > /dev/null; do | ||
echo "Waiting for OpenTelemetry collector..." | ||
sleep 5 | ||
done | ||
echo "OpenTelemetry collector is ready!" | ||
{{- end }} | ||
env: | ||
- name: PROVER_JOB_SOURCE_URL | ||
value: http://{{ include "aztec-network.fullname" . }}-prover-node.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.proverNode.service.nodePort }} | ||
containers: | ||
- name: prover-agent | ||
image: "{{ .Values.images.aztec.image }}" | ||
imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- "node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --prover" | ||
env: | ||
- name: LOG_LEVEL | ||
value: "{{ .Values.proverAgent.logLevel }}" | ||
- name: LOG_JSON | ||
value: "1" | ||
- name: DEBUG | ||
value: "{{ .Values.proverAgent.debug }}" | ||
- name: PROVER_REAL_PROOFS | ||
value: "{{ .Values.proverAgent.realProofs }}" | ||
- name: PROVER_JOB_SOURCE_URL | ||
value: http://{{ include "aztec-network.fullname" . }}-prover-node.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.proverNode.service.nodePort }} | ||
- name: PROVER_AGENT_ENABLED | ||
value: "true" | ||
- name: PROVER_AGENT_CONCURRENCY | ||
value: {{ .Values.proverAgent.concurrency | quote }} | ||
- name: HARDWARE_CONCURRENCY | ||
value: {{ .Values.proverAgent.bb.hardwareConcurrency | quote }} | ||
- name: OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | ||
value: {{ include "aztec-network.otelCollectorMetricsEndpoint" . | quote }} | ||
- name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT | ||
value: {{ include "aztec-network.otelCollectorTracesEndpoint" . | quote }} | ||
- name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | ||
value: {{ include "aztec-network.otelCollectorLogsEndpoint" . | quote }} | ||
{{- end }} |
This file contains 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
This file contains 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
This file contains 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
37 changes: 37 additions & 0 deletions
37
spartan/aztec-network/values/1-validator-with-proving.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
validator: | ||
replicas: 1 | ||
validatorKeys: | ||
- 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
validatorAddresses: | ||
- 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 | ||
validator: | ||
disabled: false | ||
|
||
bootNode: | ||
validator: | ||
disabled: true | ||
|
||
proverNode: | ||
realProofs: true | ||
|
||
proverAgent: | ||
replicas: 6 | ||
realProofs: true | ||
bb: | ||
hardwareConcurrency: 16 | ||
|
||
pxe: | ||
proverEnabled: true | ||
|
||
bot: | ||
enabled: true | ||
pxeProverEnabled: true | ||
txIntervalSeconds: 200 | ||
|
||
jobs: | ||
deployL1Verifier: | ||
enable: true | ||
|
||
telemetry: | ||
enabled: true | ||
otelCollectorEndpoint: http://metrics-opentelemetry-collector.metrics:4318 |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.