-
Notifications
You must be signed in to change notification settings - Fork 310
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
feat: spartan proving #9584
feat: spartan proving #9584
Changes from 18 commits
ad29ca3
99dc9ac
ae82246
d886a14
ab4afb3
160b7a3
29baee5
e9e66d9
5a81e43
6a2547c
8eb1c99
d583dd6
63748cb
95e0770
2ccee2e
dae0504
2e5c703
c0c6b7a
a810863
d29928c
70f1523
2365781
a0383d7
52f94a4
bd21a7f
9be0941
a2f8f96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,8 +136,8 @@ global INITIAL_L2_BLOCK_NUM: Field = 1; | |
global BLOB_SIZE_IN_BYTES: Field = 31 * 4096; | ||
global ETHEREUM_SLOT_DURATION: u32 = 12; | ||
// AZTEC_SLOT_DURATION should be a multiple of ETHEREUM_SLOT_DURATION | ||
global AZTEC_SLOT_DURATION: u32 = ETHEREUM_SLOT_DURATION * 2; | ||
global AZTEC_EPOCH_DURATION: u32 = 16; | ||
global AZTEC_SLOT_DURATION: u32 = ETHEREUM_SLOT_DURATION * 3; | ||
global AZTEC_EPOCH_DURATION: u32 = 32; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just pointing out this change ☝️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This slows down testing, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. per discussion rolled this back - this needs at least a comment about these constants changing for prod |
||
global AZTEC_TARGET_COMMITTEE_SIZE: u32 = 48; | ||
// The number of AZTEC_SLOTS that we can wait for a proof of an epoch to be produced. | ||
global AZTEC_EPOCH_PROOF_CLAIM_WINDOW_IN_L2_SLOTS: u32 = 13; | ||
|
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 }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{{- 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 }} | ||
{{- end }} |
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 |
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'