14 Commits

Author SHA1 Message Date
Krystie 8930605185 Add Velxio test project + fix qemu-smoke APT cache issue
- Created velxio-test/ with Velxio project file for web-based testing
- Fixed qemu-smoke.sh to clean APT cache before running installer
- Added --private-users=no flag to systemd-nspawn for network access
- All 16 smoke test checks now passing (config, backend, frontend, tor, systemd, users)
- Includes comprehensive test validation script for Velxio
- Documented both testing methods (QEMU smoke test + Velxio web UI)
2026-03-28 23:21:13 -07:00
Krystie bdd28aa33d feat: add automatic blockchain bootstrap
Add blockchain bootstrap support to dramatically speed up initial sync:

New files:
- setup/bootstrap.sh: Downloads and extracts blockchain snapshot
  from http://194.233.88.206/triangles-bootstrap.tar.gz (~1.3GB)
- docs/BOOTSTRAP.md: Complete documentation on bootstrap process,
  time savings, security, and troubleshooting
- build/test-bootstrap.sh: Bootstrap functionality tests

Installer changes (setup/install.sh):
- Automatically downloads bootstrap before starting trianglesd
- Skips bootstrap if already applied (.bootstrapped marker)
- Allows opt-out with BOOTSTRAP=no environment variable
- Reports bootstrap status in installation summary

Benefits:
- Reduces initial sync from 2-5 days to 1-6 hours
- Downloads 1.3GB instead of syncing 3GB over days
- Still validates all blocks from bootstrap point forward
- Safe: maintains full consensus rules

Bootstrap server updated weekly (Sundays 4 AM) with fresh snapshots.
2026-03-28 18:27:41 -07:00
Krystie aa8382abe4 feat: configure TRI-PI as Tor relay node
Transform TRI-PI from simple wallet to full relay node:

Config changes (triangles.conf.template):
- Increased dbcache to 100MB for better performance
- Added onlynet=tor for Tor-only connectivity
- Added par=1 for single-threaded verification (lower CPU)
- Reduced checkblocks to 100 for faster startup
- Enhanced documentation explaining relay node behavior

Documentation:
- README.md: Updated to emphasize relay node functionality
- docs/RELAY_NODE.md: Comprehensive guide on relay operation,
  network architecture, resource usage, and scaling

Each Pi now:
- Accepts incoming connections from other nodes
- Relays transactions across the network
- Relays blocks to help nodes sync
- Operates entirely over Tor (.onion address)
- Strengthens network decentralization

Resource usage optimized for Raspberry Pi while maintaining
full relay capability.
2026-03-28 18:24:52 -07:00
Krystie 6feae38a5e test: add extended service validation
Added build/test-services.sh to validate:
- Python backend syntax and stdlib dependencies
- Config file generation and values
- Tor hidden service configuration
- Frontend asset installation
- Backend environment file
- systemd unit file syntax
- File permissions (640 for configs, 750 for data dir)

All tests passing in ARM64 QEMU emulation.
2026-03-28 18:11:26 -07:00
Krystie 576d20136d fix(qemu): add /sbin to PATH for losetup dependency check
On Ubuntu, losetup is in /sbin which may not be in PATH when
running as root. Export PATH with /sbin included before checking
for required commands.
2026-03-28 18:02:33 -07:00
Krystie 2f0506fd6c fix(installer): disable pipefail for RPC password generation
The urandom|tr|head pipeline triggers SIGPIPE when head exits,
causing the script to fail with set -o pipefail enabled.

Temporarily disable pipefail around the password generation to
avoid this false failure.
2026-03-28 18:01:44 -07:00
Krystie 5fca10c84f Fix: pipefail-safe random password generation
tr reading from /dev/urandom gets SIGPIPE when head exits, causing
non-zero exit under set -o pipefail. Read a fixed chunk first instead.
2026-03-28 17:01:26 -07:00
Krystie d27c677a63 Fix: Normalize file permissions and add .gitignore 2026-03-28 16:58:21 -07:00
Krystie 42a278f74e Fix: Remove set -e from smoke test inner script 2026-03-28 16:53:09 -07:00
Krystie 38e42a9d39 Fix: Skip systemctl enable/start commands in non-systemd environments
The installer was failing when systemctl enable/start commands ran in
test containers where systemd isn't running as PID 1. Wrap all service
management commands in a check for systemd availability.
2026-03-28 16:49:45 -07:00
Krystie b21b0bea5a Fix: Make systemctl daemon-reload optional for smoke tests
The installer was failing in systemd-nspawn containers because systemctl
daemon-reload exits with error code 1 when systemd isn't PID 1. This is
expected in test environments. Make the command non-fatal so the installer
completes successfully even in test containers.
2026-03-28 16:43:29 -07:00
Krystie f1c4c33edf Merge branch 'master' of https://git.sami/sami7777/tri-pi 2026-03-28 16:23:23 -07:00
Krystie c1d44cb027 Initial TRI-PI project import
- Raspberry Pi installer for Triangles cryptocurrency node
- QEMU ARM emulation smoke tests (build/qemu-smoke.sh)
- Backend API (Flask app for node monitoring)
- Frontend web UI (status dashboard)
- Tor integration templates
- systemd service files
- Installation scripts
2026-03-28 16:23:04 -07:00
SamiAhmed7777 ed43e77de4 Initial commit: TRI-PI Raspberry Pi node project 2026-03-28 15:51:50 -07:00