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: Trusted Builder Optimistic Simulation #1404

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9f7e8fd
execution api updates for trusted builder
bharath-123 Aug 29, 2024
6728aa8
run fmt and lint
bharath-123 Aug 2, 2024
4603804
cover deposits case
bharath-123 Sep 6, 2024
17806ec
initial version of trusted builder mvp
bharath-123 Sep 6, 2024
3819546
update charts for trusted builder
bharath-123 Aug 29, 2024
5341900
submit bundle only when new block is created
bharath-123 Aug 29, 2024
bc3dbc8
use soft block hash instead of parent hash
bharath-123 Aug 8, 2024
422c851
save
bharath-123 Aug 8, 2024
0157034
clean ups
bharath-123 Sep 6, 2024
661ca3e
add message hash to proto
bharath-123 Aug 29, 2024
f3a05e1
use string for message_hash
bharath-123 Aug 12, 2024
801df96
use bytes
bharath-123 Aug 12, 2024
f915c06
remove message hash
bharath-123 Aug 12, 2024
acc6c56
fix warnings
bharath-123 Sep 6, 2024
977666f
final additions
bharath-123 Sep 6, 2024
f23d50a
fix tests
bharath-123 Sep 6, 2024
4f96b62
minor fixes
bharath-123 Aug 13, 2024
4639200
run fmt
bharath-123 Aug 13, 2024
28148ec
handle bundle pushing error using wrap_err
bharath-123 Aug 14, 2024
5302516
revert dev.yaml changes
bharath-123 Aug 14, 2024
c472e03
use Bytes instead of Vec<u8>
bharath-123 Aug 20, 2024
8d70dc7
run just fmt
bharath-123 Aug 20, 2024
df5c12c
save
bharath-123 Aug 20, 2024
9f8fac3
add sequencer hooks
bharath-123 Sep 6, 2024
4dd0c97
setup sequencer to composer communication
bharath-123 Sep 6, 2024
70e8720
it compiles
bharath-123 Aug 29, 2024
ba30cd1
trusted builder iteration 2
bharath-123 Sep 6, 2024
ef6c527
remove bridge contracts
bharath-123 Aug 23, 2024
0055676
chart changes
bharath-123 Aug 23, 2024
c5132b4
update astria-geth image name
bharath-123 Aug 29, 2024
1117e03
overrideTag
quasystaty1 Aug 23, 2024
dba08b3
use release namespace
bharath-123 Aug 28, 2024
e7b408f
some minor changes
bharath-123 Aug 28, 2024
73ca26d
fmt + lint
bharath-123 Aug 29, 2024
a3feff0
some clean ups
bharath-123 Aug 29, 2024
0585187
update tests
bharath-123 Sep 6, 2024
67272c6
save
bharath-123 Aug 30, 2024
cb1d30a
save
bharath-123 Aug 30, 2024
3db4f31
expose composer grpc port in an ingress
bharath-123 Sep 2, 2024
9012050
update charts
bharath-123 Sep 3, 2024
f177372
fix
bharath-123 Sep 4, 2024
e54d895
minor fixes
bharath-123 Sep 6, 2024
19e56af
undo chart changes
bharath-123 Sep 6, 2024
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
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions charts/celestia-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ ports:
celestia:
rpc: 26658

resources:
requests:
cpu: 1
memory: 4Gi
limits:
cpu: 2
memory: 8Gi
resources: {}
# requests:
# cpu: 1
# memory: 4Gi
# limits:
# cpu: 2
# memory: 8Gi

