From 8cb572b1fc442c8736c170c0931af3efa208937b Mon Sep 17 00:00:00 2001 From: Jordan Oroshiba Date: Tue, 7 Nov 2023 12:40:11 +0100 Subject: [PATCH] celestia-local updated --- .../files/scripts/init-bridge.sh | 1 + .../files/scripts/init-celestia-appd.sh | 1 - .../files/scripts/start-bridge.sh | 6 ++--- .../files/scripts/start-celestia-appd.sh | 25 ++++++++++++++++++- .../celestia-local/templates/configmap.yaml | 1 + .../celestia-local/templates/deployment.yaml | 1 + charts/celestia-local/values.yaml | 5 ++-- .../templates/configmaps.yaml | 2 +- 8 files changed, 34 insertions(+), 8 deletions(-) diff --git a/charts/celestia-local/files/scripts/init-bridge.sh b/charts/celestia-local/files/scripts/init-bridge.sh index c53b7df5..8d46c7e9 100755 --- a/charts/celestia-local/files/scripts/init-bridge.sh +++ b/charts/celestia-local/files/scripts/init-bridge.sh @@ -11,5 +11,6 @@ celestia bridge init \ --node.store "$home_dir/bridge" \ --core.ip 127.0.0.1 \ --core.rpc.port $celestia_app_host_port \ + --core.grpc.port $celestia_app_grpc_port \ --gateway.port $bridge_host_port cp -r "$home_dir/keyring-test" "$home_dir/bridge/keys/" diff --git a/charts/celestia-local/files/scripts/init-celestia-appd.sh b/charts/celestia-local/files/scripts/init-celestia-appd.sh index 1a141f1e..9af21166 100755 --- a/charts/celestia-local/files/scripts/init-celestia-appd.sh +++ b/charts/celestia-local/files/scripts/init-celestia-appd.sh @@ -28,6 +28,5 @@ celestia-appd gentx \ --keyring-backend="$keyring_backend" \ --chain-id "$chainid" \ --home "$home_dir" \ - --evm-address "$evm_address" celestia-appd collect-gentxs --home "$home_dir" diff --git a/charts/celestia-local/files/scripts/start-bridge.sh b/charts/celestia-local/files/scripts/start-bridge.sh index 1a6c7838..7de4674f 100755 --- a/charts/celestia-local/files/scripts/start-bridge.sh +++ b/charts/celestia-local/files/scripts/start-bridge.sh @@ -21,7 +21,8 @@ if [ ! -f "$home_dir"/token-server/index.html ]; then fi genesis_hash=$(curl -s -S -X GET "http://127.0.0.1:$celestia_app_host_port/block?height=1" | jq -r '.result.block_id.hash') - if [ -z "$genesis_hash" ]; then + echo + if [ "$genesis_hash" = "null" ]; then echo "did not receive genesis hash from celestia; exiting" exit 1 else @@ -29,7 +30,6 @@ genesis_hash=$(curl -s -S -X GET "http://127.0.0.1:$celestia_app_host_port/block fi export CELESTIA_CUSTOM="test:$genesis_hash" -# --p2p.network "test:$celestia_custom" export GOLOG_LOG_LEVEL="debug" # fixes: keystore: permissions of key 'p2p-key' are too relaxed: required: 0600, got: 0660 @@ -42,8 +42,8 @@ exec celestia bridge start \ --node.store "$home_dir/bridge" \ --core.ip 127.0.0.1 \ --core.rpc.port "$celestia_app_host_port" \ + --core.grpc.port "$celestia_app_grpc_port" \ --gateway \ --gateway.port "$bridge_host_port" \ - --gateway.deprecated-endpoints \ --rpc.port "$bridge_rpc_port" \ --keyring.accname "$validator_key_name" diff --git a/charts/celestia-local/files/scripts/start-celestia-appd.sh b/charts/celestia-local/files/scripts/start-celestia-appd.sh index 8fc69d3a..2b1fc2e7 100755 --- a/charts/celestia-local/files/scripts/start-celestia-appd.sh +++ b/charts/celestia-local/files/scripts/start-celestia-appd.sh @@ -3,4 +3,27 @@ set -o errexit -o nounset # Start the celestia-app -exec celestia-appd start --home "${home_dir}" +{ + # Wait for block 1 + sleep 15 + + VALIDATOR_ADDRESS=$(celestia-appd keys show $validator_key_name --home $home_dir --bech val --address) + echo "Registering an EVM address for validator..." + celestia-appd tx qgb register \ + $VALIDATOR_ADDRESS \ + $evm_address \ + --from $validator_key_name \ + --home $home_dir \ + --fees 30000utia \ + --broadcast-mode block \ + --yes \ + &> /dev/null # Hide output to reduce terminal noise + + echo "Registered EVM address." +} & + +exec celestia-appd start --home "${home_dir}" \ + --grpc.address "127.0.0.1:$celestia_app_grpc_port" \ + --api.enable \ + --grpc.enable \ + --grpc-web.enable diff --git a/charts/celestia-local/templates/configmap.yaml b/charts/celestia-local/templates/configmap.yaml index 5d229803..00a33963 100644 --- a/charts/celestia-local/templates/configmap.yaml +++ b/charts/celestia-local/templates/configmap.yaml @@ -14,6 +14,7 @@ data: bridge_host_port: "{{ .Values.ports.bridgeHTTP }}" bridge_rpc_port: "{{ .Values.ports.bridgeRPC }}" celestia_app_host_port: "{{ .Values.ports.celestiaAppHostPort }}" + celestia_app_grpc_port: "{{ .Values.ports.celestiaAppGrpcPort }}" --- apiVersion: v1 kind: ConfigMap diff --git a/charts/celestia-local/templates/deployment.yaml b/charts/celestia-local/templates/deployment.yaml index 19f6abd8..20e885ee 100644 --- a/charts/celestia-local/templates/deployment.yaml +++ b/charts/celestia-local/templates/deployment.yaml @@ -60,6 +60,7 @@ spec: name: celestia-local-env ports: - containerPort: {{ .Values.ports.celestiaAppHostPort }} + - containerPort: {{ .Values.ports.celestiaAppGrpcPort }} - name: celestia-bridge command: [ "/scripts/start-bridge.sh" ] image: {{ .Values.celestiaNodeImage }} diff --git a/charts/celestia-local/values.yaml b/charts/celestia-local/values.yaml index 1989b27c..4eb48a2e 100644 --- a/charts/celestia-local/values.yaml +++ b/charts/celestia-local/values.yaml @@ -14,8 +14,8 @@ storage: persistentVolumeName: "celestia-shared-storage" path: "/data/celestia-data" -celestiaAppImage: "ghcr.io/celestiaorg/celestia-app:v1.0.0-rc9" -celestiaNodeImage: "ghcr.io/astriaorg/test-images-celestia-node:v0.11.0-rc7" +celestiaAppImage: "ghcr.io/celestiaorg/celestia-app:v1.3.0" +celestiaNodeImage: "ghcr.io/celestiaorg/celestia-node:v0.12.0" tokenServerImage: "busybox:1.35.0-musl" podSecurityContext: @@ -40,6 +40,7 @@ validatorStake: "5000000000utia" # Default service ports ports: celestiaAppHostPort: 26657 + celestiaAppGrpcPort: 9090 celestiaTokenService: 5353 bridgeRPC: 26658 bridgeHTTP: 26659 diff --git a/charts/sequencer-relayer/templates/configmaps.yaml b/charts/sequencer-relayer/templates/configmaps.yaml index ae630ee0..3219970b 100644 --- a/charts/sequencer-relayer/templates/configmaps.yaml +++ b/charts/sequencer-relayer/templates/configmaps.yaml @@ -11,7 +11,7 @@ data: ASTRIA_SEQUENCER_RELAYER_BLOCK_TIME: "1000" ASTRIA_SEQUENCER_RELAYER_VALIDATOR_KEY_FILE: /cometbft/config/priv_validator_key.json ASTRIA_SEQUENCER_RELAYER_RPC_PORT: "{{ .Values.ports.relayerRPC }}" - ASTRIA_SEQUENCER_RELAYER_DISABLE_RELAY_ALL: "false" + ASTRIA_SEQUENCER_RELAYER_RELAY_ONLY_VALIDATOR_KEY_BLOCKS: "false" --- apiVersion: v1 kind: ConfigMap