Skip to content

Conversation

@vertex451
Copy link
Contributor

@vertex451 vertex451 commented Jan 5, 2026

Description

./_build/single-node.sh is not working due to cli changes.
I fixed that script and improved it a bit.

Testing

./_build/single-node.sh local-chain akash1qc9lqysqhfn3q83kvmg3z4vryqxlfjrwa8v4r4

Blocks are produced and I I can query the node:

curl http://localhost:1317/akash/deployment/v1beta4/deployments/info?id.owner=akash1shfh458gyy8xnu6va9qdfferwxvge6r7r60enr&id.dseq=99999

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • (n/a) provided a link to the relevant issue or specification
  • (n/a) included the necessary unit and integration tests
  • (n/a) added a changelog entry to CHANGELOG.md
  • (n/a) included comments for documenting Go code
  • (n/a) updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Walkthrough

The _build/single-node.sh script replaces the legacy init flow with a genesis-based workflow (akash genesis init, akash genesis add-account, akash genesis gentx, akash genesis collect), adds a cleanup step, raises initial tokens to 100,000,000,000uakt, and updates config edits (backup-enabled sed), ports, timeouts, and indexing.

Changes

Cohort / File(s) Summary
Build Script Updates
_build/single-node.sh
Replaces akash init flow with akash genesis init and genesis account/gentx/collect commands; increases initial tokens from 10,000,000,000uakt to 100,000,000,000uakt; adds cleanup of ~/.akash; adds --min-self-delegation="1" to gentx; updates config edits to use backup-capable sed -i.bak (removes backups after edits); sets RPC to bind 0.0.0.0:26657, adjusts timeout_commit/timeout_propose to 1s, enables index_all_keys; preserves pruning and start options.

Sequence Diagram(s)

(omitted — changes are script-level workflow updates without complex multi-component runtime interaction warranting a sequence diagram)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • chainzero

Poem

🐰 I hopped through scripts at break of dawn,
Swapped init for genesis, cleaned the lawn,
Coins multiplied, a grander stack,
Ports opened wide, timeouts tightened back,
The node now hums — a carrot-powered dawn! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: single node script' directly addresses the main objective of fixing the broken single-node.sh script due to CLI changes, which is the core change in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly explains that the script was broken due to CLI changes and has been fixed and improved, with specific testing verification provided.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch artem/fix/single-node

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vertex451 vertex451 changed the title Artem/fix/single node Fix: single node script Jan 5, 2026
@vertex451 vertex451 changed the title Fix: single node script fix: single node script Jan 5, 2026
@vertex451 vertex451 force-pushed the artem/fix/single-node branch from c9b8492 to f42c99e Compare January 5, 2026 17:38
@vertex451 vertex451 marked this pull request as ready for review January 6, 2026 10:13
@vertex451 vertex451 requested a review from a team as a code owner January 6, 2026 10:13
@vertex451 vertex451 self-assigned this Jan 6, 2026
Copy link

@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: 1

🧹 Nitpick comments (2)
_build/single-node.sh (2)

16-17: Consider making cleanup optional or adding a warning.

The unconditional rm -rf ~/.akash is destructive and removes all previous data without warning. While appropriate for a development script, consider either:

  • Adding a confirmation prompt
  • Making cleanup optional via a flag
  • Adding a clear comment warning users about data loss
🔎 Example: Optional cleanup with flag
+CLEAN=${CLEAN:-false}
+
+if [ "$CLEAN" = "true" ]; then
+  echo "Cleaning up previous data..."
+  rm -rf ~/.akash
+fi
-# Clean up previous data
-rm -rf ~/.akash

Then users can run: CLEAN=true ./_build/single-node.sh <chain-id> <account>


21-21: Consider using a descriptive moniker instead of reusing chain-id.

The command uses $CHAINID for both the moniker (first positional argument) and the --chain-id flag. While functional, monikers are typically human-readable node names (e.g., "local-validator") distinct from the chain identifier.

🔎 Suggested improvement
-akash genesis init "$CHAINID" --chain-id "$CHAINID"
+akash genesis init "local-validator" --chain-id "$CHAINID"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7ae1a52 and f42c99e.

📒 Files selected for processing (1)
  • _build/single-node.sh
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-08T15:59:15.441Z
Learnt from: troian
Repo: akash-network/node PR: 2007
File: make/releasing.mk:43-45
Timestamp: 2025-10-08T15:59:15.441Z
Learning: In make/releasing.mk, the $(AKASH) target is intentionally marked as .PHONY to force a rebuild every time, even though it produces the akash binary file. This is a deliberate design choice by the maintainers.

Applied to files:

  • _build/single-node.sh
🧬 Code graph analysis (1)
_build/single-node.sh (1)
script/upgrades.sh (1)
  • init (317-410)
🔇 Additional comments (5)
_build/single-node.sh (5)

20-20: LGTM!

Increasing the initial token amount to 100 billion is reasonable for a development environment.


23-24: LGTM!

The updated akash genesis add-account commands correctly follow the new CLI structure.


25-25: LGTM!

The updated akash genesis gentx command with --min-self-delegation="1" correctly follows the new CLI structure. The minimal self-delegation is appropriate for a development environment.


26-26: LGTM!

The updated akash genesis collect command correctly follows the new CLI structure.


35-35: LGTM!

The akash start command with --pruning=nothing is appropriate for a development environment.

Copy link

@chainzero chainzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve PR to update all genesis-related commands to use the new akash genesis prefix (init, add-account, collect) required by the updated Akash CLI

@vertex451 vertex451 merged commit 5cd6b27 into main Jan 8, 2026
20 checks passed
@vertex451 vertex451 deleted the artem/fix/single-node branch January 8, 2026 17:13
@vertex451
Copy link
Contributor Author

I merged this PR without Arthurs approve due to not important change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants