feat(govdao-scripts): normalize v2 scripts + add v3/namereg/valoper-register#5658
Merged
Merged
Conversation
…0 guard
Backports improvements from the v3 test-13 scripts to the shared v2
scripts (and applies them to the rest of the shared set):
- Replace inline Environment blocks with single-line "see README.md."
pointer. Required env vars are already validated at the top of each
script via ${VAR:?...}; the README is the single source of truth.
- Align echo formatting (Key: / Chain: / Remote:) so per-deployment
output reads cleanly.
- add-validator.sh: add Power=0 input guard mirroring add-validator-v3.
Tendermint treats Power=0 as a remove, which would silently turn the
add into a remove if a user passes 0 by mistake. Catch it explicitly
and point them at rm-validator.sh.
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
|
Four new shared scripts that complement the v2 set: - add-validator-v3.sh / rm-validator-v3.sh: route through r/sys/validators/v3 (operator-keyed, post-VALOPLAN2). Use them on chains running v3; v2 add-validator/rm-validator stay canonical for chains still on v2 (gnoland1 pre-hardfork). - register-user.sh: r/sys/users.ProposeRegisterUser govDAO proposal that grants a custom username for an address (bypasses the controller whitelist; canonical-collision warning auto-injected). - register-valoper.sh: NOT govDAO-signed — operator self-registration via r/gnops/valopers.Register. The runtime squat guard enforces caller == operator address, so the operator's local key signs. Prerequisite for add-validator-v3. README.md updated to list the 4 new commands with a note clarifying v2 vs v3 picking by chain.
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.
Two batches of changes to
misc/govdao-scripts/, extracted from the test-13 hardfork stack (#5653) so they can land independently and shrink that PR's diff against master.h/t @aeddi
1. Normalize existing v2 scripts
# Environment: see README.md.Each script already validates its required env vars at the top via${VAR:?...}; the README is the single source of truth. Removes ~5 lines of duplication per script.Key:/Chain:/Remote:) so per-deployment output reads cleanly across all scripts.add-validator.sh: add Power=0 input guard. Tendermint treatsPower=0as a remove operation, so an operator running./govdao add-validator ADDR PUBKEY 0by mistake would silently remove the validator instead of adding it. The guard catches the input early and points atrm-validator.sh.2. Add 4 new shared scripts
add-validator-v3.sh/rm-validator-v3.sh— route throughr/sys/validators/v3(operator-keyed, post-VALOPLAN2). Use them on chains running v3 (test-13 onward). The v2 unsuffixed scripts stay canonical for gnoland1 pre-hardfork.register-user.sh—r/sys/users.ProposeRegisterUsergovDAO proposal granting a custom username for an address (bypasses the controller whitelist; canonical-collision warning auto-injected into the proposal description if relevant).register-valoper.sh— NOT govDAO-signed — operator self-registration viar/gnops/valopers.Register. The runtime squat guard enforcescaller == operator address, so this is signed by the operator's local key, not T1. Prerequisite foradd-validator-v3.sh.README updated with the 4 new entries and a v2-vs-v3 picking note.
Test plan
./govdaofrommisc/deployments/gnoland1/lists all commands../govdao add-validator(no args) shows usage../govdao add-validator ADDR PUBKEY 0errors with the new message.