-
Notifications
You must be signed in to change notification settings - Fork 62
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
Update validator setup instructions for v27 / SDK 0.50 #547
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Warning Rate limit exceeded@CryptoFewka has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 4 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request updates the setup instructions for a ZetaChain Mainnet node. Key changes include enforcing the use of a dedicated non-root user ( Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
src/pages/nodes/start-here/setup.mdx (3)
16-17
: Consider more restrictive file permissions for the binary.While
chmod a+x
works, it's more secure to use specific permissions for owner and group.-sudo chmod a+x /usr/local/bin/zetacored +sudo chown root:zetachain /usr/local/bin/zetacored &&\ +sudo chmod 750 /usr/local/bin/zetacored
173-196
: Add memory limits to the systemd service.To prevent OOM issues, add memory limits to the service configuration.
LimitNOFILE=262144 +MemoryMax=16G +MemorySwapMax=0
225-225
: Fix typographical error in upgrade instructions.Remove the duplicate word "the".
-The upgrade name is **not** the the release name on github. +The upgrade name is **not** the release name on github.🧰 Tools
🪛 LanguageTool
[duplication] ~225-~225: Possible typo: you repeated a word.
Context: ...rade name. The upgrade name is not the the release name on github. Reference the [...(ENGLISH_WORD_REPEAT_RULE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/nodes/start-here/setup.mdx
(7 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/nodes/start-here/setup.mdx
[duplication] ~225-~225: Possible typo: you repeated a word.
Context: ...rade name. The upgrade name is not the the release name on github. Reference the [...
(ENGLISH_WORD_REPEAT_RULE)
[typographical] ~241-~241: It appears that a comma is missing.
Context: ...binary ### Monitoring In a production environment we recommend monitoring the node resour...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~246-~246: A comma might be missing here.
Context: ... Systemd service using the instructions above you can view logs with `journalctl -eu ...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: Analyze (javascript)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see anything related to v0.50.x ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (6)
src/pages/nodes/start-here/syncing.mdx (1)
19-36
: New Full Node Snapshot Download Instructions.
The newly added section “## Download the latest full node snapshot” is comprehensive. It clearly outlines the installation of prerequisites (like lz4), fetching the snapshot JSON, extracting the download link and filename, and then downloading/extracting the snapshot with the appropriate user privileges. For improved robustness, you might consider adding error handling or checks (e.g. verifying the curl command’s success) if this set of commands is to be used in automated scripts.src/pages/nodes/validate/validator.mdx (1)
102-107
: Validator Creation Transaction Instructions.
The detailed steps to create and execute the validator creation transaction are clear and actionable. It is a good idea to advise users to check the transaction output for any errors post‑execution.src/pages/nodes/start-here/setup.mdx (4)
155-159
: Installing the Currentzetacored
Binary for Cosmovisor.
Copying the currentzetacored
binary into the cosmovisor genesis bin directory is clearly explained. It would be beneficial to also add an integrity check step if feasible.
223-226
: Upgrade Readiness Instructions and Directory Nomenclature.
The section advising users on preparing for upgrades is very useful. However, note that there is a duplicated article (“the the”) in the sentence “The upgrade name is not the the release name on github.”
[tip]
Apply the following diff to correct the typo:- The upgrade name is **not** the the release name on github. + The upgrade name is **not** the release name on github.🧰 Tools
🪛 LanguageTool
[duplication] ~225-~225: Possible typo: you repeated a word.
Context: ...rade name. The upgrade name is not the the release name on github. Reference the [...(ENGLISH_WORD_REPEAT_RULE)
241-241
: Punctuation Improvement in Monitoring Section.
A comma after “Disk usage” may enhance readability in the sentence describing monitored resources.
[minor]🧰 Tools
🪛 LanguageTool
[typographical] ~241-~241: It appears that a comma is missing.
Context: ...binary ### Monitoring In a production environment we recommend monitoring the node resour...(DURING_THAT_TIME_COMMA)
246-246
: Punctuation Suggestion for Log Viewing Instructions.
Consider adding a comma in the sentence “If you installedzetacored
as a Systemd service using the instructions above you can view logs withjournalctl -eu zetacored
” to improve clarity (e.g. after “above”).
[minor]🧰 Tools
🪛 LanguageTool
[uncategorized] ~246-~246: Possible missing comma found.
Context: ... Systemd service using the instructions above you can view logs with `journalctl -eu ...(AI_HYDRA_LEO_MISSING_COMMA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/pages/nodes/start-here/setup.mdx
(7 hunks)src/pages/nodes/start-here/syncing.mdx
(3 hunks)src/pages/nodes/validate/validator.mdx
(4 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/nodes/validate/validator.mdx
[uncategorized] ~140-~140: Possible missing comma found.
Context: ...alidators by voting power. As of early Q1 2025, this requires a minimum of 700 ZE...
(AI_HYDRA_LEO_MISSING_COMMA)
src/pages/nodes/start-here/setup.mdx
[duplication] ~225-~225: Possible typo: you repeated a word.
Context: ...rade name. The upgrade name is not the the release name on github. Reference the [...
(ENGLISH_WORD_REPEAT_RULE)
[typographical] ~241-~241: It appears that a comma is missing.
Context: ...binary ### Monitoring In a production environment we recommend monitoring the node resour...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~246-~246: Possible missing comma found.
Context: ... Systemd service using the instructions above you can view logs with `journalctl -eu ...
(AI_HYDRA_LEO_MISSING_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (17)
src/pages/nodes/start-here/syncing.mdx (3)
14-14
: Clarified Snapshot Method Description.
The revised sentence now reads “This option downloads a data directory backed up from an existing node,” which is succinct and clear regarding what the snapshot method achieves.
17-18
: Updated Snapshot Extraction Directory.
Changing the extraction location from a tilde‑based path to the explicit/home/zetachain/.zetacored
directory ensures users operate within the correct non‑root environment.
113-123
: Refined Query Node Status Section.
The updated “Query Node Status” instructions now clearly direct users to check the sync status (with emphasis oncatching_up
,latest_block_height
, andlatest_block_time
). This concise guidance aids operators in confirming node synchronization.src/pages/nodes/validate/validator.mdx (5)
20-24
: Enforce Non‑Root Operation for Validator Setup.
The added instruction—telling users to run the guide as the account under which the validator will run (with thesudo su -l zetachain
command)—is an important security and operational enhancement.
59-61
: Mainnet Validator Creation Context.
The clarification that the validator example applies to Zetachain Mainnet and the reminder to save the transaction hash are helpful additions that ensure users know exactly what to expect.
63-78
: Introducing the~/validator.json
Template.
Providing a JSON template for validator creation makes the process both more organized and user‑friendly. Ensure that all example values (such as the pubkey and amount) are clearly recognized as placeholders. This approach improves clarity and repeatability.
99-100
: Critical Reminder to Update the Validator’s Pubkey.
Requiring users to replace the validator’s pubkey in the JSON file with the output fromzetacored tendermint show-validator
is crucial for a successful validator setup.
137-145
: Updated Delegation Requirements and Validator Ranking Note.
The modification to the delegation command—now requiring a minimum of 2000000 azeta—and the updated note regarding the minimum of 700 ZETA to rank in the top 100 validators align with current network requirements. It would be worthwhile to confirm that these values are current with network parameters.🧰 Tools
🪛 LanguageTool
[uncategorized] ~137-~137: Possible missing comma found.
Context: ... To delegate additional tokens to your validator use the following command. Adjust the a...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~138-~138: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...r use the following command. Adjust the amount of tokens accordingly to reach the mini...(AMOUNTOF_TO_NUMBEROF)
[uncategorized] ~140-~140: Possible missing comma found.
Context: ...alidators by voting power. As of early Q1 2025, this requires a minimum of 700 ZE...(AI_HYDRA_LEO_MISSING_COMMA)
src/pages/nodes/start-here/setup.mdx (9)
16-18
: Node Binary Installation Commands.
The commands to download thezetacored
binary and set its executable permissions are straightforward and correct. These steps clearly instruct the user on installing the node binary.
29-36
: New Non‑Root User Account Section.
Introducing the “## Create Non-Root User Account” section with guidance to run the binary as a non‑root user (usingsudo useradd -m -s /bin/bash zetachain
) significantly enhances system security.
46-46
: Data Directory Initialization Command Updated.
The initialization command executed withsudo -u zetachain
properly reflects the transition to a non‑root operational environment.
63-67
: Fetching Config Files with Non‑Root Permissions.
The updated wget commands usesudo -u zetachain
to fetch configuration files into the correct directory. For additional security, consider implementing checksum verification to ensure file integrity; this was previously suggested in similar updates.
127-129
: Cosmovisor Installation from Source – Version Pinned.
Changing the cosmovisor installation command to use versionv1.7.1
(as ingo install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
) is a positive move for reproducible builds.
138-142
: Precompiled Binary Instructions for Cosmovisor Updated.
The instructions to download, extract, and install the precompiled cosmovisor binary for versionv1.7.1
are clear and consistent with the source installation method.
149-151
: Cosmovisor Directory Creation.
Setting up the required cosmovisor directories usingsudo -u zetachain mkdir -p
ensures that the directories have the proper ownership and permissions. This adheres to the overall non‑root strategy.
161-198
: Systemd Unit File Configuration forzetacored
.
The comprehensive systemd service configuration, including environment variables, working directory, restart policies, and user specification (User=zetachain
), ensures that the node runs reliably under cosmovisor. The heredoc technique used for file creation is elegant and clear.
208-212
: Reloading and Enabling the Systemd Service.
The instructions to runsudo systemctl daemon-reload
andsudo systemctl enable zetacored
are concise and sufficiently instruct the user to enable the service after configuration changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for double word the the
Probably is a good idea to mention which files are really important for a validator like data/priv_validator_state.json? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
src/pages/nodes/start-here/setup.mdx (1)
63-66
: 🛠️ Refactor suggestionConfiguration Files Fetch – Integrity Verification
The commands efficiently download the configuration files into the proper directory. For enhanced security, consider adding checksum verification for these files (as previously suggested). For example:sudo -u zetachain wget https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/genesis.json -O /home/zetachain/.zetacored/config/genesis.json &&\ -sudo -u zetachain wget https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/client.toml -O /home/zetachain/.zetacored/config/client.toml &&\ +sudo -u zetachain wget https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/client.toml -O /home/zetachain/.zetacored/config/client.toml &&\ +sudo -u zetachain wget https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/genesis.json.sha256 -O /home/zetachain/.zetacored/config/genesis.json.sha256 &&\ +cd /home/zetachain/.zetacored/config && sha256sum -c genesis.json.sha256 &&\This suggestion mirrors prior feedback.
🧹 Nitpick comments (4)
src/pages/nodes/start-here/setup.mdx (4)
16-18
: Confirm Placeholder and Permission Setup
The command downloads the node binary and sets the executable permission correctly. However, the placeholderVERSION
must be clearly highlighted in the documentation for users to replace with the actual release version.
29-36
: Create Non-Root User Section – Security & Idempotency
The new “Create Non-Root User Account” section is well integrated and improves security by avoiding root execution. Consider adding a note about checking if the user already exists to prevent duplicate user creation errors.
172-198
: Systemd Service File Configuration
The unit file is structured well with clear environment variable definitions, user specification, and resource limits. This configuration should correctly manage the cosmovisor-managed service. Consider evaluating if additional logging or error-handling options might further enhance robustness.
240-242
: Typographical Improvement in Monitoring Section
The list of node resource metrics would benefit from a minor punctuation fix for enhanced readability. Consider inserting a comma after “Disk usage” as shown below:- CPU load, Memory Usage, Disk usage and Disk IO + CPU load, Memory Usage, Disk usage, and Disk IOThis change improves the clarity of the monitoring instructions.
🧰 Tools
🪛 LanguageTool
[typographical] ~241-~241: It appears that a comma is missing.
Context: ...binary ### Monitoring In a production environment we recommend monitoring the node resour...(DURING_THAT_TIME_COMMA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/nodes/start-here/setup.mdx
(7 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/nodes/start-here/setup.mdx
[typographical] ~241-~241: It appears that a comma is missing.
Context: ...binary ### Monitoring In a production environment we recommend monitoring the node resour...
(DURING_THAT_TIME_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (12)
src/pages/nodes/start-here/setup.mdx (12)
46-47
: Node Initialization Command
Running the initialization as the non-root user withsudo -u zetachain
is correct, and the use of theMONIKER
placeholder is clearly explained below.
127-129
: Cosmovisor Installation from Source
The updatedgo install
command correctly pins cosmovisor to versionv1.7.1
, ensuring reproducible builds.
133-142
: Precompiled Cosmovisor Binary Instructions
The precompiled binary download instructions are consistent with the version used in the source installation. The steps are clear and correctly reference cosmovisorv1.7.1
.
149-151
: Cosmovisor Directories Setup
Usingsudo -u zetachain
to create the necessary directories under the non-root user’s home directory is a good practice and is correctly implemented.
155-159
: Installing the Currentzetacored
Binary for Cosmovisor
Copying the binary from/usr/local/bin
to the cosmovisor genesis directory is accurate. Ensure that prior steps have successfully installed the binary before copying.
167-168
: Systemd Unit Directory Creation
The command to create/usr/local/lib/systemd/system/
is correct and necessary for the subsequent systemd service setup.
208-212
: Reloading and Enabling the Systemd Service
The instructions to reload the systemd daemon and enable the service are clear. The expected symlink message is helpful for verification.
213-214
: Next Steps Header Introduction
The “Next Steps” section is clearly delineated, smoothly transitioning the reader to subsequent operations after setup.
223-226
: Upgrade Readiness Instructions
The provided upgrade instructions are comprehensive and set the stage for managing future binary updates through cosmovisor.
230-232
: Upgrade Binary Table Clarity
The table detailing upgrade names, paths, and tags aids in clarity and reinforces best practices for upgrade readiness.
245-246
: Viewing Service Logs
The instruction to view logs withjournalctl -eu zetacored
is accurate and ensures users can effectively troubleshoot service issues.
250-252
: Prometheus Metrics Configuration
The documentation clearly indicates that Prometheus is enabled by default on port 26660, and it provides a useful reference for further details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/pages/nodes/start-here/setup.mdx (4)
29-36
: Introduce Non-Root User Creation SectionThe new section for creating a non-root user (
zetachain
) enhances security and follows best practices. Optionally, consider mentioning a check to see if the user already exists to avoid duplicate account creation.
63-66
: Fetching Configuration Files with Security ConsiderationsThe commands correctly download the essential configuration files into the proper directory. For enhanced security, consider adding a quick note or link on checksum verification of these files. Additionally, if applicable, it might be beneficial to call out critical files for validator operation (such as
data/priv_validator_state.json
) so users know not to overlook them.
133-142
: Precompiled Cosmovisor Binary InstructionsThe instructions for downloading and installing the precompiled cosmovisor binary are correct and reflect the updated version and platform (linux-amd64). For additional security, consider suggesting a checksum verification step to confirm file integrity.
240-252
: Metrics and Monitoring Details with Minor Punctuation AdjustmentsThe section on Prometheus metrics and node monitoring is clear and informative. However, as indicated by static analysis, consider inserting a comma in the metrics description for improved clarity. For example:
-Prometheus is enabled by default to serve metrics on port **26660** which can be consumed by Prometheus collector(s)... +Prometheus is enabled by default to serve metrics on port **26660**, which can be consumed by Prometheus collector(s)...Similarly, review the log monitoring phrasing for consistent punctuation.
🧰 Tools
🪛 LanguageTool
[typographical] ~241-~241: It appears that a comma is missing.
Context: ...binary ### Monitoring In a production environment we recommend monitoring the node resour...(DURING_THAT_TIME_COMMA)
[uncategorized] ~246-~246: Possible missing comma found.
Context: ... Systemd service using the instructions above you can view logs with `journalctl -eu ...(AI_HYDRA_LEO_MISSING_COMMA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/nodes/start-here/setup.mdx
(8 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/nodes/start-here/setup.mdx
[typographical] ~241-~241: It appears that a comma is missing.
Context: ...binary ### Monitoring In a production environment we recommend monitoring the node resour...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~246-~246: Possible missing comma found.
Context: ... Systemd service using the instructions above you can view logs with `journalctl -eu ...
(AI_HYDRA_LEO_MISSING_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: Analyze (javascript)
🔇 Additional comments (9)
src/pages/nodes/start-here/setup.mdx (9)
3-3
: Update Node Description for Mainnet BetaThe updated description now clearly identifies this as a "Mainnet Beta" node guide. Ensure that the "Beta" terminology is reflected consistently throughout the documentation if it reflects a temporary or transitional phase.
16-17
: Clarify Binary Download CommandThe commands for downloading the binary and setting executable permissions are correct. A reminder to replace the
VERSION
placeholder with the actual version number will help prevent user errors.
46-46
: Node Initialization CommandRunning the node initialization command as the
zetachain
user is appropriate. Ensure that users replace theMONIKER
placeholder with their chosen node name. You could also note that the--home
flag is available if a custom data directory is needed.
127-129
: Updated Cosmovisor Installation (From Source)The updated installation command for cosmovisor now uses version
v1.7.1
and is properly pinned, which improves reproducibility.
149-151
: Cosmovisor Directory CreationCreating the necessary cosmovisor directories under
/home/zetachain/.zetacored
is clearly explained. It might be helpful to mention that if these directories already exist, users can skip this step.
155-159
: Installing the zetacored Binary into Cosmovisor DirectoryCopying the current
zetacored
binary into the cosmovisor genesis directory ensures proper management during upgrades. It may be useful to remind users to verify that file permissions remain correct after the copy operation.
161-198
: Configuring the zetacored Systemd ServiceThe new systemd unit file is comprehensive and sets the necessary environment variables and paths for running
zetacored
under cosmovisor as thezetachain
user. The structure is clear and production-ready. Consider, as an optional enhancement, adding a note about monitoring service status or log rotation.
208-212
: Reloading and Enabling the Systemd ServiceThe instructions to reload the systemd daemon and enable the
zetacored
service are straightforward and include information about the expected output. This addition will help users verify that the service has been correctly set up.
214-232
: Upgrade Readiness and Version ManagementThe "Next Steps" section—including the upgrade readiness guidelines and the upgrade path table—is well structured. It delivers clear guidance on the process for future upgrade steps, ensuring that users understand where to place new binaries. Just verify that the upgrade naming conventions remain consistent across all documentation.
Summary by CodeRabbit
cosmovisor
to the latest version and adjusted service configuration details.