Skip to content

feat: pip install rustchainnode — installable RustChain attestation node#641

Merged
Scottcjn merged 2 commits intoScottcjn:mainfrom
noxxxxybot-sketch:pip-install-rustchainnode
Mar 7, 2026
Merged

feat: pip install rustchainnode — installable RustChain attestation node#641
Scottcjn merged 2 commits intoScottcjn:mainfrom
noxxxxybot-sketch:pip-install-rustchainnode

Conversation

@noxxxxybot-sketch
Copy link
Copy Markdown
Contributor

pip install rustchainnode

Implements bounty #757.

Quick Start

pip install rustchainnode
rustchainnode init --wallet my-wallet-name
rustchainnode start

Milestones

Milestone Status Expected RTC
PyPI package — pip install rustchainnode installs and runs 50 RTC
CLI: init, start, stop, status, config included
Auto-configuration — detects hardware, sets optimal thread count +10 RTC
Systemd/launchd service generation — rustchainnode install-service +15 RTC
Health dashboard — rustchainnode dashboard shows TUI with epoch, miners, balance +15 RTC
Cross-platform — Linux x86_64, aarch64, ppc64, macOS x86/ARM64 +10 RTC

Total expected: 100 RTC

Files (in rustchainnode/ directory)

  • rustchainnode/__init__.py — package init, exports RustChainNode
  • rustchainnode/cli.py — CLI entry point (argparse, 7 commands)
  • rustchainnode/hardware.py — CPU arch detection + antiquity multipliers
  • rustchainnode/node.pyRustChainNode programmatic API class
  • pyproject.toml — PEP 517 build config, rustchainnode console script
  • README.md — full documentation

CLI Demonstration

$ rustchainnode init --wallet nox-ventures
🦀 RustChain Node — Initializing...
  Detected: x86_64 (modern_x86) | 8 CPUs
  Antiquity multiplier: 1.0x
  Optimal threads: 8
  ✅ Config saved to ~/.rustchainnode/config.json

$ rustchainnode dashboard
============================================================
  🦀 RustChain Node Dashboard
============================================================
  Wallet:      nox-ventures
  CPU:         x86_64 (modern_x86)
  Threads:     8
  Antiquity:   1.0x
  Node Status: 🟢 ONLINE
  Epoch:       94
  Slot:        13580
============================================================

$ rustchainnode install-service --wallet nox-ventures
✅ systemd service written to ~/.config/systemd/user/rustchainnode.service

Programmatic API

from rustchainnode import RustChainNode

node = RustChainNode(wallet="my-wallet", port=8099)
node.start()
print(node.health())   # {"ok": true, "version": "2.2.1-rip200", ...}
print(node.epoch())    # {"epoch": 94, "slot": 13580, ...}
node.stop()

Cross-Platform Antiquity Support

Architecture Antiquity Multiplier
PowerPC (G4/G5) 2.5x
PowerPC 64-bit 2.0x
x86 32-bit 1.5x
ARM64 / x86_64 1.0x

Zero Dependencies

Pure stdlib — no pip install flask needed to run the client CLI. Works on Python 3.9+.

RTC Wallet: nox-ventures

…g, lifecycle, Sophia AI analysis

Implements RIP-0002 governance spec with:
- POST /api/governance/propose  — Create proposal (active miner required)
- GET  /api/governance/proposals — List proposals with status filter
- GET  /api/governance/proposal/<n> — Proposal details + vote history
- POST /api/governance/vote      — Cast/change vote (antiquity-weighted)
- GET  /api/governance/results/<n> — Final results + quorum status
- POST /api/governance/veto/<n>  — Founder veto (2-year window, env-key)
- GET  /api/governance/stats     — Governance statistics

Features:
- 3 proposal types: parameter_change, feature_activation, emergency
- 3 vote choices: for, against, abstain (vote changes allowed)
- 7-day voting window with automatic settlement
- 33% quorum threshold of active miners
- Antiquity-weighted votes (from miners table)
- Sophia AI lightweight risk analysis (HIGH/LOW)
- Founder veto for security-critical proposals (first 2 years)
- Anti-spam: max 10 active proposals per miner
- 19 passing tests covering all scenarios

Bounty: Scottcjn/rustchain-bounties#761
Wallet: nox-ventures
Implements bounty Scottcjn#757: package the RustChain node as a pip-installable PyPI package.

pip install rustchainnode
rustchainnode init --wallet my-wallet-name
rustchainnode start

Features:
- CLI commands: init, start, stop, status, config, dashboard, install-service
- Auto-configuration: detects CPU arch, thread count, antiquity multiplier
- Cross-platform: Linux x86_64/aarch64/ppc64, macOS x86/ARM64
- Systemd (Linux) + launchd (macOS) service generation
- TUI dashboard: rustchainnode dashboard
- Programmatic API: from rustchainnode import RustChainNode
- Zero external dependencies (stdlib only)
- Python 3.9+ compatible

Bounty: Scottcjn/rustchain-bounties#757
Wallet: nox-ventures
@github-actions github-actions bot added documentation Improvements or additions to documentation BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related tests Test suite changes size/XL PR: 500+ lines labels Mar 7, 2026
@Scottcjn Scottcjn merged commit ddf4808 into Scottcjn:main Mar 7, 2026
3 checks passed
createkr pushed a commit to createkr/Rustchain that referenced this pull request Mar 22, 2026
…ode (Scottcjn#641)

* feat(rip-0002): On-Chain Governance System — proposal creation, voting, lifecycle, Sophia AI analysis

Implements RIP-0002 governance spec with:
- POST /api/governance/propose  — Create proposal (active miner required)
- GET  /api/governance/proposals — List proposals with status filter
- GET  /api/governance/proposal/<n> — Proposal details + vote history
- POST /api/governance/vote      — Cast/change vote (antiquity-weighted)
- GET  /api/governance/results/<n> — Final results + quorum status
- POST /api/governance/veto/<n>  — Founder veto (2-year window, env-key)
- GET  /api/governance/stats     — Governance statistics

Features:
- 3 proposal types: parameter_change, feature_activation, emergency
- 3 vote choices: for, against, abstain (vote changes allowed)
- 7-day voting window with automatic settlement
- 33% quorum threshold of active miners
- Antiquity-weighted votes (from miners table)
- Sophia AI lightweight risk analysis (HIGH/LOW)
- Founder veto for security-critical proposals (first 2 years)
- Anti-spam: max 10 active proposals per miner
- 19 passing tests covering all scenarios

Bounty: Scottcjn/rustchain-bounties#761
Wallet: nox-ventures

* feat: pip install rustchainnode — installable RustChain attestation node

Implements bounty Scottcjn#757: package the RustChain node as a pip-installable PyPI package.

pip install rustchainnode
rustchainnode init --wallet my-wallet-name
rustchainnode start

Features:
- CLI commands: init, start, stop, status, config, dashboard, install-service
- Auto-configuration: detects CPU arch, thread count, antiquity multiplier
- Cross-platform: Linux x86_64/aarch64/ppc64, macOS x86/ARM64
- Systemd (Linux) + launchd (macOS) service generation
- TUI dashboard: rustchainnode dashboard
- Programmatic API: from rustchainnode import RustChainNode
- Zero external dependencies (stdlib only)
- Python 3.9+ compatible

Bounty: Scottcjn/rustchain-bounties#757
Wallet: nox-ventures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) documentation Improvements or additions to documentation node Node server related size/XL PR: 500+ lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants