-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: token transfer in network + CI
- Loading branch information
1 parent
dd88e3d
commit 23aacc5
Showing
20 changed files
with
408 additions
and
57 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
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
36 changes: 36 additions & 0 deletions
36
helm-charts/aztec-network/templates/deploy-l2-contracts.job.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,36 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ include "aztec-network.fullname" . }}-deploy-l2-contracts | ||
labels: | ||
{{- include "aztec-network.labels" . | nindent 4 }} | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 8 }} | ||
app: deploy-l2-contracts | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: deploy-l2-contracts | ||
image: {{ .Values.images.aztec.image }} | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
until curl -s -X POST -H 'content-type: application/json' \ | ||
-d '{"jsonrpc":"2.0","method":"pxe_getNodeInfo","params":[],"id":67}' \ | ||
{{ include "aztec-network.pxeUrl" . }} | grep -q '"enr:-'; do | ||
echo "Waiting for PXE service..." | ||
sleep 5 | ||
done | ||
echo "PXE service is ready!" | ||
node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js deploy-protocol-contracts | ||
env: | ||
- name: PXE_URL | ||
value: {{ include "aztec-network.pxeUrl" . | quote }} | ||
- name: DEBUG | ||
value: "aztec:*" | ||
- name: LOG_LEVEL | ||
value: "debug" |
14 changes: 14 additions & 0 deletions
14
helm-charts/aztec-network/templates/prover-node.service.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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "aztec-network.fullname" . }}-prover-node | ||
labels: | ||
{{- include "aztec-network.labels" . | nindent 4 }} | ||
spec: | ||
clusterIP: None | ||
selector: | ||
{{- include "aztec-network.selectorLabels" . | nindent 4 }} | ||
app: prover-node | ||
ports: | ||
- port: {{ .Values.proverNode.service.nodePort }} | ||
name: node |
87 changes: 87 additions & 0 deletions
87
helm-charts/aztec-network/templates/prover-node.stateful-set.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,87 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ include "aztec-network.fullname" . }}-prover-node | ||
labels: | ||
{{- include "aztec-network.labels" . | nindent 4 }} | ||
spec: | ||
serviceName: {{ include "aztec-network.fullname" . }}-prover-node | ||
replicas: {{ .Values.proverNode.replicas }} | ||
selector: | ||
matchLabels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 6 }} | ||
app: prover-node | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 8 }} | ||
app: prover-node | ||
spec: | ||
initContainers: | ||
- name: configure-validator-env | ||
image: "{{ .Values.images.aztec.image }}" | ||
imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} | ||
command: | ||
- "/bin/sh" | ||
- "-c" | ||
- "cp /scripts/configure-validator-env.sh /tmp/configure-validator-env.sh && chmod +x /tmp/configure-validator-env.sh && /tmp/configure-validator-env.sh" | ||
volumeMounts: | ||
- name: shared-volume | ||
mountPath: /shared | ||
- name: scripts | ||
mountPath: /scripts | ||
env: | ||
- name: ETHEREUM_HOST | ||
value: {{ include "aztec-network.ethereumHost" . | quote }} | ||
containers: | ||
- name: aztec | ||
image: "{{ .Values.images.aztec.image }}" | ||
imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- "source /shared/contracts.env && env && node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --prover-node --prover --archiver" | ||
volumeMounts: | ||
- name: shared-volume | ||
mountPath: /shared | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: POD_DNS_NAME | ||
value: "$(POD_NAME).{{ include "aztec-network.fullname" . }}-prover-node.$(POD_NAMESPACE).svc.cluster.local" | ||
- name: PORT | ||
value: "{{ .Values.proverNode.service.nodePort }}" | ||
- name: LOG_LEVEL | ||
value: "{{ .Values.proverNode.logLevel }}" | ||
- name: DEBUG | ||
value: "{{ .Values.proverNode.debug }}" | ||
- name: ETHEREUM_HOST | ||
value: {{ include "aztec-network.ethereumHost" . | quote }} | ||
- name: PROVER_REAL_PROOFS | ||
value: "{{ .Values.proverNode.realProofs }}" | ||
- name: PROVER_AGENT_ENABLED | ||
value: "{{ .Values.proverNode.proverAgentEnabled }}" | ||
- name: PROVER_PUBLISHER_PRIVATE_KEY | ||
value: "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97" | ||
# get private proofs from the boot node | ||
- name: TX_PROVIDER_NODE_URL | ||
value: {{ include "aztec-network.bootNodeUrl" . | quote }} | ||
# prover agent gets jobs from itself | ||
- name: AZTEC_NODE_URL | ||
value: "$(POD_DNS_NAME):{{ .Values.proverNode.service.nodePort }}" | ||
ports: | ||
- containerPort: {{ .Values.proverNode.service.nodePort }} | ||
resources: | ||
{{- toYaml .Values.proverNode.resources | nindent 12 }} | ||
volumes: | ||
- name: shared-volume | ||
emptyDir: {} | ||
- name: scripts | ||
configMap: | ||
name: {{ include "aztec-network.fullname" . }}-configure-validator-env |
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
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.