Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6cf72f7
added
TendieHelper Nov 12, 2024
cbfff84
added new requester
TendieHelper Nov 25, 2024
acf7e68
added new requester
TendieHelper Nov 25, 2024
16790cc
added new requester
TendieHelper Nov 25, 2024
da094d9
added new requester
TendieHelper Nov 25, 2024
0a23de4
orch now fuffils requests
tylerwarburton Nov 25, 2024
100f349
changed loops
tylerwarburton Dec 8, 2024
0f684dd
added new features
tylerwarburton Dec 19, 2024
22b7d94
Merge branch 'main' into AWS-Local-Deploy
TendieHelper Dec 19, 2024
75bbbdd
V1 working
tylerwarburton Dec 21, 2024
4d6ea46
added
tylerwarburton Dec 21, 2024
fbde2b6
finished and working
tylerwarburton Jan 17, 2025
df776d2
finished
tylerwarburton Jan 21, 2025
f3d2f46
close
tylerwarburton Jan 29, 2025
e27d744
Finished
tylerwarburton Jan 30, 2025
2f5628c
Finished
tylerwarburton Jan 30, 2025
339f0ea
Finished
tylerwarburton Jan 30, 2025
a2ec06b
Finished
tylerwarburton Jan 30, 2025
f61d89a
Finished
tylerwarburton Jan 30, 2025
a4f7964
added
tylerwarburton Feb 3, 2025
bbe7d91
added
tylerwarburton Feb 3, 2025
6b736f4
added
tylerwarburton Feb 3, 2025
08b0bc3
Merge pull request #1 from RandAOLabs/AWS-Local-Deploy
tylerwarburton Feb 3, 2025
d72b3ed
image fix hotfix
tylerwarburton Feb 3, 2025
350e4e6
added arch
tylerwarburton Feb 3, 2025
b33b88d
added pulling image
tylerwarburton Feb 3, 2025
59e4bc6
altered IAM policy
tylerwarburton Feb 4, 2025
cc1e76f
altered IAM policy
tylerwarburton Feb 4, 2025
3dd7b1e
modified terraform to leave secrets alone
tylerwarburton Feb 4, 2025
f167bb7
fixed bugs and staking
tylerwarburton Feb 7, 2025
a7e7e27
fixed up some stuff
tylerwarburton Feb 7, 2025
e7d8ca5
New code
tylerwarburton Feb 26, 2025
f24dd16
provider upgrade
TendieHelper Feb 27, 2025
1a023c7
wip
tylerwarburton Mar 14, 2025
84471c3
done
tylerwarburton Mar 18, 2025
c9b8c73
Merge pull request #2 from RandAOLabs/wip-debugging-random-polling
tylerwarburton Mar 18, 2025
062d82d
time lock puzzles are through database - folder still needs cleanup o…
ClaudeShannon16 Mar 21, 2025
70a11b0
Time lock puzzles and database and linkage all setup
ClaudeShannon16 Mar 24, 2025
e6d9b83
remove 0x
ClaudeShannon16 Mar 28, 2025
1a268d1
updated
tylerwarburton Mar 28, 2025
460a122
Merge pull request #4 from RandAOLabs/wip-debugging-random-polling
tylerwarburton Mar 28, 2025
b0b39e7
updated
tylerwarburton Mar 28, 2025
ea47ec4
Merge pull request #5 from RandAOLabs/wip-debugging-random-polling2
tylerwarburton Mar 28, 2025
3609053
Merge branch 'main' into randao-protocol-2.0
tylerwarburton Mar 28, 2025
40d7169
done
tylerwarburton Mar 28, 2025
729e6a8
Merge pull request #3 from RandAOLabs/randao-protocol-2.0
tylerwarburton Mar 28, 2025
24b0f5b
newer random
tylerwarburton Mar 31, 2025
5a32d19
Merge pull request #6 from RandAOLabs/randao-protocol-2.0
tylerwarburton Mar 31, 2025
cd042b7
V0.4.55
tylerwarburton Mar 31, 2025
f5d65a4
added docs
tylerwarburton Apr 2, 2025
26e2063
cleaned up
tylerwarburton Apr 4, 2025
0057ad3
cleaned up2
tylerwarburton Apr 4, 2025
8c6c562
Cleaned up docs
tylerwarburton Apr 5, 2025
b6848a1
added new cu code
tylerwarburton Apr 14, 2025
9c914c0
added
tylerwarburton Apr 17, 2025
d15ef70
added raspberry pi puzzle gen
tylerwarburton Apr 18, 2025
695caf0
added raspberry pi puzzle gen2
tylerwarburton Apr 18, 2025
0e9d11f
added raspberry pi puzzle gen3
tylerwarburton Apr 18, 2025
27bd73d
remove the need for WALLET_JSON env var
MichaelBuhler May 7, 2025
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
57 changes: 56 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,56 @@
venv/
# Ignore virtual environments
venv/
.env/
.env
env
*wallet.json
*wallet*.json
mass-docker-compose.yml
# Ignore distribution/build directories
dist/
build/
*.egg-info/
*.pyc
__pycache__/
pgdata/

