Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions client-cmds/gean-cmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

# Metrics enabled by default if not strictly disabled
metrics_flag=""
if [ "$enableMetrics" != "false" ]; then
metrics_flag="--metrics-port $metricsPort"
fi

# Gean uses --listen-addr for libp2p (TCP) and --discovery-port for Discv5 (UDP)
# We map $quicPort to the TCP listen port for consistency in port allocation

# Resolve binary path relative to the script location
# Fallback to absolute path if scriptDir is not available
BASE_DIR="${scriptDir:-$(pwd)}"
gean_bin="$BASE_DIR/../gean/bin/gean"

node_binary="$gean_bin \
--data-dir \"$dataDir/$item\" \
--genesis \"$configDir/config.yaml\" \
--bootnodes \"$configDir/nodes.yaml\" \
--validator-registry-path \"$configDir/validators.yaml\" \
--node-id \"$item\" \
--node-key \"$configDir/$privKeyPath\" \
--validator-keys \"$configDir/hash-sig-keys\" \
--listen-addr \"/ip4/0.0.0.0/tcp/$quicPort\" \
--discovery-port $quicPort \
--devnet-id \"${devnet:-devnet0}\" \
$metrics_flag"

# Docker command (assumes image entrypoint handles the binary)
node_docker="ghcr.io/geanlabs/gean:devnet1 \
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have a devnet3 image? We are no longer testing or supporting the earlier devnets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification. We’ll go ahead and close this PR and realign our changes with the currently supported devnet.

--data-dir /data \
--genesis /config/config.yaml \
--bootnodes /config/nodes.yaml \
--validator-registry-path /config/validators.yaml \
--node-id $item \
--node-key /config/$privKeyPath \
--validator-keys /config/hash-sig-keys \
--listen-addr /ip4/0.0.0.0/tcp/$quicPort \
--discovery-port $quicPort \
--devnet-id ${devnet:-devnet0} \
$metrics_flag"

node_setup="docker" # Default to binary for now as per user workflow
12 changes: 12 additions & 0 deletions local-devnet/genesis/validator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,15 @@ validators:
metricsPort: 8087
isAggregator: false
count: 1

- name: "gean_0"
# node id a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2
# peer id 16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5
privkey: "b64ff53a840df124366237216d76a83dbe8590406eed008bae3b3e89a9c4565f"
# verify /ip4/127.0.0.1/udp/9007/quic-v1/p2p/16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5
enrFields:
ip: "127.0.0.1"
quic: 9008
metricsPort: 8088
isAggregator: false
count: 1