-
Notifications
You must be signed in to change notification settings - Fork 26
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
EVM Rollup + DAL Nodes support #579
Changes from 28 commits
fced193
bbf5487
a538c02
ac8e372
b936ecb
267c75d
6b2e5b0
a73a341
41ebc13
f018884
f17a9d2
7950c49
d0f63b1
8c33ac7
63bca97
cd21109
ae62943
a0974ee
5f98486
6893519
be07479
9a769db
ecc6c27
6c1a232
c14f56d
eecc09b
1fe5e8a
23d3d25
b48dd97
2c84253
cfbaa30
d5f8ebd
8a2d0ab
aba1a5a
28f8187
3d2e62e
aa5e27d
ffda22e
edb23b4
fa9299c
811d6c6
892d955
9839dc7
a5a20c5
7308c14
3b6d07b
bf877fb
cecb905
3e749f3
945e698
5db2e15
a79d589
abcef9f
4c8766e
bd10f33
ea864f0
191040e
197c8c9
f69fc07
80af9d2
4f7f5e6
59a1fc9
20b7564
e1a6dba
2f5ac91
230e93d
8377099
4ea8e52
5d18e9d
b414882
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set -ex | ||
|
||
TEZ_BIN=/usr/local/bin | ||
|
||
CMD="$TEZ_BIN/octez-evm-proxy-server run \ | ||
--rpc-addr 0.0.0.0 \ | ||
--rollup-node-endpoint http://rollup-evm:8932" | ||
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. does the url need to be a variable bec there can be multiple sts's with their own services? |
||
|
||
exec $CMD |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
set -ex | ||
|
||
TEZ_VAR=/var/tezos | ||
TEZ_BIN=/usr/local/bin | ||
CLIENT_DIR="$TEZ_VAR/client" | ||
ROLLUP_DATA_DIR="$TEZ_VAR/rollup" | ||
|
||
xxd -ps -c 0 /usr/local/share/tezos/evm_kernel.wasm | tr -d '\n' > /var/tezos/smart-rollup-boot-sector | ||
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. comment here whats going on? |
||
CMD="$TEZ_BIN/octez-smart-rollup-node-alpha \ | ||
--endpoint http://tezos-node-rpc:8732 \ | ||
-d $CLIENT_DIR \ | ||
run operator for ${ROLLUP_ADDRESS} with operators ${OPERATOR_ACCOUNT} \ | ||
--data-dir ${ROLLUP_DATA_DIR} \ | ||
--boot-sector-file /var/tezos/smart-rollup-boot-sector \ | ||
--rpc-addr 0.0.0.0" | ||
|
||
exec $CMD |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ | |
{{- $_ := set . "localvars" (eq .image "utils") }} | ||
{{- end }} | ||
{{- if not (hasKey . "run_script") }} | ||
{{- $_ := set . "run_script" (eq .image "octez") }} | ||
{{- $_ := set . "run_script" (or (eq .image "octez") (eq .image "octez_debug") ) }} | ||
{{- end }} | ||
{{- if not (hasKey . "script_command") }} | ||
{{- $_ := set . "script_command" .type }} | ||
|
@@ -88,6 +88,8 @@ | |
{{- $node_vals_images := $.node_vals.images | default dict }} | ||
{{- if eq .image "octez" }} | ||
image: "{{ or $node_vals_images.octez $.Values.images.octez }}" | ||
{{- else if eq .image "octez_debug" }} | ||
image: "{{ or $node_vals_images.octez_debug $.Values.images.octez_debug }}" | ||
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. Smartrollup spec in value.y should show ability to specify image on the sts level. |
||
{{- else }} | ||
image: "{{ $.Values.tezos_k8s_images.utils }}" | ||
{{- end }} | ||
|
@@ -211,7 +213,7 @@ | |
{{- define "tezos.init_container.chain_initiator" }} | ||
{{- include "tezos.generic_container" (dict "root" $ | ||
"type" "chain-initiator" | ||
"image" "octez" | ||
"image" "octez_debug" | ||
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. I don't know much about this new image. Just curious why we are using it here |
||
) | nindent 0 }} | ||
{{- end }} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
{{- range $k, $v := .Values.smartRollupNodes }} | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: evm-proxy-{{ $k }} | ||
namespace: {{ $.Release.Namespace }} | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8545 | ||
name: evm-proxy | ||
selector: | ||
app: evm-proxy-{{ $k }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: evm-proxy-{{ $k }} | ||
namespace: {{ $.Release.Namespace }} | ||
spec: | ||
podManagementPolicy: Parallel | ||
replicas: 1 | ||
serviceName: evm-proxy-{{ $k }} | ||
selector: | ||
matchLabels: | ||
app: evm-proxy-{{ $k }} | ||
template: | ||
metadata: | ||
labels: | ||
app: evm-proxy-{{ $k }} | ||
spec: | ||
containers: | ||
- name: octez-evm-proxy | ||
image: "{{ $.Values.images.octez }}" | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 8545 | ||
name: evm-proxy | ||
command: | ||
- /bin/sh | ||
args: | ||
- "-c" | ||
- | | ||
{{ tpl ($.Files.Get "scripts/evm-proxy.sh") $ | indent 12 }} | ||
securityContext: | ||
fsGroup: 1000 | ||
--- | ||
{{- if $v.evm_proxy_ingress | default false }} | ||
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. I think this is missing in value.y spec |
||
{{- if $v.evm_proxy_ingress.enabled | default false }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: evm-proxy-{{ $k }} | ||
namespace: {{ $.Release.Namespace }} | ||
{{- with $v.evm_proxy_ingress.labels }} | ||
labels: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with $v.evm_proxy_ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
ingressClassName: {{ $v.evm_proxy_ingress.className }} | ||
{{- if $v.evm_proxy_ingress.tls }} | ||
tls: | ||
{{- range $v.evm_proxy_ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
- host: {{ $v.evm_proxy_ingress.host }} | ||
http: | ||
paths: | ||
- pathType: ImplementationSpecific | ||
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 should use the pathType prop from values.yaml and default to Prefix. I think our ingresses everywhere default to Prefix |
||
path: /* | ||
backend: | ||
service: | ||
name: evm-proxy-{{ $k }} | ||
port: | ||
name: evm-proxy | ||
{{- end }} | ||
{{- end }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: rollup-{{ $k }} | ||
namespace: {{ $.Release.Namespace }} | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8932 | ||
name: rollup | ||
selector: | ||
app: rollup-{{ $k }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: rollup-{{ $k }} | ||
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. The values.y example rollup is called |
||
namespace: {{ $.Release.Namespace }} | ||
spec: | ||
podManagementPolicy: Parallel | ||
replicas: 1 | ||
serviceName: rollup-{{ $k }} | ||
selector: | ||
matchLabels: | ||
app: rollup-{{ $k }} | ||
template: | ||
metadata: | ||
labels: | ||
app: rollup-{{ $k }} | ||
spec: | ||
containers: | ||
- name: octez-smart-rollup-node | ||
image: "{{ $.Values.images.octez_debug }}" | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 8932 | ||
name: rollup | ||
command: | ||
- /bin/sh | ||
volumeMounts: | ||
- mountPath: /var/tezos | ||
name: var-volume | ||
args: | ||
- "-c" | ||
- | | ||
{{ tpl ($.Files.Get "scripts/smart-rollup-node.sh") $ | indent 12 }} | ||
env: | ||
- name: ROLLUP_ADDRESS | ||
value: {{ $v.rollup_address }} | ||
- name: OPERATOR_ACCOUNT | ||
value: {{ $v.operator_account }} | ||
initContainers: | ||
- image: {{ $.Values.tezos_k8s_images.utils }} | ||
imagePullPolicy: IfNotPresent | ||
name: config-generator | ||
args: | ||
- "config-generator" | ||
envFrom: | ||
- configMapRef: | ||
name: tezos-config | ||
env: | ||
- name: MY_POD_NAME | ||
value: {{ $k }} | ||
- name: MY_POD_TYPE | ||
value: {{ $.Values.smart_rollup_node_statefulset.pod_type }} | ||
volumeMounts: | ||
- mountPath: /var/tezos | ||
name: var-volume | ||
- mountPath: /etc/secret-volume | ||
name: tezos-accounts | ||
securityContext: | ||
fsGroup: 1000 | ||
volumes: | ||
- volume: var-volume | ||
name: var-volume | ||
- name: tezos-accounts | ||
secret: | ||
secretName: tezos-secret | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: var-volume | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: "15Gi" | ||
--- | ||
{{- if $v.ingress | default false }} | ||
{{- if $v.ingress.enabled | default false }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: rollup-{{ $k }} | ||
namespace: {{ $.Release.Namespace }} | ||
{{- with $v.ingress.labels }} | ||
labels: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with $v.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
ingressClassName: {{ $v.ingress.className }} | ||
{{- if $v.ingress.tls }} | ||
tls: | ||
{{- range $v.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
- host: {{ $v.ingress.host }} | ||
http: | ||
paths: | ||
- pathType: ImplementationSpecific | ||
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. Should use Prefix field from values.y |
||
path: /* | ||
backend: | ||
service: | ||
name: rollup-{{ $k }} | ||
port: | ||
name: rollup | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
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.
what is this all for?