diff --git a/README.md b/README.md index ce55c51..8381d8c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,227 @@ -# try-pie +# TRI-PI v5.4.4 - ARM64 Edition -Try Pie - TRI cryptocurrency Python utilities and tools \ No newline at end of file +Complete Triangles (TRI) cryptocurrency node package for Raspberry Pi 4/5 (64-bit) and ARM64 servers. + +## What's Included + +- **trianglesd** v5.4.4 - Native ARM64 binary (85MB) +- **Tor integration** - Built-in hidden service support +- **Updated seed nodes** - Latest v5.4.4 onion addresses +- **Auto-installer** - One-command setup +- **Full documentation** - Build instructions and usage guide + +## System Requirements + +- **Platform:** Raspberry Pi 4/5 (64-bit) or any ARM64 Linux server +- **OS:** Ubuntu 24.04 ARM64, Raspberry Pi OS 64-bit, or compatible +- **RAM:** 2GB minimum (4GB recommended) +- **Storage:** 10GB free space (blockchain grows over time) +- **Network:** Internet connection (Tor supported) + +## Quick Installation + +```bash +# Extract the package +tar xzf tri-pi-v5.4.4-arm64.tar.gz +cd tri-pi-v5.4.4-arm64 + +# Run installer (requires sudo) +sudo ./install.sh +``` + +## Usage + +### Start the node +```bash +trianglesd +``` + +### Check node status +```bash +trianglesd getinfo +``` + +### Get help +```bash +trianglesd help +``` + +### Common commands +```bash +trianglesd getblockcount # Current block height +trianglesd getpeerinfo # Connected peers +trianglesd getstakinginfo # Staking status +trianglesd getnewaddress # Generate new address +trianglesd getbalance # Wallet balance +``` + +## Tor Integration + +trianglesd v5.4.4 includes built-in Tor management: + +- **Automatic Tor startup** - No manual configuration needed +- **Hidden service generation** - Creates .onion address automatically +- **SOCKS proxy** - Built-in at port 19099 +- **Peer connectivity** - Connects to onion seed nodes + +**To disable Tor:** +```bash +trianglesd -notor +``` + +**Check your onion address:** +```bash +trianglesd getinfo | grep onion +``` + +## Configuration + +Configuration file: `~/.triangles/triangles.conf` + +The installer creates a default config. You can edit it for custom settings: + +```bash +nano ~/.triangles/triangles.conf +``` + +### Important config options: + +``` +server=1 # Enable RPC server +daemon=1 # Run as daemon +listen=1 # Accept incoming connections +txindex=1 # Full transaction index +maxconnections=125 # Max peer connections +rpcport=24113 # RPC port +``` + +## Building from Source + +### Prerequisites + +```bash +# Install build dependencies +sudo apt-get update +sudo apt-get install -y git build-essential libtool autotools-dev automake \ + pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev \ + libminiupnpc-dev libzmq3-dev tor curl wget +``` + +### Build BerkeleyDB 4.8 + +```bash +# Download and extract +wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz +tar xzf db-4.8.30.NC.tar.gz +cd db-4.8.30.NC/build_unix + +# Update config scripts for ARM64 +wget -O ../dist/config.guess \ + 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +wget -O ../dist/config.sub \ + 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' +chmod +x ../dist/config.guess ../dist/config.sub + +# Configure and build +../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/usr/local +make -j$(nproc) +sudo make install +sudo ldconfig +``` + +### Build trianglesd + +```bash +# Clone source +git clone https://github.com/SamiAhmed7777/triangles_v5.git +cd triangles_v5 +git checkout v5.4.4 + +# Build daemon +cd src +make -f makefile.unix -j$(nproc) USE_UPNP=1 + +# Install +sudo strip trianglesd +sudo cp trianglesd /usr/local/bin/ +sudo chmod +x /usr/local/bin/trianglesd +``` + +### Verify build + +```bash +trianglesd --version +# Output: Triangles version v5.4.4 +``` + +## Seed Nodes (v5.4.4) + +The following onion seed nodes are hardcoded in v5.4.4: + +1. `gxvrhv3qitnc6kobrhsrse46bmcfitnybapor3or3oczzuxn6hfzxyid.onion` (DNS2) +2. `i6tk7soznftvoibtskwlezviskiererhjndpsmrff4kaxw7jnd5izfqd.onion` (DNS3) +3. `futmtrvh6j34t7s6yjdxfia6iwuyfzwh4k5eqfof5kfhoqk3xmi3qoqd.onion` (Original) +4. `uddaxjbo3lh2zskg7w6gwln4ty5cel7q4c5jbx7fdtv6zf2j47gdlyad.onion` (Seed-1) +5. `el5sirhhleecuctpeeprelzubpqmoqivvra3rzlwbjttinxa4fq3wnid.onion` (Seed-2) +6. `sj5dhybnlp3v4y5niyc5unrnd6s43lyx5ibup7rolyosjbi2u2hsbvyd.onion` (Seed-3) +7. `i3kr5meha7se4ns3wss3h7v46m6uksfzv4wrohdqxpj6n35wyo2bvlid.onion` (Seed-4) + +## Network Information + +- **Mainnet Port:** 17771 +- **RPC Port:** 24113 (configurable) +- **Tor SOCKS Port:** 19099 (internal) +- **Protocol Version:** 70206 +- **Consensus:** Hybrid PoW/PoS + +## Troubleshooting + +### Tor connection issues + +If Tor fails to start: +```bash +# Check Tor status +sudo systemctl status tor + +# Restart Tor +sudo systemctl restart tor + +# Check logs +trianglesd getinfo 2>&1 | grep -i tor +``` + +### Sync issues + +If blockchain won't sync: +```bash +# Check connections +trianglesd getpeerinfo + +# Add seed nodes manually +trianglesd addnode "uddaxjbo3lh2zskg7w6gwln4ty5cel7q4c5jbx7fdtv6zf2j47gdlyad.onion" "onetry" +``` + +### Port conflicts + +If port 24112 is already in use: +```bash +# Check what's using the port +sudo lsof -i :24112 + +# Edit config to use different port +nano ~/.triangles/triangles.conf +# Change: port=24113 +``` + +## Support + +- **GitHub:** https://github.com/SamiAhmed7777/triangles_v5 +- **Issues:** https://github.com/SamiAhmed7777/triangles_v5/issues + +## License + +See LICENSE file in the source repository. + +--- + +Built with ❤️ for the Raspberry Pi and ARM64 community diff --git a/bin/trianglesd b/bin/trianglesd new file mode 100755 index 0000000..4fd7954 Binary files /dev/null and b/bin/trianglesd differ diff --git a/docs/BUILD.md b/docs/BUILD.md new file mode 100644 index 0000000..d79814b --- /dev/null +++ b/docs/BUILD.md @@ -0,0 +1,281 @@ +# Building trianglesd v5.4.4 from Source (ARM64) + +Complete step-by-step build instructions for ARM64 platforms (Raspberry Pi 4/5, ARM servers). + +## Build Environment + +**Tested on:** +- Ubuntu 24.04 ARM64 +- Hetzner Cloud CAX11 (ARM64) +- Raspberry Pi OS 64-bit + +**Build time:** ~15-20 minutes (varies by CPU) + +## Step 1: Install Dependencies + +```bash +sudo apt-get update +sudo apt-get install -y \ + git build-essential libtool autotools-dev automake pkg-config \ + libssl-dev libevent-dev bsdmainutils libboost-all-dev \ + libminiupnpc-dev libzmq3-dev tor curl wget +``` + +**Packages explained:** +- `build-essential` - GCC, G++, make +- `libboost-all-dev` - Boost libraries (1.83.0 on Ubuntu 24.04) +- `libssl-dev` - OpenSSL (for crypto functions) +- `libevent-dev` - Event notification library +- `libminiupnpc-dev` - UPnP support +- `libzmq3-dev` - ZeroMQ (messaging) +- `tor` - Tor network connectivity + +## Step 2: Build BerkeleyDB 4.8 + +trianglesd requires BerkeleyDB 4.8 for wallet compatibility. + +```bash +# Create build directory +mkdir -p ~/build-deps && cd ~/build-deps + +# Download BerkeleyDB 4.8 +wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz +tar xzf db-4.8.30.NC.tar.gz +cd db-4.8.30.NC/build_unix +``` + +### Update config scripts for ARM64 + +The original BerkeleyDB 4.8 config scripts are too old for ARM64. Update them: + +```bash +wget -O ../dist/config.guess \ + 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' + +wget -O ../dist/config.sub \ + 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' + +chmod +x ../dist/config.guess ../dist/config.sub +``` + +### Configure and build + +```bash +# Configure for ARM64 +../dist/configure \ + --enable-cxx \ + --disable-shared \ + --with-pic \ + --prefix=/usr/local + +# Build (use all CPU cores) +make -j$(nproc) + +# Install +sudo make install +sudo ldconfig +``` + +**Verify installation:** +```bash +ls -l /usr/local/lib/libdb* +# Should show libdb-4.8.a, libdb.a, libdb_cxx-4.8.a, libdb_cxx.a +``` + +## Step 3: Clone triangles_v5 + +```bash +cd ~ +git clone https://github.com/SamiAhmed7777/triangles_v5.git +cd triangles_v5 +git checkout v5.4.4 +``` + +## Step 4: Build trianglesd + +```bash +cd src +make -f makefile.unix -j$(nproc) USE_UPNP=1 +``` + +**Build flags:** +- `-j$(nproc)` - Parallel compilation (uses all CPU cores) +- `USE_UPNP=1` - Enable UPnP port mapping + +**Build output:** `trianglesd` binary (~85MB before stripping) + +### Common build warnings (safe to ignore) + +- OpenSSL deprecation warnings (SHA256, RIPEMD160) +- Boost deprecated copy warnings +- Format string warnings + +These are cosmetic and don't affect functionality. + +## Step 5: Install the Binary + +```bash +# Strip debug symbols (reduces size to ~40MB) +strip trianglesd + +# Install to system +sudo cp trianglesd /usr/local/bin/ +sudo chmod +x /usr/local/bin/trianglesd +``` + +**Verify installation:** +```bash +trianglesd --version +# Output: Triangles version v5.4.4 + +trianglesd --help | head -20 +# Should show usage information +``` + +## Step 6: Create Configuration + +```bash +# Create data directory +mkdir -p ~/.triangles + +# Generate random RPC password +RPC_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32) + +# Create config file +cat > ~/.triangles/triangles.conf << CONFIG +server=1 +daemon=1 +listen=1 +txindex=1 + +# Tor integration (managed automatically by trianglesd) +# Seed nodes (v5.4.4) +addnode=gxvrhv3qitnc6kobrhsrse46bmcfitnybapor3or3oczzuxn6hfzxyid.onion +addnode=i6tk7soznftvoibtskwlezviskiererhjndpsmrff4kaxw7jnd5izfqd.onion +addnode=uddaxjbo3lh2zskg7w6gwln4ty5cel7q4c5jbx7fdtv6zf2j47gdlyad.onion +addnode=el5sirhhleecuctpeeprelzubpqmoqivvra3rzlwbjttinxa4fq3wnid.onion +addnode=sj5dhybnlp3v4y5niyc5unrnd6s43lyx5ibup7rolyosjbi2u2hsbvyd.onion +addnode=i3kr5meha7se4ns3wss3h7v46m6uksfzv4wrohdqxpj6n35wyo2bvlid.onion + +# RPC +rpcuser=tripi +rpcpassword=$RPC_PASS +rpcallowip=127.0.0.1 +rpcport=24113 + +maxconnections=125 +CONFIG + +chmod 600 ~/.triangles/triangles.conf +``` + +## Step 7: Enable Tor + +```bash +sudo systemctl enable tor +sudo systemctl start tor +sudo systemctl status tor +``` + +## Step 8: Start trianglesd + +```bash +# Start daemon +trianglesd + +# Check status (wait 10-15 seconds for startup) +trianglesd getinfo + +# Monitor connections +trianglesd getpeerinfo +``` + +## Build Notes + +### Tor Integration + +trianglesd v5.4.4 includes: +- **Embedded Tor management** - Starts Tor automatically +- **SOCKS proxy** on port 19099 (internal) +- **Onion service generation** - Creates .onion address +- **Onion seed nodes** - Connects via Tor by default + +**Important:** Do NOT set `onion=` or `tor=` in config. Let trianglesd manage it. + +### Makefile Options + +The `makefile.unix` supports several options: + +```bash +# Basic build +make -f makefile.unix + +# With UPnP +make -f makefile.unix USE_UPNP=1 + +# With IPv6 +make -f makefile.unix USE_IPV6=1 + +# Debug build +make -f makefile.unix DEBUG=1 + +# Clean +make -f makefile.unix clean +``` + +### Cross-Compilation + +To cross-compile for ARM64 from x86_64: + +```bash +# Install cross-compiler +sudo apt-get install g++-aarch64-linux-gnu + +# Modify makefile or use environment variables +CXX=aarch64-linux-gnu-g++ \ + make -f makefile.unix \ + USE_UPNP=1 +``` + +## Troubleshooting + +### BerkeleyDB not found + +If compilation fails with "db_cxx.h not found": + +```bash +# Check installation +ls -l /usr/local/include/db_cxx.h +ls -l /usr/local/lib/libdb_cxx.a + +# Ensure ldconfig was run +sudo ldconfig +``` + +### Boost version mismatch + +Ubuntu 24.04 uses Boost 1.83. Older systems may have issues. Ensure `libboost-all-dev` is installed. + +### OpenSSL warnings + +Deprecated API warnings are safe to ignore. trianglesd uses older OpenSSL APIs but they still work. + +## Build Artifacts + +After successful build: + +- **Binary:** `src/trianglesd` (~85MB, ~40MB stripped) +- **LevelDB:** `src/leveldb/libleveldb.a`, `src/leveldb/libmemenv.a` +- **Object files:** `src/obj/*.o` + +Clean with: +```bash +make -f makefile.unix clean +``` + +--- + +**Build time breakdown** (4-core ARM server): +- BerkeleyDB: ~5 minutes +- trianglesd: ~10 minutes +- **Total: ~15 minutes** diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..9660451 --- /dev/null +++ b/install.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# TRI-PI v5.4.4 ARM64 Installation Script +# For Raspberry Pi 4/5 (64-bit) and ARM64 servers + +set -e + +echo "=====================================" +echo "TRI-PI v5.4.4 ARM64 Installer" +echo "=====================================" + +if [ "$(id -u)" != "0" ]; then + echo "Error: This script must be run as root (use sudo)" + exit 1 +fi + +# Detect architecture +ARCH=$(uname -m) +if [ "$ARCH" != "aarch64" ]; then + echo "Error: This package is for ARM64 (aarch64) only." + echo "Detected architecture: $ARCH" + exit 1 +fi + +echo "✓ ARM64 architecture detected" + +# Install dependencies +echo "Installing dependencies..." +apt-get update +apt-get install -y tor curl + +echo "✓ Dependencies installed" + +# Install binary +echo "Installing trianglesd..." +cp bin/trianglesd /usr/local/bin/ +chmod +x /usr/local/bin/trianglesd + +echo "✓ Binary installed to /usr/local/bin/trianglesd" + +# Create data directory +mkdir -p ~/.triangles + +# Create config +if [ ! -f ~/.triangles/triangles.conf ]; then + echo "Creating default configuration..." + + RPC_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32) + + cat > ~/.triangles/triangles.conf << CONFIG +# TRI-PI v5.4.4 Configuration +server=1 +daemon=1 +listen=1 +txindex=1 + +# Tor integration (trianglesd manages tor automatically) +# Do NOT set onion= or tor= - let trianglesd handle it + +# Seed nodes (updated v5.4.4) +addnode=gxvrhv3qitnc6kobrhsrse46bmcfitnybapor3or3oczzuxn6hfzxyid.onion +addnode=i6tk7soznftvoibtskwlezviskiererhjndpsmrff4kaxw7jnd5izfqd.onion +addnode=uddaxjbo3lh2zskg7w6gwln4ty5cel7q4c5jbx7fdtv6zf2j47gdlyad.onion +addnode=el5sirhhleecuctpeeprelzubpqmoqivvra3rzlwbjttinxa4fq3wnid.onion +addnode=sj5dhybnlp3v4y5niyc5unrnd6s43lyx5ibup7rolyosjbi2u2hsbvyd.onion +addnode=i3kr5meha7se4ns3wss3h7v46m6uksfzv4wrohdqxpj6n35wyo2bvlid.onion +addnode=futmtrvh6j34t7s6yjdxfia6iwuyfzwh4k5eqfof5kfhoqk3xmi3qoqd.onion + +# RPC settings +rpcuser=tripi +rpcpassword=$RPC_PASS +rpcallowip=127.0.0.1 +rpcport=24113 + +# Performance +maxconnections=125 +CONFIG + + chmod 600 ~/.triangles/triangles.conf + echo "✓ Configuration created at ~/.triangles/triangles.conf" +else + echo "✓ Existing configuration found" +fi + +# Enable Tor +echo "Enabling Tor service..." +systemctl enable tor +systemctl start tor + +echo "" +echo "=====================================" +echo "✅ TRI-PI v5.4.4 Installation Complete!" +echo "=====================================" +echo "" +echo "Quick Start:" +echo " trianglesd # Start daemon" +echo " trianglesd getinfo # Check status" +echo " trianglesd help # List commands" +echo "" +echo "Data directory: ~/.triangles" +echo "Config file: ~/.triangles/triangles.conf" +echo "" +echo "Tor will generate onion address on first run." +echo "Check onion address with: trianglesd getinfo" +echo "" diff --git a/releases/tri-pi-v5.4.4-arm64.tar.gz b/releases/tri-pi-v5.4.4-arm64.tar.gz new file mode 100644 index 0000000..10c3df9 Binary files /dev/null and b/releases/tri-pi-v5.4.4-arm64.tar.gz differ