# Ignore Node.js dependencies
node_modules/
**/node_modules/

# Ignore Terraform and related files
*.tfstate
*.tfstate.backup
*.exe
*.lock.*
LICENSE.txt
terraform.tfvars


# Ignore package locks and dependency files
package-lock.json
yarn.lock

# Ignore OS-generated files
.DS_Store
Thumbs.db

# Ignore editor-specific files
.idea/
.vscode/

# Ignore logs and temporary files
logs/
*.log
temp/
.tmp/
*.swp

# Ignore Python bytecode and cache files
__pycache__/
*.py[cod]

# Ignore Git-specific large files
*.pack
*.idx

235 changes: 235 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
# Node Provider Setup Guide

This guide will help you set up your randomness provider node and start earning rewards. The guide is split into a simple quickstart section followed by more detailed technical information.

## Table of Contents
1. [Quickstart Guide](#quickstart-guide)
2. [How It Works](#how-it-works)
3. [Hardware Requirements](#hardware-requirements)
4. [Detailed Setup Instructions](#detailed-setup-instructions)
5. [Maintenance](#maintenance)
6. [Graceful Shutdown](#graceful-shutdown)
7. [Troubleshooting](#troubleshooting)
8. [Frequently Asked Questions](#frequently-asked-questions)

---

## Quickstart Guide

Setting up your randomness provider is easy! Just follow these simple steps:

### Step 1: Install Docker
Install Docker and Docker Compose by following the [official Docker Compose installation guide](https://docs.docker.com/compose/install/) for your operating system.

### Step 2: Set Up Your Environment
1. Navigate to the Docker Compose directory
2. Copy the example environment file:
```
cp .env.example .env
```
3. Edit the `.env` file and add your wallet information

### Step 3: Start Your Provider
Run this command to start your provider:
```
docker-compose up -d
```

### Step 4: Stake Your Node
1. Navigate to ar://randao
2. Connect your wallet
3. Follow the staking instructions to activate your provider

That's it! Your node is now running and will start generating randomness for the network.

**Need help?** Check the [Troubleshooting](#troubleshooting) section or [Frequently Asked Questions](#frequently-asked-questions) below.

---

## How It Works

Your provider performs 3 main functions:
1. It creates and stores random values that others can request
2. It responds when someone requests a random value
3. It submits final verified random values to the blockchain

The better your provider performs these functions, the more rewards you'll receive. Providers with faster response times earn more!

---

## Hardware Requirements

To run a node, you'll need:
- At least 4 GB memory
- At least 2 CPU cores
- Reliable internet connection

**Note:** These requirements may increase over time as the network grows.

---

## Detailed Setup Instructions

### Prerequisites
- A machine meeting the minimum hardware requirements
- Docker and Docker Compose installed
- Reliable internet connection
- Ability to ensure 100% uptime or follow the [Graceful Shutdown](#graceful-shutdown) procedures

### Setup Steps

1. **Configure Environment Variables**
Navigate to the Docker Compose directory and create your environment file:
```bash
cp .env.example .env
```

Then edit the `.env` file and fill in all required variables:

**Required Variables:**
- `provider_id`: Your unique provider identifier
- `local_db_user`: Database username
- `local_db_password`: Database password
- `local_wallet_json`: Your wallet information (either directly pasted or as a file path)

**Optional Variables (with defaults):**
- `db_name`: Database name (default: orchestrator_db)
- `secrets_prefix`: Prefix for secrets (default: /orchestrator)

2. **Deploy Your Provider**
From the Docker Compose directory, run:
```bash
docker-compose up -d
```

3. **Verify Deployment**
Check the status of your containers:
```bash
docker-compose ps
```

View logs to ensure everything is running correctly:
```bash
docker-compose logs -f
```

4. **Staking**
After successfully setting up your node:
1. Show logs from the node setup to Ethan for verification
2. Upon confirmation, Ethan will provide your provider address with the necessary funds
3. Navigate to ar://randao to stake your funds and configure your provider information

By completing this process, you will fully activate your node and ensure it is ready for network participation.

---

## Maintenance

To update your provider when new versions are released:

```bash
docker-compose pull
docker-compose down
docker-compose up -d
```

Remember to follow the graceful shutdown procedure when performing maintenance to avoid penalties.

---

## Graceful Shutdown

If you need to perform maintenance or temporarily shut down your provider, it's critical to follow these steps to avoid being penalized:

1. Go to ar://randao
2. Navigate to your node
3. Select the "SHUT DOWN" button and sign the transaction
4. Wait for your provider to complete all pending requests (check logs)
5. Once all pending requests are complete, you can safely shut down your provider

After maintenance is complete and your provider is back online:
1. Click the "START UP" button
2. This will signal your provider to resume serving random values

**Warning:** Failing to follow the graceful shutdown procedure may result in penalties to your stake!

---

## Troubleshooting

If you encounter issues with your provider, here are some common problems and solutions:

### "Provider Not Found" Error
- Ensure your provider is properly staked at ar://randao
- Wait for blockchain confirmation (it may take some time for your stake to be recognized)
- Check your wallet configuration in the `.env` file

### Network Connectivity Issues
- If your provider can't connect to the network, check your internet connection
- Check your firewall settings to ensure the required ports are open
- Wait for network conditions to improve before attempting to restart

### Slow or Unresponsive Provider
- Check system resources to ensure your host has sufficient CPU and memory
- Monitor the logs for any error messages or warnings:
```bash
docker-compose logs -f
```
- If the puzzle generator is struggling, consider scaling up your hardware

### General Issues
- Try restarting the containers:
```bash
docker-compose restart
```
- For more persistent issues, you can try a full reset:
```bash
docker-compose down
docker-compose up -d
```
- Ensure your container has the latest version:
```bash
docker-compose pull
docker-compose down
docker-compose up -d
```

### Database Issues
- If the database container fails to start, check logs for specific errors:
```bash
docker-compose logs db
```
- Ensure the database password in your `.env` file doesn't contain special characters that need escaping
- Verify database volume permissions if running on Linux

---

## Frequently Asked Questions

### What is a randomness provider?
A randomness provider generates verifiable random numbers that are used in various decentralized applications on the blockchain. These random numbers are crucial for fair and transparent operation of many applications.

### How do I earn rewards?
You earn rewards by providing random values to users who request them. The rewards depend on your provider's performance, reliability, and response time.

### What happens if my provider goes offline?
If your provider goes offline without following the graceful shutdown procedure, you may be penalized (slashed). Always follow the [Graceful Shutdown](#graceful-shutdown) procedure before taking your provider offline.

### How much can I earn as a provider?
Earnings depend on network demand, your provider's performance, and the amount you have staked. Better-performing providers with higher stakes tend to earn more.

### Can I run multiple providers?
Yes, you can run multiple providers. Each provider needs its own unique wallet and must be staked separately.

### What is the recommended hardware for optimal performance?
While the minimum requirements are 4GB RAM and 2 CPU cores, we recommend at least 8GB RAM and 4 CPU cores for optimal performance.

### Do I need technical knowledge to run a provider?
Basic familiarity with command line operations and Docker is helpful, but the quickstart guide is designed to be accessible even to those with limited technical experience.

### How often do I need to update my provider?
Updates will be announced in the community channels. We recommend keeping your provider updated to the latest version for optimal performance and security.

---

Thank you for contributing to the network's success!
4 changes: 4 additions & 0 deletions docker-compose/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DB_USER=myuser
DB_PASSWORD=mypassword
DB_NAME=mydatabase
DOCKER_NETWORK=backend
Loading