Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
celestia-local updated
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba committed Nov 7, 2023
1 parent 009e04d commit 8cb572b
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 8 deletions.
1 change: 1 addition & 0 deletions charts/celestia-local/files/scripts/init-bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
1 change: 0 additions & 1 deletion charts/celestia-local/files/scripts/init-celestia-appd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 3 additions & 3 deletions charts/celestia-local/files/scripts/start-bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ 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
echo "genesis hash received: $genesis_hash"
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
Expand All @@ -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"
25 changes: 24 additions & 1 deletion charts/celestia-local/files/scripts/start-celestia-appd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions charts/celestia-local/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/celestia-local/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 3 additions & 2 deletions charts/celestia-local/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -40,6 +40,7 @@ validatorStake: "5000000000utia"
# Default service ports
ports:
celestiaAppHostPort: 26657
celestiaAppGrpcPort: 9090
celestiaTokenService: 5353
bridgeRPC: 26658
bridgeHTTP: 26659
2 changes: 1 addition & 1 deletion charts/sequencer-relayer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8cb572b

Please sign in to comment.