Skip to content

Commit 39ba6ee

Browse files
committed
Add release build system for Linux and macOS binaries
Created automated release infrastructure: 1. GitHub Actions workflow (.github/workflows/release.yml): - Builds for Linux x86_64 (musl for portability) - Builds for macOS x86_64 (Intel) - Builds for macOS arm64 (Apple Silicon) - Creates tarballs with SHA256 checksums - Auto-publishes on git tags (v*) - Can be triggered manually 2. Download documentation (docs/DOWNLOAD_NODE.md): - Quick start for each platform - Validator setup instructions - Systemd service config (Linux) - LaunchAgent config (macOS) - Firewall setup - Troubleshooting guide 3. Release script (scripts/create_releases.sh): - Builds macOS binary locally - Creates release packages - Instructions for Linux build 4. VPS deployment (scripts/deploy_vps.sh, build_on_vps.sh): - Deploy to VPS - Build on VPS for Linux binary Current release: - macOS arm64 binary: releases/0.1.0/ultradag-node-macos-arm64.tar.gz (1.5MB)- macOS arm64 binary: releases/0.1.0/ultradag-node-macos-arm64.tar.gz (1.5MB)- magin- macOS arm64 binary: releases/0.1.0/ultlatforms and create release.
1 parent 78eef1b commit 39ba6ee

14 files changed

Lines changed: 851 additions & 0 deletions

.github/workflows/release.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Build Release Binaries
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: Build ${{ matrix.target }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
include:
16+
- os: ubuntu-latest
17+
target: x86_64-unknown-linux-musl
18+
artifact_name: ultradag-node-linux-x86_64
19+
- os: macos-latest
20+
target: x86_64-apple-darwin
21+
artifact_name: ultradag-node-macos-x86_64
22+
- os: macos-latest
23+
target: aarch64-apple-darwin
24+
artifact_name: ultradag-node-macos-arm64
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Install Rust
30+
uses: dtolnay/rust-toolchain@stable
31+
with:
32+
targets: ${{ matrix.target }}
33+
34+
- name: Install musl tools (Linux)
35+
if: matrix.os == 'ubuntu-latest'
36+
run: |
37+
sudo apt-get update
38+
sudo apt-get install -y musl-tools
39+
40+
- name: Build
41+
run: cargo build --release --target ${{ matrix.target }} -p ultradag-node
42+
43+
- name: Prepare artifact
44+
run: |
45+
mkdir -p release
46+
cp target/${{ matrix.target }}/release/ultradag-node release/${{ matrix.artifact_name }}
47+
chmod +x release/${{ matrix.artifact_name }}
48+
49+
- name: Create tarball
50+
run: |
51+
cd release
52+
tar -czf ${{ matrix.artifact_name }}.tar.gz ${{ matrix.artifact_name }}
53+
sha256sum ${{ matrix.artifact_name }}.tar.gz > ${{ matrix.artifact_name }}.tar.gz.sha256
54+
55+
- name: Upload artifact
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ matrix.artifact_name }}
59+
path: release/${{ matrix.artifact_name }}.tar.gz*
60+
61+
release:
62+
name: Create Release
63+
needs: build
64+
runs-on: ubuntu-latest
65+
if: startsWith(github.ref, 'refs/tags/')
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
- name: Download all artifacts
71+
uses: actions/download-artifact@v4
72+
with:
73+
path: artifacts
74+
75+
- name: Create Release
76+
uses: softprops/action-gh-release@v1
77+
with:
78+
files: artifacts/**/*.tar.gz*
79+
draft: false
80+
prerelease: false
81+
generate_release_notes: true

