-
Notifications
You must be signed in to change notification settings - Fork 598
feat: spartan proving #9584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: spartan proving #9584
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ad29ca3
fix: stop bot in case of tx errors
99dc9ac
fix: build l1-artifacts first
ae82246
fix: close container
d886a14
refactor: config
ab4afb3
fix: handle reorgs in the p2p-client
160b7a3
chore: restore commented out code
29baee5
feat: add mined txs back to pending set
e9e66d9
fix: add missing method
5a81e43
fix: expose env var for batch size
6a2547c
fix: block build reorg
8eb1c99
fix: only move back to pending txs that were actually reorged
d583dd6
fix: correctly use historical header
63748cb
chore: bump ClientIVC block sizes
95e0770
chore: normalize case
2ccee2e
feat: pass rollup address or pxe URL when deploying verifier
dae0504
feat: add prover-agent pods
2e5c703
Merge branch 'master' into ag/spartan-proving
PhilWindle c0c6b7a
chore: bump slot duration and epoch size
a810863
chore: update fixtures
d29928c
Update constants.nr
ludamad 70f1523
Update prover-agent.yaml
ludamad 2365781
Update ConstantsGen.sol
ludamad a0383d7
Update ConstantsGen.sol
ludamad 52f94a4
Update constants.gen.ts
ludamad bd21a7f
Update constants.gen.ts
ludamad 9be0941
Merge branch 'master' into ag/spartan-proving
ludamad a2f8f96
undo constants change
ludamad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could probably be bumped to a rounder number unless we have reason to think this will be stably 'enough'