-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dev): add nix-based dev-env #4726
Conversation
Trying to make it easier to spin up a fullnode on localhost. The team has been focused on writing tooling, like pindexer, and the manual steps to munge CometBFT configs and setup a localhost postgres database are not awesome. In addition to pd/cometbft spin-up, the dev-env includes: * metrics * postgres * pindexer Not yet including grpcui, because the latest published version doesn't support the new server reflection API. Will tack that on in a dedicated follow-up. The dev-env is strongly opinionated and uses nix [0] to manage cross-platform, polyglot dependencies. There's other great work in our ecosystem, e.g. [1], and this early push tries to be consistent with that. Updates the relevant first-run docs. Much more work should be done on the developer-focused content in the guide overall, including an overhaul of discussing RPC endpoints and web-relevant resources, but those changes can land in the future. This PR aims to establish a basis for a sane, supported dev-env, providing a pleasant first-run experience for newcomers (and existing devs too). [0] https://nixos.org [1] https://github.com/informalsystems/cosmos.nix
Guide was easy to follow, but I got this error when trying to run
|
Cool, looks good to me. I hit a few macOS-related stumbling blocks but pushed up fixes. I was able to get everything running in the end. |
Nice, thanks for taking a look! Some of the macos-specific entries broke the dev env on Linux for me, so let me tinker a bit more... |
Nice, thanks both for testing! |
There were a few recent changes made to the guide in the protocol repo, as of [0], and this commit pulls those changes in. At the very least, I noticed that changes from the following PRs were missing: * penumbra-zone/penumbra#4732 * penumbra-zone/penumbra#4726 Tried to make sure to preserve unique content updates implemented during the mdbook -> nextra conversion. [0] https://github.com/penumbra-zone/penumbra/tree/a2ffd8a79f1b397e81df7b7e31b256d545cdf004/docs/guide
There were a few recent changes made to the guide in the protocol repo, as of [0], and this commit pulls those changes in. At the very least, I noticed that changes from the following PRs were missing: * penumbra-zone/penumbra#4732 * penumbra-zone/penumbra#4726 Tried to make sure to preserve unique content updates implemented during the mdbook -> nextra conversion. [0] https://github.com/penumbra-zone/penumbra/tree/a2ffd8a79f1b397e81df7b7e31b256d545cdf004/docs/guide
Describe your changes
Trying to make it easier to spin up a fullnode on localhost. The team has been focused on writing tooling, like pindexer, and the manual steps to munge CometBFT configs and setup a localhost postgres database are not awesome. In addition to pd/cometbft spin-up, the dev-env includes:
Not yet including grpcui, because the latest published version doesn't support the new server reflection API. Will tack that on in a dedicated follow-up.
The dev-env is strongly opinionated and uses nix [0] to manage cross-platform, polyglot dependencies. There's other great work in our ecosystem, e.g. [1], and this early push tries to be consistent with that.
Updates the relevant first-run docs. Much more work should be done on the developer-focused content in the guide overall, including an overhaul of discussing RPC endpoints and web-relevant resources, but those changes can land in the future. This PR aims to establish a basis for a sane, supported dev-env, providing a pleasant first-run experience for newcomers (and existing devs too).
[0] https://nixos.org
[1] https://github.com/informalsystems/cosmos.nix
Here's an example of what the
just dev
command looks like:Issue ticket number and link
No issue, but this PR builds on the excellent foundation by @cratelyn in #3574.
Checklist before requesting a review
If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:
Testing and review
In order to review these changes, one should check out this feature branch, build the dev docs in
docs/guide/
, and view them locally, then follow the instructions at http://127.0.0.1:3000/dev/dev-env.html. Pay attention to what's confusing, what's unpleasant, and write those thoughts down as part of the review.Then proceed to http://127.0.0.1:3000/dev/devnet-quickstart.html and run
just dev
as recommended. Does anything break? Does it work as advertised? Is anything unclear? Try runningctrl+c
to stop the setup, and thenjust dev
to resume it. Does it come back up OK? Is that a sane behavior?