Skip to content
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: consolidate spartan metrics #9037

Merged
merged 8 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion noir-projects/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ source:
COPY --dir aztec-nr noir-contracts noir-protocol-circuits mock-protocol-circuits scripts .

build-contracts:
ARG RAYON_NUM_THREADS
FROM +source

# Install transpiler
COPY ../avm-transpiler/+build/avm-transpiler /usr/bin/avm-transpiler

RUN yarn
RUN cd noir-contracts && NARGO=nargo TRANSPILER=avm-transpiler ./bootstrap.sh
ENV RAYON_NUM_THREADS=$RAYON_NUM_THREADS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% on this but thought args are just env vars

RUN cd noir-contracts && NARGO=nargo TRANSPILER=avm-transpiler ./bootstrap.sh
SAVE ARTIFACT noir-contracts

build-protocol-circuits:
ARG RAYON_NUM_THREADS
LOCALLY
LET bb_source_hash = $(cd .. && git ls-tree -r HEAD | grep 'barretenberg/cpp' | awk '{print $3}' | git hash-object --stdin)
FROM +source
Expand All @@ -34,10 +37,13 @@ build-protocol-circuits:
# Install bb
COPY ../barretenberg/cpp/+preset-release/bin/bb /usr/src/barretenberg/cpp/build/bin/bb
RUN yarn

ENV RAYON_NUM_THREADS=$RAYON_NUM_THREADS
RUN cd noir-protocol-circuits && BB_HASH=$bb_source_hash NARGO=nargo ./bootstrap.sh
SAVE ARTIFACT noir-protocol-circuits

build-mock-protocol-circuits:
ARG RAYON_NUM_THREADS
LOCALLY
LET bb_source_hash = $(cd .. && git ls-tree -r HEAD | grep 'barretenberg/cpp' | awk '{print $3}' | git hash-object --stdin)
FROM +source
Expand All @@ -47,10 +53,14 @@ build-mock-protocol-circuits:
# Install bb
COPY ../barretenberg/cpp/+preset-release/bin/bb /usr/src/barretenberg/cpp/build/bin/bb
RUN yarn

ENV RAYON_NUM_THREADS=$RAYON_NUM_THREADS
RUN echo "building with num threads $RAYON_NUM_THREADS"
RUN cd mock-protocol-circuits && BB_HASH=$bb_source_hash NARGO=nargo ./bootstrap.sh
SAVE ARTIFACT mock-protocol-circuits

build:
ARG RAYON_NUM_THREADS
FROM +source
BUILD +build-contracts
BUILD +build-protocol-circuits
Expand Down
3 changes: 1 addition & 2 deletions noir-projects/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ case "$(uname)" in
echo "Parallel builds not supported on this operating system"
;;
esac
# This value may be too low.
# If builds fail with an amount of free memory greater than this value then it should be increased.
MIN_PARALLEL_BUILD_MEMORY=32854492
MIN_PARALLEL_BUILD_MEMORY=134217728

yarn

Expand Down
2 changes: 1 addition & 1 deletion noir-projects/noir-protocol-circuits/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ node ./scripts/generate_variants.js

echo "Compiling protocol circuits..."
NARGO=${NARGO:-../../noir/noir-repo/target/release/nargo}
$NARGO compile --silence-warnings
RAYON_NUM_THREADS=1 $NARGO compile --silence-warnings

BB_HASH=${BB_HASH:-$(cd ../../ && git ls-tree -r HEAD | grep 'barretenberg/cpp' | awk '{print $3}' | git hash-object --stdin)}
echo Using BB hash $BB_HASH
Expand Down
4 changes: 2 additions & 2 deletions spartan/aztec-network/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ http://{{ include "aztec-network.fullname" . }}-metrics.{{ .Release.Namespace }}
{{- end -}}

{{- define "aztec-network.otelCollectorMetricsEndpoint" -}}
{{ include "aztec-network.metricsHost" . }}:{{ .Values.metrics.ports.otlp }}/v1/metrics
http://metrics-opentelemetry-collector.metrics:4318/v1/metrics
{{- end -}}

{{- define "aztec-network.otelCollectorTracesEndpoint" -}}
{{ include "aztec-network.metricsHost" . }}:{{ .Values.metrics.ports.otlp }}/v1/traces
http://metrics-opentelemetry-collector.metrics:4318/v1/traces
{{- end -}}


Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/boot-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
- name: ETHEREUM_HOST
value: {{ include "aztec-network.ethereumHost" . | quote }}
containers:
- name: aztec
- name: boot-node
image: {{ .Values.images.aztec.image }}
command:
[
Expand Down
191 changes: 0 additions & 191 deletions spartan/aztec-network/templates/metrics.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/prover-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- name: ETHEREUM_HOST
value: {{ include "aztec-network.ethereumHost" . | quote }}
containers:
- name: aztec
- name: prover-node
image: "{{ .Values.images.aztec.image }}"
imagePullPolicy: {{ .Values.images.aztec.pullPolicy }}
command:
Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/pxe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
app: pxe
spec:
containers:
- name: aztec
- name: pxe
image: "{{ .Values.images.aztec.image }}"
command:
- "/bin/bash"
Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/transaction-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
- |
until curl -s {{ include "aztec-network.bootNodeUrl" . }}/status; do echo waiting for aztec-node; sleep 2; done
containers:
- name: aztec
- name: transaction-bot
image: "{{ .Values.images.aztec.image }}"
command:
- "/bin/bash"
Expand Down
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- name: ETHEREUM_HOST
value: {{ include "aztec-network.ethereumHost" . | quote }}
containers:
- name: aztec
- name: validator
image: "{{ .Values.images.aztec.image }}"
imagePullPolicy: {{ .Values.images.aztec.pullPolicy }}
command:
Expand Down
Loading
Loading