-
Notifications
You must be signed in to change notification settings - Fork 623
feat(spartan): blob sink in spartan #11307
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
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
f597ea8
feat(spartan): cl layer in spartan
Maddiaa0 abeb13c
fix: dirty rebase
Maddiaa0 76cc51d
fix: dirty merge
Maddiaa0 ee07f27
fix: dirty merge
Maddiaa0 fe5c7b9
fix
Maddiaa0 0f60492
fix: typo
Maddiaa0 cbeb8db
fix: dirty rebase
Maddiaa0 4f13f27
feat(spartan): cl layer in spartan
Maddiaa0 4b916e9
fix: dirty rebase
Maddiaa0 1b9a6f2
fix: dirty rebase
Maddiaa0 a0b46d8
feat: http client can read from consensus layer
Maddiaa0 0732751
commit
Maddiaa0 e79c0de
config
Maddiaa0 1878bf6
feat: encoded blobs
Maddiaa0 57801b3
fix: external host
Maddiaa0 02ef985
fix: archiver tests, document blobs
Maddiaa0 e060066
feat: native testnet
Maddiaa0 d5331b0
fix: running promise test
Maddiaa0 d03b3e0
fix: field reader tests
Maddiaa0 1ecd034
fix: enncoding
Maddiaa0 47cb894
fix: test
Maddiaa0 0c16770
fix: javascript adding a string to a number
Maddiaa0 f203d8e
chore: kill different blob sink urls
Maddiaa0 b1f8add
fix: allow larger transactions
Maddiaa0 46594e3
feat(spartan): cl layer in spartan
Maddiaa0 e1b9d9d
fix: dirty rebase
Maddiaa0 d384577
fix: dirty rebase
Maddiaa0 4f18b31
feat: http client can read from consensus layer
Maddiaa0 b830598
commit
Maddiaa0 c2899dc
config
Maddiaa0 1aabedf
fix: running promise test
Maddiaa0 7979ab0
fix: field reader tests
Maddiaa0 6161aec
fix: test
Maddiaa0 2019164
fix: javascript adding a string to a number
Maddiaa0 437c18e
fix: allow larger transactions
Maddiaa0 12f5c0e
feat(spartan): blob sink in spartan
Maddiaa0 8665065
fmt
Maddiaa0 66410f6
fix: telemetry client
Maddiaa0 b2a2442
fix: dirty merge
Maddiaa0 7781259
Merge branch 'master' into md/get-data-from-cl
Maddiaa0 9187177
Merge branch 'master' into md/get-data-from-cl
Maddiaa0 9a4a974
fix: native testnet script
Maddiaa0 53e391d
chore: allow l1 consensus host url to be unset
Maddiaa0 f8f0d39
Merge branch 'master' into md/get-data-from-cl
Maddiaa0 1d29a40
Merge branch 'md/get-data-from-cl' into md/blob-sink-in-spartan
Maddiaa0 310e3af
Merge branch 'master' into md/blob-sink-in-spartan
Maddiaa0 2aa2918
Merge branch 'master' into md/blob-sink-in-spartan
Maddiaa0 cab3d5f
fix: build
Maddiaa0 9ab8ad3
Merge branch 'master' into md/blob-sink-in-spartan
Maddiaa0 7124377
fix
Maddiaa0 799e80d
tmp
Maddiaa0 24509d0
Merge branch 'master' into md/blob-sink-in-spartan
Maddiaa0 cee428f
fix: cleanup yaml
Maddiaa0 8476296
fix: update github value from merge
Maddiaa0 e7b5402
Merge branch 'master' into md/blob-sink-in-spartan
Maddiaa0 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
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,126 @@ | ||
| {{- if .Values.blobSink.enabled }} | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: {{ include "aztec-network.fullname" . }}-blob-sink | ||
| labels: | ||
| {{- include "aztec-network.labels" . | nindent 4 }} | ||
| spec: | ||
| serviceName: {{ include "aztec-network.fullname" . }}-blob-sink | ||
| replicas: {{ .Values.blobSink.replicas }} | ||
| selector: | ||
| matchLabels: | ||
| {{- include "aztec-network.selectorLabels" . | nindent 6 }} | ||
| app: blob-sink | ||
| {{- if not .Values.storage.localSsd }} | ||
| volumeClaimTemplates: | ||
| - metadata: | ||
| name: blob-sink-data | ||
| spec: | ||
| accessModes: [ "ReadWriteOnce" ] | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.blobSink.dataStoreConfig.storageSize }} | ||
| {{- end }} | ||
| template: | ||
| metadata: | ||
| labels: | ||
| {{- include "aztec-network.selectorLabels" . | nindent 8 }} | ||
| app: blob-sink | ||
| spec: | ||
| {{- if .Values.storage.localSsd }} | ||
| {{- include "aztec-network.gcpLocalSsd" . | nindent 6 }} | ||
| {{- end }} | ||
| dnsPolicy: ClusterFirstWithHostNet | ||
| containers: | ||
| - name: blob-sink | ||
| {{- include "aztec-network.image" . | nindent 10 }} | ||
| command: | ||
| - /bin/bash | ||
| - -c | ||
| - | | ||
| env && \ | ||
| node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --blob-sink | ||
| startupProbe: | ||
| httpGet: | ||
| path: /status | ||
| port: {{ .Values.blobSink.service.nodePort }} | ||
| periodSeconds: {{ .Values.blobSink.startupProbe.periodSeconds }} | ||
| failureThreshold: {{ .Values.blobSink.startupProbe.failureThreshold }} | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /status | ||
| port: {{ .Values.blobSink.service.nodePort }} | ||
| initialDelaySeconds: 30 | ||
| periodSeconds: 5 | ||
| timeoutSeconds: 30 | ||
| failureThreshold: 3 | ||
| volumeMounts: | ||
| - name: blob-sink-data | ||
| mountPath: {{ .Values.blobSink.dataStoreConfig.dataDir }} | ||
| env: | ||
| - name: POD_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| - name: K8S_POD_UID | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.uid | ||
| - name: K8S_POD_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.name | ||
| - name: OTEL_SERVICE_NAME | ||
| value: blob-sink | ||
| - name: K8S_NAMESPACE_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
| - name: BLOB_SINK_PORT | ||
| value: "{{ .Values.blobSink.service.nodePort }}" | ||
| - name: LOG_LEVEL | ||
| value: "{{ .Values.blobSink.logLevel }}" | ||
| - name: LOG_JSON | ||
| value: "1" | ||
| - name: DATA_DIRECTORY | ||
| value: "{{ .Values.blobSink.dataStoreConfig.dataDir }}" | ||
| - name: DATA_STORE_MAP_SIZE_KB | ||
| value: "{{ .Values.blobSink.dataStoreConfig.dataStoreMapSize }}" | ||
| - name: USE_GCLOUD_OBSERVABILITY | ||
| value: "{{ .Values.telemetry.useGcloudObservability }}" | ||
| ports: | ||
| - containerPort: {{ .Values.blobSink.service.nodePort }} | ||
| resources: | ||
| {{- toYaml .Values.blobSink.resources | nindent 12 }} | ||
| volumes: | ||
| {{- if .Values.storage.localSsd }} | ||
| - name: blob-sink-data | ||
| emptyDir: {} | ||
| {{ else }} | ||
| - name: blob-sink-data | ||
| persistentVolumeClaim: | ||
| claimName: blob-sink-data | ||
| {{- end }} | ||
| --- | ||
| # Headless service for StatefulSet DNS entries | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ include "aztec-network.fullname" . }}-blob-sink | ||
| labels: | ||
| {{- include "aztec-network.labels" . | nindent 4 }} | ||
| spec: | ||
| {{- if .Values.network.public }} | ||
| type: LoadBalancer | ||
| {{- else }} | ||
| type: ClusterIP | ||
| clusterIP: None | ||
| {{- end }} | ||
| selector: | ||
| {{- include "aztec-network.selectorLabels" . | nindent 4 }} | ||
| app: blob-sink | ||
| ports: | ||
| - port: {{ .Values.blobSink.service.nodePort }} | ||
| name: node | ||
| {{- 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { | ||
| type BlobSinkConfig, | ||
| blobSinkConfigMappings, | ||
| createBlobSinkServer, | ||
| getBlobSinkConfigFromEnv, | ||
| } from '@aztec/blob-sink/server'; | ||
| import { type LogFn } from '@aztec/foundation/log'; | ||
| import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client'; | ||
|
|
||
| import { extractRelevantOptions } from '../util.js'; | ||
|
|
||
| export async function startBlobSink(options: any, signalHandlers: (() => Promise<void>)[], userLog: LogFn) { | ||
| if (options.prover || options.node || options.sequencer || options.pxe || options.p2pBootstrap || options.txe) { | ||
| userLog( | ||
| `Starting a blob sink with --node, --sequencer, --pxe, --p2p-bootstrap, --prover or --txe is not supported.`, | ||
| ); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| const blobSinkConfig = { | ||
| ...getBlobSinkConfigFromEnv(), // get default config from env | ||
| ...extractRelevantOptions<BlobSinkConfig>(options, blobSinkConfigMappings, 'blobSink'), // override with command line options | ||
| }; | ||
|
|
||
| const telemetry = initTelemetryClient(getTelemetryClientConfig()); | ||
|
|
||
| const blobSink = await createBlobSinkServer(blobSinkConfig, telemetry); | ||
| signalHandlers.push(blobSink.stop.bind(blobSink)); | ||
|
|
||
| await blobSink.start(); | ||
| } |
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.
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.
I think a mistake here