diff --git a/Makefile b/Makefile index 28118db6..6b3279c4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ BINARY ?= gravity_node FEATURE ?= MODE ?= release -BIN_DIRS := gravity_node bench kvstore +BIN_DIRS := gravity_node gravity_cli bench kvstore BIN_PATHS := $(addprefix bin/, $(BIN_DIRS)) ifeq ($(MODE),release) @@ -15,13 +15,22 @@ endif CARGO_FEATURES := $(if $(FEATURE),--features $(FEATURE),) -.PHONY: all $(BIN_DIRS) clean +.PHONY: all cluster $(BIN_DIRS) clean all: $(BINARY) +# Convenience target: build everything the cluster/ scripts need. +# `make init`, `make genesis`, and `make deploy` all require gravity_cli in +# addition to gravity_node, so this target is the one-shot build for anyone +# following the cluster deployment or local-devnet docs. +cluster: gravity_node gravity_cli + gravity_node: RUSTFLAGS="--cfg tokio_unstable" cargo build -p gravity_node $(CARGO_FLAGS) $(CARGO_FEATURES) +gravity_cli: + cargo build -p gravity_cli $(CARGO_FLAGS) $(CARGO_FEATURES) + bench: cargo build -p bench $(CARGO_FLAGS) $(CARGO_FEATURES) diff --git a/cluster/example/1_node/cluster.toml b/cluster/example/1_node/cluster.toml index b7a3b9d9..e0187998 100644 --- a/cluster/example/1_node/cluster.toml +++ b/cluster/example/1_node/cluster.toml @@ -13,7 +13,7 @@ waypoint_path = "./output/waypoint.txt" [[nodes]] id = "node1" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6180 vfn_port = 6190 diff --git a/cluster/example/1_node_distinct_roles/cluster.toml b/cluster/example/1_node_distinct_roles/cluster.toml index 9eab258b..2dbd3f69 100644 --- a/cluster/example/1_node_distinct_roles/cluster.toml +++ b/cluster/example/1_node_distinct_roles/cluster.toml @@ -12,7 +12,7 @@ waypoint_path = "./output/waypoint.txt" [[nodes]] id = "node1" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6180 vfn_port = 6190 diff --git a/cluster/example/3_node/cluster.toml b/cluster/example/3_node/cluster.toml index 269ce496..75de2be4 100644 --- a/cluster/example/3_node/cluster.toml +++ b/cluster/example/3_node/cluster.toml @@ -13,7 +13,7 @@ waypoint_path = "./output/waypoint.txt" [[nodes]] id = "node1" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6180 vfn_port = 6190 @@ -27,7 +27,7 @@ reth_p2p_port = 12024 [[nodes]] id = "node2" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6181 vfn_port = 6191 @@ -41,7 +41,7 @@ reth_p2p_port = 12025 [[nodes]] id = "node3" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6182 vfn_port = 6192 diff --git a/cluster/example/3_node_1_vfn/cluster.toml b/cluster/example/3_node_1_vfn/cluster.toml index b4ee1c82..4eb63003 100644 --- a/cluster/example/3_node_1_vfn/cluster.toml +++ b/cluster/example/3_node_1_vfn/cluster.toml @@ -13,7 +13,7 @@ waypoint_path = "./output/waypoint.txt" [[nodes]] id = "node1" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6180 vfn_port = 6190 @@ -27,7 +27,7 @@ reth_p2p_port = 12024 [[nodes]] id = "node2" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6181 vfn_port = 6191 @@ -41,7 +41,7 @@ reth_p2p_port = 12025 [[nodes]] id = "node3" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6182 vfn_port = 6192 @@ -55,7 +55,7 @@ reth_p2p_port = 12026 [[nodes]] id = "vfn1" role = "vfn" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" vfn_port = 6193 rpc_port = 8548 diff --git a/cluster/example/3_node_distinct_roles/cluster.toml b/cluster/example/3_node_distinct_roles/cluster.toml index 9d9a9990..a3a526bb 100644 --- a/cluster/example/3_node_distinct_roles/cluster.toml +++ b/cluster/example/3_node_distinct_roles/cluster.toml @@ -12,7 +12,7 @@ waypoint_path = "./output/waypoint.txt" [[nodes]] id = "node1" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6180 vfn_port = 6190 @@ -26,7 +26,7 @@ reth_p2p_port = 12024 [[nodes]] id = "node2" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6181 vfn_port = 6191 @@ -40,7 +40,7 @@ reth_p2p_port = 12025 [[nodes]] id = "node3" role = "genesis" -source = { github = "Galxe/gravity-sdk", rev = "main" } +source = { project_path = "../" } host = "127.0.0.1" validator_port = 6182 vfn_port = 6192