solo address param
This commit is contained in:
@@ -7,11 +7,11 @@
|
|||||||
- **Status**: ✅ **RUNNING**
|
- **Status**: ✅ **RUNNING**
|
||||||
- **Ports**: 9555 (P2P), 9556 (RPC)
|
- **Ports**: 9555 (P2P), 9556 (RPC)
|
||||||
- **Version**: v1.0.1.0-5cf3d4a11
|
- **Version**: v1.0.1.0-5cf3d4a11
|
||||||
- **Sync Status**: Initial block download (blocks: 0, headers: 0)
|
- **Sync Status**: ✅ **FULLY SYNCED** (blocks: 228,082, headers: 228,082)
|
||||||
|
|
||||||
### **2. Wallet Setup**
|
### **2. Wallet Setup**
|
||||||
- **Wallet Name**: `main`
|
- **Wallet Name**: `main`
|
||||||
- **RinCoin Address**: `rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q`
|
- **Default RinCoin Address**: `rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q`
|
||||||
- **RPC Credentials**:
|
- **RPC Credentials**:
|
||||||
- User: `rinrpc`
|
- User: `rinrpc`
|
||||||
- Password: `745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90`
|
- Password: `745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90`
|
||||||
@@ -29,8 +29,14 @@
|
|||||||
sudo docker exec -it amd-strix-halo-llama-rocm bash -c "/mnt/dl/rinhash/cpuminer-opt-rin/cpuminer -a rinhash -o stratum+tcp://rinhash.mine.zergpool.com:7148 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=RIN,ID=StrixHalo -t 32"
|
sudo docker exec -it amd-strix-halo-llama-rocm bash -c "/mnt/dl/rinhash/cpuminer-opt-rin/cpuminer -a rinhash -o stratum+tcp://rinhash.mine.zergpool.com:7148 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=RIN,ID=StrixHalo -t 32"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### **Solo Mining (Local Node)**
|
### **Solo Mining (Local Node)**
|
||||||
|
```bash
|
||||||
|
# Solo mining with default address
|
||||||
|
bash MINE/rin/solo_mining_core.sh
|
||||||
|
|
||||||
|
# Solo mining with custom address
|
||||||
|
bash MINE/rin/solo_mining_core.sh rin1qkeweeh2agurz5af3eullkvtl34kcmrwl2ytkvn
|
||||||
|
```
|
||||||
|
|
||||||
## build image
|
## build image
|
||||||
sudo bash -lc "cd /mnt/shared/DEV/repos/d-popov.com/scripts/MINE/rin && docker build -t rincoin-node:latest . | cat"
|
sudo bash -lc "cd /mnt/shared/DEV/repos/d-popov.com/scripts/MINE/rin && docker build -t rincoin-node:latest . | cat"
|
||||||
@@ -55,11 +61,6 @@ sudo docker exec rincoin-node rincoin-cli -datadir=/data -conf=/data/rincoin.con
|
|||||||
rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q
|
rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q
|
||||||
|
|
||||||
|
|
||||||
curl --user rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90 -H 'content-type: text/plain' --data '{"jsonrpc":"1.0","id":"curl","method":"getblockchaininfo","params":[]}' http://localhost:9556/
|
|
||||||
curl --user rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90 \
|
|
||||||
-H 'content-type: text/plain' \
|
|
||||||
--data '{"jsonrpc":"1.0","id":"curl","method":"getnewaddress","params":[]}' \
|
|
||||||
http://localhost:9556/
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Solo mining to your RinCoin wallet
|
# Solo mining to your RinCoin wallet
|
||||||
@@ -71,7 +72,7 @@ curl --user rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90 \
|
|||||||
| Mining Type | Algorithm | Hashrate | Target | Status |
|
| Mining Type | Algorithm | Hashrate | Target | Status |
|
||||||
|-------------|-----------|----------|---------|---------|
|
|-------------|-----------|----------|---------|---------|
|
||||||
| **Pool Mining** | RinHash | ~80 kH/s | Zergpool | ✅ Working |
|
| **Pool Mining** | RinHash | ~80 kH/s | Zergpool | ✅ Working |
|
||||||
| **Solo Mining** | RinHash | ~80 kH/s | Local Node | ✅ Ready |
|
| **Solo Mining** | RinHash | Built-in CPU | Local Node | ✅ Working |
|
||||||
| **GPU Mining** | Equihash 125,4 | 28.8 Sol/s | Zergpool | ✅ Working |
|
| **GPU Mining** | Equihash 125,4 | 28.8 Sol/s | Zergpool | ✅ Working |
|
||||||
|
|
||||||
## 🔧 **Management Commands:**
|
## 🔧 **Management Commands:**
|
||||||
@@ -100,15 +101,31 @@ sudo docker exec rincoin-node rincoin-cli -datadir=/data -conf=/data/rincoin.con
|
|||||||
sudo docker exec rincoin-node rincoin-cli -datadir=/data -conf=/data/rincoin.conf -rpcwallet=main getbalance
|
sudo docker exec rincoin-node rincoin-cli -datadir=/data -conf=/data/rincoin.conf -rpcwallet=main getbalance
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### **RPC Access**
|
||||||
|
```bash
|
||||||
|
# Test RPC connection
|
||||||
|
curl --user rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90 \
|
||||||
|
-H 'content-type: text/plain' \
|
||||||
|
--data '{"jsonrpc":"1.0","id":"curl","method":"getblockchaininfo","params":[]}' \
|
||||||
|
http://127.0.0.1:9556/
|
||||||
|
|
||||||
|
# Get new address via RPC
|
||||||
|
curl --user rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90 \
|
||||||
|
-H 'content-type: text/plain' \
|
||||||
|
--data '{"jsonrpc":"1.0","id":"curl","method":"getnewaddress","params":[]}' \
|
||||||
|
http://127.0.0.1:9556/
|
||||||
|
```
|
||||||
|
|
||||||
## ⚠️ **Important Notes:**
|
## ⚠️ **Important Notes:**
|
||||||
|
|
||||||
1. **Node Sync**: The node is currently in initial block download. Solo mining will work better once fully synced.
|
1. **Node Sync**: ✅ **COMPLETE** - Node is fully synced and ready
|
||||||
2. **Solo Mining**: Very low chance of finding blocks solo. Consider pool mining for consistent rewards.
|
2. **Solo Mining**: Very low chance of finding blocks solo. Consider pool mining for consistent rewards.
|
||||||
3. **RPC Access**: RPC is bound to all interfaces (0.0.0.0/0) - consider restricting for security.
|
3. **RPC Access**: ✅ **WORKING** - RPC is accessible on port 9556
|
||||||
|
4. **Address Parameter**: Solo mining script accepts custom addresses or uses default
|
||||||
|
|
||||||
## 🎯 **Next Steps:**
|
## 🎯 **Next Steps:**
|
||||||
|
|
||||||
1. **Wait for node sync** (may take hours depending on network)
|
1. ✅ **Node is synced** - Ready for all operations
|
||||||
2. **Choose mining strategy**: Pool mining for consistent income vs Solo mining for block rewards
|
2. **Choose mining strategy**: Pool mining for consistent income vs Solo mining for block rewards
|
||||||
3. **Monitor performance** and adjust thread count as needed
|
3. **Monitor performance** and adjust thread count as needed
|
||||||
4. **Set up monitoring** for node health and mining performance
|
4. **Set up monitoring** for node health and mining performance
|
||||||
|
@@ -3,6 +3,23 @@
|
|||||||
# RinCoin Solo Mining using Built-in Core Mining
|
# RinCoin Solo Mining using Built-in Core Mining
|
||||||
# Uses RinCoin Core's generatetoaddress command
|
# Uses RinCoin Core's generatetoaddress command
|
||||||
|
|
||||||
|
# Default address (can be overridden with command line parameter)
|
||||||
|
DEFAULT_ADDRESS="rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q"
|
||||||
|
|
||||||
|
# Parse command line arguments
|
||||||
|
RIN_ADDRESS=""
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
RIN_ADDRESS="$1"
|
||||||
|
echo "Using provided address: $RIN_ADDRESS"
|
||||||
|
elif [ $# -gt 1 ]; then
|
||||||
|
echo "Usage: $0 [rincoin_address]"
|
||||||
|
echo "If no address is provided, will use default: $DEFAULT_ADDRESS"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
RIN_ADDRESS="$DEFAULT_ADDRESS"
|
||||||
|
echo "No address provided, using default: $RIN_ADDRESS"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "=== RinCoin Solo Mining (Built-in Core Mining) ==="
|
echo "=== RinCoin Solo Mining (Built-in Core Mining) ==="
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -37,18 +54,24 @@ done
|
|||||||
echo "✅ Node is ready!"
|
echo "✅ Node is ready!"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Get wallet address
|
# Load wallet if not already loaded
|
||||||
echo "Getting wallet address..."
|
echo "Loading wallet..."
|
||||||
wallet_response=$(call_rpc "getnewaddress" "[]")
|
wallet_response=$(call_rpc "loadwallet" "[\"main\"]")
|
||||||
rin_address=$(echo "$wallet_response" | grep -o '"result":"[^"]*"' | cut -d'"' -f4)
|
if [[ $wallet_response == *"error"* ]] && [[ $wallet_response == *"already loaded"* ]]; then
|
||||||
|
echo "✅ Wallet already loaded"
|
||||||
|
else
|
||||||
|
echo "✅ Wallet loaded successfully"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
if [ -z "$rin_address" ]; then
|
# Validate the provided address (basic check)
|
||||||
echo "❌ Error: Could not get RinCoin address!"
|
if [[ ! "$RIN_ADDRESS" =~ ^rin1[a-zA-Z0-9]{25,}$ ]]; then
|
||||||
echo "Response: $wallet_response"
|
echo "❌ Error: Invalid RinCoin address format: $RIN_ADDRESS"
|
||||||
|
echo "RinCoin addresses should start with 'rin1' and be ~30 characters long"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✅ RinCoin Address: $rin_address"
|
echo "✅ Using RinCoin Address: $RIN_ADDRESS"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Get blockchain info
|
# Get blockchain info
|
||||||
@@ -71,7 +94,7 @@ echo "4. Best for testing, not profitable mining"
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "🚀 Starting Built-in Solo Mining..."
|
echo "🚀 Starting Built-in Solo Mining..."
|
||||||
echo "Target Address: $rin_address"
|
echo "Target Address: $RIN_ADDRESS"
|
||||||
echo "Press Ctrl+C to stop mining"
|
echo "Press Ctrl+C to stop mining"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -79,7 +102,7 @@ echo ""
|
|||||||
while true; do
|
while true; do
|
||||||
echo "Attempting to mine 1 block..."
|
echo "Attempting to mine 1 block..."
|
||||||
|
|
||||||
mining_result=$(call_rpc "generatetoaddress" "[1, \"$rin_address\", 1000000]")
|
mining_result=$(call_rpc "generatetoaddress" "[1, \"$RIN_ADDRESS\", 1000000]")
|
||||||
|
|
||||||
if [[ $mining_result == *"result"* ]] && [[ $mining_result != *"[]"* ]]; then
|
if [[ $mining_result == *"result"* ]] && [[ $mining_result != *"[]"* ]]; then
|
||||||
echo "🎉 BLOCK FOUND!"
|
echo "🎉 BLOCK FOUND!"
|
||||||
|
Reference in New Issue
Block a user