# When deploying in a production environment should use a secret provider
# This is configured for use with GCP, need to set own resource names
Expand Down
33 changes: 32 additions & 1 deletion charts/composer/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,45 @@ metadata:
name: composer-env
namespace: {{ include "composer.namespace" . }}
data:
{{/* ASTRIA_COMPOSER_LOG: "astria_composer={{ .Values.config.logLevel }}"*/}}
{{/* ASTRIA_COMPOSER_API_LISTEN_ADDR: "0.0.0.0:{{ .Values.ports.healthApi }}"*/}}
{{/* ASTRIA_COMPOSER_GRPC_ADDR: "0.0.0.0:{{ .Values.ports.grpc }}"*/}}
{{/* ASTRIA_COMPOSER_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.sequencerChainId . }}"*/}}
{{/* ASTRIA_COMPOSER_SEQUENCER_URL: "{{ tpl .Values.config.sequencerRpc . }}"*/}}
{{/* ASTRIA_COMPOSER_ROLLUPS: "{{ include "composer.rollups" . }}"*/}}
{{/* ASTRIA_COMPOSER_PRIVATE_KEY_FILE: "/var/secrets/{{ .Values.config.privateKey.secret.filename }}"*/}}
{{/* ASTRIA_COMPOSER_MAX_BYTES_PER_BUNDLE: "{{ .Values.config.maxBytesPerBundle }}"*/}}
{{/* ASTRIA_COMPOSER_BUNDLE_QUEUE_CAPACITY: "{{ .Values.config.bundleQueueCapacity }}"*/}}
{{/* ASTRIA_COMPOSER_MAX_SUBMIT_INTERVAL_MS: "{{ .Values.config.maxSubmitInterval }}"*/}}
{{/* ASTRIA_COMPOSER_SEQUENCER_ADDRESS_PREFIX: "{{ .Values.config.sequencerAddressPrefix}}"*/}}
{{/* ASTRIA_COMPOSER_FEE_ASSET: "{{ .Values.config.sequencerNativeAssetBaseDenomination }}"*/}}
{{/* ASTRIA_COMPOSER_NO_METRICS: "{{ not .Values.metrics.enabled }}"*/}}
{{/* ASTRIA_COMPOSER_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.metrics }}"*/}}
{{/* ASTRIA_COMPOSER_FORCE_STDOUT: "{{ .Values.global.useTTY }}"*/}}
{{/* ASTRIA_COMPOSER_PRETTY_PRINT: "{{ .Values.global.useTTY }}"*/}}
{{/* NO_COLOR: "{{ .Values.global.useTTY }}"*/}}
{{/* ASTRIA_COMPOSER_NO_OTEL: "{{ not .Values.otel.enabled }}"*/}}
{{/* OTEL_EXPORTER_OTLP_ENDPOINT: "{{ tpl .Values.otel.endpoint . }}"*/}}
{{/* OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ tpl .Values.otel.tracesEndpoint . }}"*/}}
{{/* OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ tpl .Values.otel.tracesTimeout . }}"*/}}
{{/* OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ tpl .Values.otel.tracesCompression . }}"*/}}
{{/* OTEL_EXPORTER_OTLP_HEADERS: "{{ tpl .Values.otel.otlpHeaders . }}"*/}}
{{/* OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ tpl .Values.otel.traceHeaders . }}"*/}}
{{/* OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceName . }}"*/}}
{{/* {{- if not .Values.global.dev }}*/}}
{{/* {{- else }}*/}}
{{/* {{- end }}*/}}
ASTRIA_COMPOSER_LOG: "astria_composer={{ .Values.config.logLevel }}"
ASTRIA_COMPOSER_API_LISTEN_ADDR: "0.0.0.0:{{ .Values.ports.healthApi }}"
ASTRIA_COMPOSER_GRPC_ADDR: "0.0.0.0:{{ .Values.ports.grpc }}"
ASTRIA_COMPOSER_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.sequencerChainId . }}"
ASTRIA_COMPOSER_SEQUENCER_URL: "{{ tpl .Values.config.sequencerRpc . }}"
ASTRIA_COMPOSER_ROLLUPS: "{{ include "composer.rollups" . }}"
ASTRIA_COMPOSER_ROLLUP: "{{ .Values.config.rollupName }}"
ASTRIA_COMPOSER_ROLLUP_WEBSOCKET_URL: "ws://{{ .Values.global.rollupName }}-evm-service.{{ default .Release.Namespace .Values.global.namespaceOverride }}.svc.cluster.local:8546"
ASTRIA_COMPOSER_EXECUTION_API_URL: "http://{{ .Values.global.rollupName }}-evm-service.{{ default .Release.Namespace .Values.global.namespaceOverride }}.svc.cluster.local:50051"
ASTRIA_COMPOSER_PRIVATE_KEY_FILE: "/var/secrets/{{ .Values.config.privateKey.secret.filename }}"
ASTRIA_COMPOSER_MAX_BYTES_PER_BUNDLE: "{{ .Values.config.maxBytesPerBundle }}"
ASTRIA_COMPOSER_MAX_BUNDLE_SIZE: "{{ .Values.config.maxBundleSize }}"
ASTRIA_COMPOSER_BUNDLE_QUEUE_CAPACITY: "{{ .Values.config.bundleQueueCapacity }}"
ASTRIA_COMPOSER_MAX_SUBMIT_INTERVAL_MS: "{{ .Values.config.maxSubmitInterval }}"
ASTRIA_COMPOSER_SEQUENCER_ADDRESS_PREFIX: "{{ .Values.config.sequencerAddressPrefix}}"
Expand Down
71 changes: 71 additions & 0 deletions charts/composer/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressApiIsStable := eq (include "rollup.ingress.isStable" .) "true" -}}
{{- $ingressSupportsIngressClassName := eq (include "rollup.ingress.supportsIngressClassName" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "rollup.ingress.supportsPathType" .) "true" -}}

