feat(gnodev): auto-import the dev key into the local keybase#5680
Draft
davd-gzl wants to merge 5 commits into
Draft
feat(gnodev): auto-import the dev key into the local keybase#5680davd-gzl wants to merge 5 commits into
davd-gzl wants to merge 5 commits into
Conversation
Collaborator
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
On startup, gnodev writes the public DefaultDeployerSeed into the user's gnokey keybase under the name `dev`, so `gnokey ... dev` signs against the chain's preloaded address with no further setup. The import is skipped if the entry already exists (matching or conflicting), if --no-dev-key is passed, or if the home directory is missing or unset. The previous startup banner that dumped the mnemonic to the log is replaced by the import-success line — the seed is now in the keybase, so logging it again is noise. Updates docs/resources/gnodev.md, docs/builders/getting-started.md and docs/cheatsheet.md to match the new behavior and reconcile the in-flight `devtest` rename back to `dev`. See ADR gno.land/adr/prxxxx_gnodev_auto_import_dev_key.md for the naming rationale and the alternatives considered.
bb0b762 to
921f615
Compare
ensureDevKey no longer aborts gnodev startup when the keybase is missing, unwritable, locked, or corrupt: every failure now warns and continues like the other branches, and openKeybase recovers the panic NewKeyBaseFromDir raises on an unwritable home. Skip the import when the deployer address is already in the keybase under any name, so an existing entry (commonly test1) is preserved instead of being silently deleted by the keybase's one-name-per-address rule. Clean both paths in the default-home guard so a path-equivalent -home still counts. Add tests for the address-under-another-name, broken-keybase, unwritable-home, and cannot-create-default-home paths. Update the ADR and docs to the real behavior, fix the gnokey export note, refresh the stale minisocial banner, and normalize the flag to -no-dev-key.
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.
On startup,
gnodevwrites the well-known deployer mnemonic into~/.gnokeyunder the namedev.gnokey ... devthen signs against the preloaded address with nognokey add -recoverstep. Existing entries are never overwritten; opt out with--no-dev-key.Depends on #5656