Files
evm/scripts/run.sh
T
zeekay 48e1effb07 evm: derive plugin VM ID from luxfi/constants.EVMID; bump luxfi/gpu v1.0.1
- cmd/vmid prints constants.EVMID — Go source of truth for the C-Chain VM
  ID. Build scripts and Makefile now call this instead of hardcoding the
  base58 string. Drops a stale subnet-evm ID (ag3GReYP…) from the Makefile.
- scripts/build.sh: default output is build/evm; INSTALL=1 installs under
  the derived VMID at \$LUX_PLUGIN_DIR. Codesigns on darwin in-line so a
  fresh binary doesn't get SIGKILLed by gatekeeper post-cp.
- core/parallel/gpu_bridge.go: build tag flipped from \`!nogpu\` (opt-out)
  to \`gpu\` (opt-in) so default builds don't drag in luxfi/gpu cgo.
- go.mod: luxfi/gpu v0.30.0 → v1.0.1. v0.30.0 referenced removed MLX
  symbols (mlx_from_slice_int64 etc.); v1.0.1 migrated to lux/gpu.h and
  builds cleanly with -tags gpu and -tags \"cevm gpu\".
- LLM.md: build commands updated; \"no canonical / no aliases\" reflects
  reality (single VMID, one filename, derived from Go).
2026-05-11 22:36:46 -07:00

46 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
# This script starts N nodes (TODO N instead of 5) and waits for ctrl-c to shutdown the process group of Luxd processes
# Uses data directory to store all Luxd data neatly in one location with minimal config overhead
if ! [[ "$0" =~ scripts/run.sh ]]; then
echo "must be run from repository root, but got $0"
exit 255
fi
EVM_PATH=$(
cd "$(dirname "${BASH_SOURCE[0]}")"
cd .. && pwd
)
# Load the constants
source "$EVM_PATH"/scripts/constants.sh
# Set up lux binary path and assume build directory is set
LUXD_BUILD_PATH=${LUXD_BUILD_PATH:-"$GOPATH/src/github.com/luxfi/luxd/build"}
LUXD_PATH=${LUXD_PATH:-"$LUXD_BUILD_PATH/luxd"}
LUXD_PLUGIN_DIR=${LUXD_PLUGIN_DIR:-"$LUX_PLUGIN_DIR"}
DATA_DIR=${DATA_DIR:-/tmp/evm-start-node/$(date "+%Y-%m-%d%:%H:%M:%S")}
mkdir -p "$DATA_DIR"
# Set the config file contents for the path passed in as the first argument
function _set_config(){
cat <<EOF >"$1"
{
"network-id": "local",
"sybil-protection-enabled": false,
"health-check-frequency": "5s",
"plugin-dir": "$LUXD_PLUGIN_DIR"
}
EOF
}
NODE_NAME="node1"
NODE_DATA_DIR="$DATA_DIR/$NODE_NAME"
echo "Creating data directory: $NODE_DATA_DIR"
mkdir -p "$NODE_DATA_DIR"
NODE_CONFIG_FILE_PATH="$NODE_DATA_DIR/config.json"
_set_config "$NODE_CONFIG_FILE_PATH"
(set -x; $LUXD_PATH --data-dir="$NODE_DATA_DIR" --config-file="$NODE_CONFIG_FILE_PATH")