{{- range $service, $ingress := .Values.ingress.services }}
{{- if $ingress.enabled -}}
{{- $servicePort := $ingress.service.port -}}
{{- $serviceName := tpl $ingress.service.name $ -}}
{{- $ingressPath := $ingress.path -}}
{{- $ingressPathType := $ingress.pathType -}}
{{- $extraPaths := $ingress.extraPaths }}
---
apiVersion: {{ include "rollup.ingress.apiVersion" $ }}
kind: Ingress
metadata:
name: astria-local-{{ $service }}-ingress
namespace: {{ include "rollup.namespace" $ }}
labels:
{{- with $ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
{{- if not $ingressSupportsIngressClassName }}
kubernetes.io/ingress.class: {{ $.Values.ingress.className }}
{{- end }}
{{- if $ingressApiIsStable }}
{{- range $key, $value := $ingress.annotations }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
spec:
{{- if $ingressSupportsIngressClassName }}
ingressClassName: {{ $.Values.ingress.className }}
{{- end -}}
{{- with $ingress.service }}
defaultBackend:
service:
{{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
rules:
{{- with $ingress.hosts }}
{{- range $host := . }}
- host: {{ tpl $host $ }}
http:
paths:
{{- with $extraPaths }}
{{- toYaml . | nindent 10 }}
{{- end }}
- path: {{ $ingressPath }}
{{- if $ingressSupportsPathType }}
pathType: {{ $ingressPathType }}
{{- end }}
backend:
{{- if $ingressApiIsStable }}
service:
{{- tpl (toYaml $ingress.service) $ | nindent 16 }}
{{- else }}
serviceName: {{ tpl $serviceName $ }}
servicePort: {{ tpl $servicePort $ }}
{{- end }}
{{- end }}
{{- end }}
{{- if $ingress.tls }}
tls:
{{- tpl (toYaml $ingress.tls) $ | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
40 changes: 31 additions & 9 deletions charts/composer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,30 @@ global:
replicaCount: 1
# Whether to use tty readable logging for astria services, when false use json.
useTTY: false
dev: false
dev: true

images:
composer:
repo: ghcr.io/astriaorg/composer
repo: astria-composer
tag: "0.8.2"
devTag: latest
devTag: tb

config:
logLevel: "debug"
logLevel: "info"
maxBytesPerBundle: 200000
maxBundleSize: 200000
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maxBundleSize can be removed.

bundleQueueCapacity: 40000
maxSubmitInterval: 2000
maxSubmitInterval: 1800
sequencerAddressPrefix: astria
sequencerNativeAssetBaseDenomination: "nria"
sequencerRpc: ""
sequencerChainId: ""
privateKey:
devContent: ""
devContent: "e315da1eafadb1e323a53244bdca8365437c643f0977de9ecf44cc926538f918"
secret:
filename: "key.hex"
resourceName: "projects/$PROJECT_ID/secrets/sequencerPrivateKey/versions/latest"
rollups:
- name: "astria"
wsRpc: "ws://"
rollupName: "astria"

otel:
enabled: false
Expand Down Expand Up @@ -73,3 +72,26 @@ ports:
grpc: 50052
healthApi: 2450
metrics: 6060


ingress:
enabled: true
labels: {}
hostname: localdev.me
className: nginx
services:
rpc:
enabled: true
hosts:
- 'composer.astria-local.{{ .Values.ingress.hostname }}'
path: /
pathType: Prefix
service:
name: 'composer-service'
port:
name: grpc
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
labels: {}
tls: {}
2 changes: 2 additions & 0 deletions charts/deploy.just
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ deploy-sequencer name=validatorName:
-n astria-validator-{{name}} --create-namespace \
{{name}}-sequencer-chart ./charts/sequencer
deploy-sequencers: (deploy-sequencer "node0") (deploy-sequencer "node1") (deploy-sequencer "node2")
#deploy-sequencers: (deploy-sequencer "node0") (deploy-sequencer "node1")


deploy-hermes-local:
helm install hermes-local-chart ./charts/hermes \
Expand Down
3 changes: 1 addition & 2 deletions charts/evm-rollup/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ The log level represented as a number
Full image paths for Astria built images
*/}}
{{- define "rollup.image" -}}
{{ .Values.images.geth.repo }}:{{ if .Values.images.geth.overrideTag }}{{ .Values.images.geth.overrideTag }}{{ else }}{{ if .Values.global.dev }}{{ .Values.images.geth.devTag }}{{ else }}{{ .Values.images.geth.tag }}{{ end }}
{{- end }}
{{ .Values.images.geth.repo }}:{{ if .Values.images.geth.overrideTag }}{{ .Values.images.geth.overrideTag }}{{ else if .Values.global.dev }}{{ .Values.images.geth.devTag }}{{ else }}{{ .Values.images.geth.tag }}{{ end }}
{{- end }}
{{- define "conductor.image" -}}
{{ .Values.images.conductor.repo }}:{{ if .Values.global.dev }}{{ .Values.images.conductor.devTag }}{{ else }}{{ .Values.images.conductor.tag }}{{ end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/evm-rollup/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
- name: ws-rpc-svc
port: {{ .Values.ports.wsRPC }}
targetPort: ws-rpc
- name: exec-grpc-svc
port: {{ .Values.ports.executionGRPC }}
targetPort: execution-grpc
---
{{- if .Values.metrics.enabled }}
kind: Service
Expand Down
46 changes: 28 additions & 18 deletions charts/evm-rollup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ global:
# Whether to use tty readable logging for astria services, when false use json.
# Best to be false in production environments, true for clean logs on local dev.
useTTY: false
dev: false
dev: true

images:
geth:
repo: ghcr.io/astriaorg/astria-geth
repo: ghcr.io/astriaorg/go-ethereum
tag: 0.14.0
devTag: latest
overrideTag: ""
devTag: tb
conductor:
repo: ghcr.io/astriaorg/conductor
repo: astria-conductor
tag: "0.20.0"
devTag: latest
devTag: tb


genesis:
Expand Down Expand Up @@ -89,6 +88,10 @@ genesis:
value:
balance: "0"
code: "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3"
- address: "0xC873fC6685abF295cc537811C234B2B3aD54Af42"
value:
balance: "1000000000000000000000"

# Example of simple genesis account funding
# - address: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30"
# value:
Expand Down Expand Up @@ -268,22 +271,29 @@ ingress:
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
# exec-api:
# enabled: true
# hosts:
# - exec-executor.{{ include "rollup.name" . }}.{{ .Values.ingress.hostname }}
# path: /
# pathType: Prefix
# service:
# name: '{{ include "rollup.name" . }}-evm-service'
# port:
# name: exec-grpc-svc
# annotations: {}
# # kubernetes.io/ingress.class: nginx
# # kubernetes.io/tls-acme: "true"
# labels: {}
# tls: {}
# # - secretName: chart-example-tls
# # hosts:
# # - chart-example.local

# Default persistent storage values
# NOTE - `rollupName` will be used with `persistentVolumeName` to generate names for kubernetes resources.
# e.g. astria-executor-pv, astria-executor-pvc
resources:
conductor:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 1000m
memory: 2Gi
geth:
requests:
cpu: 16000m
memory: 32Gi
resources: {}

storage:
enabled: false
Expand Down
7 changes: 4 additions & 3 deletions charts/evm-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ evm-rollup:
otlpHeaders: "{{ .Values.global.otel.otlpHeaders }}"
traceHeaders: "{{ .Values.global.otel.traceHeaders }}"

celestia-node:
enabled: false

composer:
enabled: false
config:
Expand All @@ -59,6 +56,10 @@ composer:
otlpHeaders: "{{ .Values.global.otel.otlpHeaders }}"
traceHeaders: "{{ .Values.global.otel.traceHeaders }}"


celestia-node:
enabled: false

evm-faucet:
enabled: false
config:
Expand Down
2 changes: 1 addition & 1 deletion charts/sequencer/files/cometbft/config/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{- if $index }},{{- end }}
{
"address": {{ include "sequencer.address" $value.address }},
"balance": {{ include "sequencer.toUint128Proto" ( toString $value.balance | replace "\"" "" ) }}
"balance": {{ include "sequencer.toUint128Proto" ( toString $value.balance | replace "\"" "" ) }}
}
{{- end }}
],
Expand Down
2 changes: 2 additions & 0 deletions charts/sequencer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ data:
ASTRIA_SEQUENCER_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.sequencerMetrics }}"
ASTRIA_SEQUENCER_FORCE_STDOUT: "{{ .Values.global.useTTY }}"
ASTRIA_SEQUENCER_PRETTY_PRINT: "{{ .Values.global.useTTY }}"
ASTRIA_SEQUENCER_COMPOSER_HOOK: "http://composer-service.{{ default .Release.Namespace .Values.global.namespaceOverride }}.svc.cluster.local:50052"
ASTRIA_SEQUENCER_COMPOSER_HOOK_ENABLED: "{{ .Values.sequencer.composerHook.enabled}}"
NO_COLOR: "{{ .Values.global.useTTY }}"
ASTRIA_SEQUENCER_NO_OTEL: "{{ not .Values.sequencer.otel.enabled }}"
OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.sequencer.otel.endpoint }}"
Expand Down
Loading