Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
puppetninja committed Jul 25, 2024
1 parent c287b20 commit 5f6f27b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 32 deletions.
24 changes: 19 additions & 5 deletions charts/tezos/scripts/evm-observer.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
set -ex
set -e

TEZ_VAR=/var/tezos
TEZ_BIN=/usr/local/bin
ROLLUP_DATA_DIR="$TEZ_VAR/rollup"
EVM_DATA_DIR="$TEZ_VAR/evm"

CMD="$TEZ_BIN/octez-evm-node run proxy \
with endpoint http://rollup-${MY_POD_NAME}:8932 \
--devmode \
--rpc-addr 0.0.0.0"
set -x

if [ ! -e "${EVM_DATA_DIR}/store/store.1.mapping" ]; then
$TEZ_BIN/octez-evm-node init from rollup node ${ROLLUP_DATA_DIR} --data-dir ${SEQUENCER_DATA_DIR}
fi

CMD="$TEZ_BIN/octez-evm-node run observer \
--evm-node-endpoint ${EVM_NODE_ENDPOINT} \
--rollup-node-endpoint http://127.0.0.1:8932 \
--data-dir ${EVM_DATA_DIR} \
--preimages-endpoint ${EVM_WASM_ENDPOINT} \
--rpc-addr 0.0.0.0 \
--rpc-port 8545 \
--cors-origins '*' \
--cors-headers '*'
exec $CMD
23 changes: 23 additions & 0 deletions charts/tezos/scripts/evm-sequencer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set -e

TEZ_VAR=/var/tezos
TEZ_BIN=/usr/local/bin
ROLLUP_DATA_DIR="$TEZ_VAR/rollup"
SEQUENCER_DATA_DIR="$TEZ_VAR/evm"

set -x

if [ ! -e "/var/tezos/sequencer/store/store.1.mapping" ]; then
octez-evm-node init from rollup node ${ROLLUP_DATA_DIR} \
--data-dir ${SEQUENCER_DATA_DIR}
fi


CMD="$TEZ_BIN/octez-evm-node run sequencer \
with endpoint http://127.0.0.1:8932 \
signing with edsk3rw6fcwjPe5xkGWAbSquLDQALKP8XyMhy4c6PQGr7qQKTYa8rX \
--data-dir ${SEQUENCER_DATA_DIR} \
--time-between-blocks 6 \
--rpc-addr 0.0.0.0"

exec $CMD
10 changes: 0 additions & 10 deletions charts/tezos/scripts/evm-state-init.sh

This file was deleted.

17 changes: 0 additions & 17 deletions charts/tezos/templates/octez-rollup-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,6 @@ spec:
env:
- name: NODE_RPC_URL
value: { { $v.node_rpc_url } }
{{- if $v.evm }}
- name: evm-state-importer
image: "{{ $v.evm.image.name | default $.Values.images.octez }}"
imagePullPolicy: {{ $v.evm.image.pullPolicy | default $.Values.images_pull_policy }}
command:
- /bin/sh
volumeMounts:
- mountPath: /var/tezos
name: var-volume
args:
- "-c"
- |
{ { tpl ($.Files.Get "scripts/evm-state-init.sh") $ | indent 12 } }
env:
- name: ROLLUP_URL
value: { { $v.rollup_url } }
{{ end }}
- image: {{ $.Values.tezos_k8s_images.utils }}
imagePullPolicy: {{ $.Values.tezos_k8s_images_pull_policy }}
name: config-generator
Expand Down

0 comments on commit 5f6f27b

Please sign in to comment.