VPS_SETUP_COMMANDS.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# VPS Setup Commands
2+
3+
The files have been copied to your VPS. Now SSH into the VPS and run these commands:
4+
5+
```bash
6+
ssh johanmichel@84.247.10.2
7+
```
8+
9+
Then run:
10+
11+
```bash
12+
cd ~/ultradag
13+
14+
# Install systemd service
15+
sudo cp ultradag.service /etc/systemd/system/
16+
sudo systemctl daemon-reload
17+
sudo systemctl enable ultradag
18+
sudo systemctl start ultradag
19+
20+
# Check status
21+
sudo systemctl status ultradag
22+
23+
# View logs
24+
sudo journalctl -u ultradag -f
25+
```
26+
27+
## Test the node
28+
29+
From your local machine:
30+
31+
```bash
32+
curl http://84.247.10.2:10333/status
33+
```
34+
35+
## Useful commands
36+
37+
```bash
38+
# Status
39+
sudo systemctl status ultradag
40+
41+
# Restart
42+
sudo systemctl restart ultradag
43+
44+
# Stop
45+
sudo systemctl stop ultradag
46+
47+
# View logs (follow)
48+
sudo journalctl -u ultradag -f
49+
50+
# View logs (last 100 lines)
51+
sudo journalctl -u ultradag -n 100
52+
```
53+
54+
## Validator key location
55+
56+
The validator key is at: `~/ultradag/validator.key`
57+
58+
**Keep this safe!** This is your validator's private key.

deploy_1772975798/monitor.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# monitor.sh — run this overnight
3+
while true; do
4+
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
5+
for n in 1 2 3 4; do
6+
STATUS=$(curl -s --max-time 5 "https://ultradag-node-$n.fly.dev/status")
7+
ROUND=$(echo $STATUS | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['dag_round'])" 2>/dev/null || echo "UNREACHABLE")
8+
FIN=$(echo $STATUS | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['last_finalized_round'])" 2>/dev/null || echo "UNREACHABLE")
9+
LAG=$((ROUND - FIN))
10+
SUPPLY=$(echo $STATUS | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['total_supply'])" 2>/dev/null || echo "0")
11+
echo "$TIMESTAMP node-$n round=$ROUND fin=$FIN lag=$LAG supply=$SUPPLY"
12+
done
13+
echo "---"
14+
sleep 60
15+
done >> testnet_monitor.log 2>&1

deploy_1772975798/setup.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Setting up UltraDAG node..."
5+
6+
# Create directory
7+
mkdir -p ~/ultradag
8+
cd ~/ultradag
9+
10+
# Make binary executable
11+
chmod +x ultradag-node
12+
13+
# Generate validator key if doesn't exist
14+
if [ ! -f validator.key ]; then
15+
echo "Generating validator key..."
16+
# Create a random 32-byte key
17+
head -c 32 /dev/urandom | base64 > validator.key
18+
echo "✅ Validator key generated"
19+
else
20+
echo "✅ Validator key already exists"
21+
fi
22+
23+
# Install systemd service
24+
echo "Installing systemd service..."
25+
sudo cp ultradag.service /etc/systemd/system/
26+
sudo systemctl daemon-reload
27+
sudo systemctl enable ultradag
28+
sudo systemctl restart ultradag
29+
30+
echo ""
31+
echo "✅ UltraDAG node installed and started"
32+
echo ""
33+
echo "Check status: sudo systemctl status ultradag"
34+
echo "View logs: sudo journalctl -u ultradag -f"
35+
echo "Node API: http://84.247.10.2:10333/status"

deploy_1772975798/ultradag-node

1.45 MB
Binary file not shown.

deploy_1772975798/ultradag.service

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[Unit]
2+
Description=UltraDAG Node
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
User=johanmichel
8+
WorkingDirectory=/home/johanmichel/ultradag
9+
ExecStart=/home/johanmichel/ultradag/ultradag-node \
10+
--validator /home/johanmichel/ultradag/validator.key \
11+
--seed https://ultradag-node-1.fly.dev \
12+
--seed https://ultradag-node-2.fly.dev \
13+
--seed https://ultradag-node-3.fly.dev \
14+
--seed https://ultradag-node-4.fly.dev \
15+
--rpc-port 10333 \
16+
--round-duration-ms 5000
17+
Restart=always
18+
RestartSec=10
19+
StandardOutput=journal
20+
StandardError=journal
21+
22+
[Install]
23+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)