Skip to content

docs: view reset procedure guide#1086

Merged
MicBun merged 4 commits into
mainfrom
resetGuideGenesis
Jul 23, 2025
Merged

docs: view reset procedure guide#1086
MicBun merged 4 commits into
mainfrom
resetGuideGenesis

Conversation

@MicBun
Copy link
Copy Markdown
Contributor

@MicBun MicBun commented Jul 22, 2025

Description

Related Problem

resolves: https://github.com/trufnetwork/truf-network/issues/802

How Has This Been Tested?

Let me try after network is up

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive "Resetting Your Node Instance" section to the node operator guide, detailing when and how to safely reset a node while preserving identity and configuration.
    • Enhanced the "Clean Removal" section with clarifications about configuration directory removal and node identity regeneration.
    • Expanded the "Breaking Changes & Migrations" section in the upgrade guide to include detailed network fork recovery instructions and references to relevant procedures.

@MicBun MicBun requested a review from outerlook July 22, 2025 14:31
@MicBun MicBun self-assigned this Jul 22, 2025
@MicBun MicBun added the type: docs Improvements or additions to documentation label Jul 22, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 22, 2025

Walkthrough

A new section on resetting node instances was added to the node operator guide, detailing when and how to perform a reset while preserving node identity and configuration. The node upgrade guide’s migration section was expanded with concrete instructions for handling network forks, referencing the new reset procedure and clarifying recovery steps.

Changes

File(s) Change Summary
docs/node-operator-guide.md Added comprehensive "Resetting Your Node Instance" section; clarified "Clean Removal" instructions; fixed kwild binary installation permissions.
docs/node-upgrade-guide.md Expanded "Breaking Changes & Migrations" with detailed fork recovery steps and migration guidance.

Estimated code review effort

1 (~5 minutes)

Poem

In the warren of docs, new wisdom appears,
Resetting your node now quells all your fears.
With guides for the forks and migrations anew,
Your blockchain will sync, your troubles are few.
🐇✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@holdex
Copy link
Copy Markdown

holdex Bot commented Jul 22, 2025

Time Submission Status

Member Status Time Action Last Update
MicBun ✅ Submitted 5h Update time Jul 23, 2025, 4:52 AM
@outerlook ❌ Missing - ⚠️ Submit time -

@MicBun MicBun force-pushed the resetGuideGenesis branch from c8fedb2 to bfd786e Compare July 22, 2025 15:27
@MicBun MicBun marked this pull request as ready for review July 22, 2025 17:34
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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 (1)
docs/node-upgrade-guide.md (1)

110-123: markdownlint ⌗MD004 – use consistent unordered-list marker
The rest of the document uses * but this block switches to -. Fixing keeps the linter green.

-**Prerequisites:**
-- Check official announcements for specific migration instructions
-- Ensure you have the latest `truf-node-operator` repository (`git pull`)
+**Prerequisites:**
+* Check official announcements for specific migration instructions
+* Ensure you have the latest `truf-node-operator` repository (`git pull`)-**What's Preserved During Network Forks:**
-- Node identity (nodekey) and validator status
-- All custom configuration settings
-- Chain ID continuity
-- Historical data up to the fork point
+**What's Preserved During Network Forks:**
+* Node identity (nodekey) and validator status
+* All custom configuration settings
+* Chain ID continuity
+* Historical data up to the fork point
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1b72a2 and e3bf522.

📒 Files selected for processing (2)
  • docs/node-operator-guide.md (3 hunks)
  • docs/node-upgrade-guide.md (1 hunks)
🪛 markdownlint-cli2 (0.17.2)
docs/node-upgrade-guide.md

111-111: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


112-112: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


119-119: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


120-120: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


121-121: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


122-122: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)

🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/node-upgrade-guide.md

111-111: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


112-112: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


119-119: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


120-120: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


121-121: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


122-122: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: acceptance-test
🔇 Additional comments (1)
docs/node-operator-guide.md (1)

781-789: Consider also backing up validator signing keys
The procedure states that validator status is preserved, yet only nodekey.json is backed up. If the validator signing key (priv_validator_key.json or similar) resides elsewhere, the node may lose signing capability. Add a note (or command) to back this up where applicable.

Comment thread docs/node-operator-guide.md
Comment thread docs/node-operator-guide.md
outerlook
outerlook previously approved these changes Jul 22, 2025
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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)
docs/node-operator-guide.md (1)

805-815: Make the backup directory timestamped & reuse a variable
Using the same literal path (backup-reset) on every reset silently overwrites any previous backup and loses history. A one-liner variable also sidesteps the classic “date evaluated twice” issue flagged in earlier reviews.

-# Create backup directory
-mkdir -p ~/truf-node-operator/backup-reset
-
-# Backup nodekey to preserve node identity
-cp ~/truf-node-operator/my-node-config/nodekey.json ~/truf-node-operator/backup-reset/
-
-# Backup config.toml if you want to preserve custom settings (optional)
-cp ~/truf-node-operator/my-node-config/config.toml ~/truf-node-operator/backup-reset/
+# Create a timestamped backup directory and reuse it consistently
+BACKUP_DIR=~/truf-node-operator/backup.$(date +%Y%m%d_%H%M%S)
+mkdir -p "$BACKUP_DIR"
+
+# Backup nodekey to preserve node identity
+cp ~/truf-node-operator/my-node-config/nodekey.json "$BACKUP_DIR"/
+
+# Backup config.toml if it exists (optional)
+[ -f ~/truf-node-operator/my-node-config/config.toml ] && \
+  cp ~/truf-node-operator/my-node-config/config.toml "$BACKUP_DIR"/
🧹 Nitpick comments (1)
docs/node-operator-guide.md (1)

845-858: Path inconsistency: ~/node likely wrong for most operators
Earlier sections clone the code into ~/trufnetwork/node (or simply ~/node relative to the working dir at that moment). Hard-coding cd ~/node breaks for anyone who followed the default cloning steps from a different directory.

- cd ~/node # assuming you cloned the node repository here, please adjust if different
+ cd ~/trufnetwork/node   # adjust if you placed the repository elsewhere

Alternatively, reference the same $KWILD_SRC variable or absolute path used in the build-from-source instructions to stay DRY.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf44c2b and 900c3fd.

📒 Files selected for processing (1)
  • docs/node-operator-guide.md (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: acceptance-test
  • GitHub Check: lint
🔇 Additional comments (1)
docs/node-operator-guide.md (1)

164-167: chmod +x addition is spot-on
Explicitly marking the binary executable prevents the “permission denied” surprise on fresh installs.

@MicBun
Copy link
Copy Markdown
Contributor Author

MicBun commented Jul 23, 2025

merged immediately so it can be shared

@MicBun MicBun merged commit 1d48fce into main Jul 23, 2025
4 of 6 checks passed
@MicBun MicBun deleted the resetGuideGenesis branch July 23, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants