Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Test

on:
push:
pull_request:

jobs:
smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run smoke tests
run: make test
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

---

## [Unreleased]

### Changed

- Default Arc testnet version updated to **v0.7.1**.
- Consensus service now binds its P2P listener explicitly on TCP `31001`, matching the documented firewall rule.
- Consensus key handling now uses `priv_validator_key.json`, the key file generated by `arc-node-consensus init`.
- `status` now reports execution peer count, matching the README.
- Management commands now sanitize service state and tolerate missing local RPC cleanly before the node is installed.
- Follow-mode endpoints now use the v0.7.1 CLI format and let Arc derive matching WebSocket URLs.
- Keypair-only VPS sudo handling now fails with root/cloud-init instructions when sudo cannot already elevate, instead of attempting an impossible self-escalation.

### Added

- Lightweight local smoke tests for script syntax, help output, key path, ports, and README code fences.
- GitHub Actions workflow that runs the same smoke test target on pushes and pull requests.

---

## [1.0.0] — 2026-04-15

Initial public release.
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SHELL := /usr/bin/env bash

.PHONY: test check

test:
bash -n setup.sh
bash tests/smoke.sh

check: test
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> Arc is Circle's stablecoin-native Layer-1 blockchain — built for USDC and on-chain finance.

[![Shell](https://img.shields.io/badge/shell-bash-89e051?logo=gnu-bash&logoColor=white)](https://www.gnu.org/software/bash/)
[![Testnet](https://img.shields.io/badge/Arc%20Testnet-v0.6.0-blue)](https://github.com/circlefin/arc-node)
[![Testnet](https://img.shields.io/badge/Arc%20Testnet-v0.7.1-blue)](https://github.com/circlefin/arc-node)
[![Platform](https://img.shields.io/badge/platform-Ubuntu%2022.04%2B%20%7C%20Debian%2012%2B-orange)](https://ubuntu.com/)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

Expand Down Expand Up @@ -79,7 +79,7 @@ Setup takes **20–60 minutes** on a fast machine (dominated by Rust compilation
| **User** | Non-root with `sudo` | — |
| **Init** | systemd | — |

> **RAM note:** The script builds all three crates in parallel, limited to `nproc / 2` jobs to avoid OOM during the Reth link phase. If you have exactly 64 GB of RAM, consider passing `--swap 32G` to add headroom.
> **RAM note:** Each Rust build is limited to `nproc / 2` jobs to avoid OOM during the Reth link phase. If you have exactly 64 GB of RAM, consider passing `--swap 32G` to add headroom.

---

Expand All @@ -88,11 +88,15 @@ Setup takes **20–60 minutes** on a fast machine (dominated by Rust compilation
```bash
# One command to setup
curl -fsSL https://raw.githubusercontent.com/candyburst/arc-node-setup/main/setup.sh | bash -s -- --yes
```

Or equivalently:

```bash
curl -fsSL https://raw.githubusercontent.com/candyburst/arc-node-setup/main/setup.sh | bash -s -- -y
```

```bash
# Download
curl -O https://raw.githubusercontent.com/candyburst/arc-node-setup/main/setup.sh
chmod +x setup.sh
Expand Down Expand Up @@ -121,12 +125,12 @@ chmod +x setup.sh
| `logs cl` | Tail consensus-layer logs |
| `logs both` | Tail both layers simultaneously |
| `update` | Auto-detect latest Arc version and rebuild |
| `update v0.7.0` | Upgrade to a specific version |
| `update v0.7.1` | Upgrade to a specific version |
| `restart` | Restart both services (safe tear-down order) |
| `stop` | Stop both services |
| `start` | Start both services |
| `uninstall` | Guided removal of services, binaries, and data |
| `rollback-sudo` | Remove the passwordless sudo drop-in written during setup |
| `rollback-sudo` | Remove a passwordless sudo drop-in for this user |
| `help` | Show usage help |

---
Expand All @@ -142,7 +146,7 @@ All options apply to the `setup` command:
| `--expose-rpc` | Bind JSON-RPC on `0.0.0.0` — needed for MetaMask over LAN/WAN |
| `--with-firewall` | Auto-configure `ufw` firewall rules |
| `--swap SIZE` | Create a swap file, e.g. `--swap 16G` |
| `--version VER` | Install a specific Arc version, e.g. `--version v0.7.0` |
| `--version VER` | Install a specific Arc version, e.g. `--version v0.7.1` |
| `-h`, `--help` | Show help |

**Examples:**
Expand All @@ -152,7 +156,7 @@ All options apply to the `setup` command:
./setup.sh setup --yes # Fully unattended / CI
./setup.sh setup --expose-rpc --with-firewall # Open to LAN + configure firewall
./setup.sh setup --swap 32G --yes # Add 32 GB swap, no prompts
./setup.sh setup --version v0.7.0 # Install a specific version
./setup.sh setup --version v0.7.1 # Install a specific version
```

---
Expand Down Expand Up @@ -217,7 +221,7 @@ The free disk space is checked before downloading. Snapshot download is given a
Runs `arc-node-consensus init` to generate your node's **P2P identity key** at:

```
~/.arc/consensus/config/node_key.json
~/.arc/consensus/config/priv_validator_key.json
```

This is a one-time operation. The key is automatically backed up to `~/.arc-key-backup/` with a timestamp. **Keep this backup — losing it means a new P2P identity.**
Expand Down Expand Up @@ -305,7 +309,7 @@ Uses `journalctl -f` under the hood. Press `Ctrl+C` to stop.

```bash
./setup.sh update # Auto-detect latest version from GitHub
./setup.sh update v0.7.0 # Upgrade to a specific version
./setup.sh update v0.7.1 # Upgrade to a specific version
```

The update process:
Expand Down Expand Up @@ -347,7 +351,7 @@ The key backup at `~/.arc-key-backup/` is intentionally kept.
./setup.sh rollback-sudo
```

Removes `/etc/sudoers.d/<USER>-nopasswd` if it was written during setup on a keypair-only VPS. Safe to run even if the file does not exist.
Removes `/etc/sudoers.d/<USER>-nopasswd` if you created it for a keypair-only VPS. Safe to run even if the file does not exist.

---

Expand Down Expand Up @@ -405,8 +409,8 @@ Skips the snapshot download entirely. The node will sync from genesis block 0, w
### Pin a Specific Arc Version

```bash
./setup.sh setup --version v0.6.0
./setup.sh setup --version v0.7.0 --yes
./setup.sh setup --version v0.7.1
./setup.sh setup --version v0.6.0 --yes
```

Version strings must match `v<MAJOR>.<MINOR>.<PATCH>` exactly. The tag must exist in `circlefin/arc-node`.
Expand All @@ -423,9 +427,9 @@ Skips all yes/no prompts. Danger prompts (uninstall, irreversible data deletion)

## Keypair VPS — Passwordless Sudo

Many cloud VPS providers (AWS, GCP, Azure, DigitalOcean) use SSH key authentication with no password set on the account. In this case `sudo` cannot be used non-interactively, which would block automated setup steps.
Many cloud VPS providers (AWS, GCP, Azure, DigitalOcean) use SSH key authentication with no password set on the account. If the image already grants passwordless sudo, setup proceeds normally. If sudo prompts for a password but the account has no password, setup cannot elevate itself.

The script detects this by inspecting the shadow password field. If the account has no password (`!`, `!!`, or `*`), it offers to write:
The script detects this by inspecting the shadow password field. If the account has no password (`!`, `!!`, or `*`) and sudo is not already usable, it prints the sudoers drop-in to create from your provider console, cloud-init, or another root/admin session:

```
/etc/sudoers.d/<USER>-nopasswd
Expand All @@ -438,7 +442,7 @@ Defaults:<USER> !use_pty
Defaults:<USER> !authenticate
```

This is validated with `visudo -c` before installation. **After setup is complete, remove it:**
Validate the temporary file with `visudo -c` before installing it. **After setup is complete, remove it:**

```bash
./setup.sh rollback-sudo
Expand Down Expand Up @@ -470,9 +474,9 @@ After a successful install:
│ ├── execution/ ← Reth execution-layer data (~120 GB with snapshots)
│ └── consensus/
│ └── config/
│ └── node_key.json ← Your P2P identity key
│ └── priv_validator_key.json ← Your P2P identity key
└── .arc-key-backup/
└── node_key_<timestamp>.json ← Timestamped key backup (keep safe!)
└── priv_validator_key_<timestamp>.json ← Timestamped key backup (keep safe!)

/usr/local/bin/
├── arc-node-execution ← EL binary
Expand Down Expand Up @@ -567,7 +571,7 @@ Any chain, any token — every bit is appreciated! ☕

---

> Arc Network is on public testnet. The network may experience instability, resets, or breaking changes. Always back up your `node_key.json`.
> Arc Network is on public testnet. The network may experience instability, resets, or breaking changes. Always back up your `priv_validator_key.json`.

---

Expand Down
Loading
Loading