cluster: make example presets build-from-local, add gravity_cli Makefile target#682
Open
Stumble wants to merge 1 commit into
Open
cluster: make example presets build-from-local, add gravity_cli Makefile target#682Stumble wants to merge 1 commit into
Stumble wants to merge 1 commit into
Conversation
keanji-x
approved these changes
Apr 23, 2026
keanji-x
approved these changes
Apr 23, 2026
keanji-x
approved these changes
Apr 24, 2026
1687be1 to
d0bfb84
Compare
ByteYue
approved these changes
Apr 27, 2026
…ile target
Two ergonomics fixes discovered while following the cluster deployment
docs end-to-end on a fresh machine:
1. Every cluster.toml under cluster/example/ ships with
source = { github = "Galxe/gravity-sdk", rev = "main" }
This instructs deploy.sh to re-clone gravity-sdk and cargo-build it a
second time inside the runtime dir, even when the user has already
built the binaries in target/quick-release from the top-level Makefile.
The result is a long re-build, extra disk usage, and ENOSPC on
machines with modest free space.
Change all five examples to source = { project_path = "../" }, matching
cluster/cluster.toml.example and what the presets were clearly intended
to be used for (the 1_node preset is literally named gravity-devnet-one).
Anyone wanting github-source deploys can still flip the line back.
2. The top-level Makefile had targets for gravity_node / bench / kvstore
but none for gravity_cli — yet init.sh, genesis.sh, and deploy.sh all
require gravity_cli and fail with "gravity_cli not found! Please build
it first." So the cluster docs instruction of "make BINARY=gravity_node
MODE=quick-release" does not actually produce a working setup.
Add a gravity_cli target, and a cluster convenience target that builds
both gravity_node and gravity_cli in one invocation. The cluster docs
can now say `make cluster MODE=quick-release` and work out of the box.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
d0bfb84 to
683be37
Compare
ByteYue
approved these changes
Apr 28, 2026
|
This PR is stale because it has been open 45 days with no activity. Remove the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two ergonomics fixes discovered while following the cluster deployment docs end-to-end on a clean machine.
1.
cluster/example/*/cluster.toml— changesourcefrom github-clone to local project_pathEvery preset under
cluster/example/ships with:This tells
deploy.shto re-clone the SDK and cargo-build a second copy ofgravity_nodeinside the runtime dir (e.g./tmp/gravity-cluster-one/artifacts/Galxe_gravity-sdk-main/target/quick-release/), even when the user has already built the binaries at the top-leveltarget/quick-release/by running the top-level Makefile.Observed consequences on a fresh Ubuntu 24.04 box:
make deploydies mid-build witherror: No space left on device (os error 28)— users can't figure out why because the outer build already succeeded.The default
cluster/cluster.toml.examplealready usessource = { project_path = \"../\" }— this PR brings the fivecluster/example/*/cluster.tomlfiles in line. The presets are namedgravity-devnet-one,gravity-devnet-three, etc., so local-build is clearly the intended use case. Anyone deploying from github source can still flip the line back.Files changed:
cluster/example/1_node/cluster.tomlcluster/example/1_node_distinct_roles/cluster.tomlcluster/example/3_node/cluster.tomlcluster/example/3_node_1_vfn/cluster.tomlcluster/example/3_node_distinct_roles/cluster.toml2.
Makefile— addgravity_clitarget (and aclusterconvenience target)init.sh,genesis.sh, anddeploy.shall resolvegravity_cliviafind_binaryand fail with `gravity_cli not found! Please build it first.` if it hasn't been built. But the Makefile has no target for it — onlygravity_node,bench, andkvstore. So the documented build incantation```
make BINARY=gravity_node MODE=quick-release
```
produces a broken setup: the next step (
make initormake genesis) immediately fails. Users have to either read the scripts and discover the missingcargo build -p gravity_clistep, or stumble through the error.This PR:
gravity_cliMakefile target mirroring the other binary targets.clusterconvenience target that builds bothgravity_nodeandgravity_cliin one go — the minimum set of binaries needed to run any cluster deployment.gravity_clitoBIN_DIRSsomake cleancovers it too.With this change the cluster docs can simplify to a single
make cluster MODE=quick-releasestep that actually works out of the box.Test plan
make cluster MODE=quick-releaseproduces both binaries undertarget/quick-release/make -C cluster init && make -C cluster genesis && make -C cluster deploy_startwith the1_nodepreset succeeds against the local build (no remote re-clone, no second build)127.0.0.1:8545witheth_chainId=0x5393_node,3_node_1_vfn,3_node_distinct_roles) still deploy cleanly🤖 Generated with Claude Code