Compare commits
3 Commits
676984ba8e
...
v4.15.1
| Author | SHA1 | Date | |
|---|---|---|---|
| b222b802bf | |||
| 2599d203bb | |||
| e4f8a390bb |
@@ -9,7 +9,7 @@ on:
|
||||
env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
PRODUCT_NAME: "p2pool"
|
||||
PACKAGE_VERSION: "v4.13"
|
||||
PACKAGE_VERSION: "v4.15.1"
|
||||
BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
|
||||
|
||||
jobs:
|
||||
|
||||
+1
-1
@@ -3,9 +3,9 @@
|
||||
.idea/
|
||||
.vscode/
|
||||
.claude/
|
||||
.codex/
|
||||
|
||||
docs/
|
||||
example/
|
||||
llmdoc/
|
||||
|
||||
CLAUDE.md
|
||||
@@ -1,113 +0,0 @@
|
||||
# P2Pool Configuration File Guide
|
||||
|
||||
## Overview
|
||||
|
||||
P2Pool uses a configuration file (`params.conf`) to manage all runtime settings. This approach provides several advantages over command-line parameters:
|
||||
|
||||
- **Upgrade Safety**: Configuration is preserved during package upgrades
|
||||
- **Centralized Management**: All settings in one location
|
||||
- **Documentation**: In-file comments explain each option
|
||||
- **Maintainability**: Easy to review and modify settings
|
||||
|
||||
## Configuration File Locations
|
||||
|
||||
### Debian Package Installation
|
||||
```
|
||||
/var/lib/p2pool/params.conf
|
||||
```
|
||||
|
||||
### Manual Installation
|
||||
```
|
||||
./params.conf (in the working directory)
|
||||
```
|
||||
|
||||
## Basic Configuration Example
|
||||
|
||||
```conf
|
||||
# Minimum required configuration
|
||||
host = 127.0.0.1
|
||||
rpc-port = 18081
|
||||
zmq-port = 18083
|
||||
wallet = 4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
See [params.conf.example](params.conf.example) for a comprehensive configuration template with all available options.
|
||||
|
||||
## Configuration Best Practices
|
||||
|
||||
1. **Always backup** your `params.conf` before making changes
|
||||
2. **Test changes** by running P2Pool manually before updating the systemd service
|
||||
3. **Use comments** to document your customizations
|
||||
4. **Keep sensitive data secure**: The config file contains your wallet address
|
||||
|
||||
## Switching from Command-Line to Configuration File
|
||||
|
||||
If you're currently using command-line parameters, you can convert them to a configuration file:
|
||||
|
||||
```bash
|
||||
# Old way (command-line)
|
||||
p2pool --host 127.0.0.1 --rpc-port 18081 --wallet YOUR_WALLET
|
||||
|
||||
# New way (configuration file)
|
||||
p2pool --params-file params.conf
|
||||
```
|
||||
|
||||
## Testing Your Configuration
|
||||
|
||||
```bash
|
||||
# Test configuration before starting the service
|
||||
sudo -u p2pool /opt/p2pool/p2pool --params-file /var/lib/p2pool/params.conf
|
||||
|
||||
# If everything looks good, start the service
|
||||
sudo systemctl start p2pool.service
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Configuration Not Loading
|
||||
|
||||
1. Check file permissions:
|
||||
```bash
|
||||
ls -l /var/lib/p2pool/params.conf
|
||||
# Should be readable by p2pool user
|
||||
```
|
||||
|
||||
2. Verify file syntax:
|
||||
```bash
|
||||
# No equal signs in comments
|
||||
# Use "key = value" format
|
||||
# One setting per line
|
||||
```
|
||||
|
||||
3. Check systemd service logs:
|
||||
```bash
|
||||
sudo journalctl -u p2pool -n 50
|
||||
```
|
||||
|
||||
### Common Mistakes
|
||||
|
||||
- ❌ Missing wallet address
|
||||
- ❌ Incorrect Monero node connection settings
|
||||
- ❌ Syntax errors (missing `=`, extra spaces)
|
||||
- ❌ Commented-out required settings
|
||||
|
||||
## Migration from Older Versions
|
||||
|
||||
If you're upgrading from a version that used systemd service file configuration:
|
||||
|
||||
1. Copy your settings from the old service file
|
||||
2. Convert them to `params.conf` format
|
||||
3. Update the service file to use `--params-file`
|
||||
4. Restart the service
|
||||
|
||||
Example migration:
|
||||
```bash
|
||||
# Old (in systemd service)
|
||||
ExecStart=/opt/p2pool/p2pool --host 127.0.0.1 --wallet XXXXX
|
||||
|
||||
# New (in params.conf)
|
||||
host = 127.0.0.1
|
||||
wallet = XXXXX
|
||||
```
|
||||
@@ -42,36 +42,24 @@ sudo nano /var/lib/p2pool/params.conf
|
||||
sudo systemctl enable --now p2pool.service
|
||||
```
|
||||
|
||||
详细配置说明请查看:[README-params.md](README-params.md)
|
||||
|
||||
### 本地构建
|
||||
|
||||
```bash
|
||||
# Alpine 构建(推荐,体积更小)
|
||||
docker buildx build --pull \
|
||||
--platform linux/amd64 \
|
||||
--build-arg P2POOL_VERSION=v4.13 \
|
||||
--build-arg P2POOL_VERSION=v4.15.1 \
|
||||
--output type=local,dest=./output \
|
||||
-f docker/Dockerfile.alpine .
|
||||
|
||||
# Ubuntu 构建
|
||||
docker buildx build --pull \
|
||||
--platform linux/amd64 \
|
||||
--build-arg P2POOL_VERSION=v4.13 \
|
||||
--build-arg P2POOL_VERSION=v4.15.1 \
|
||||
--output type=local,dest=./output \
|
||||
-f docker/Dockerfile.ubuntu .
|
||||
```
|
||||
|
||||
## 📚 文档
|
||||
|
||||
完整的项目文档位于 [llmdoc/](llmdoc/) 目录:
|
||||
|
||||
- **[项目概述](llmdoc/overview/project-overview.md)** - 了解项目目的和架构
|
||||
- **[CI/CD 架构](llmdoc/architecture/cicd-architecture.md)** - 自动化构建流程
|
||||
- **[Docker 架构](llmdoc/architecture/docker-architecture.md)** - 多阶段构建系统
|
||||
- **[本地构建指南](llmdoc/guides/local-build.md)** - 开发者构建指南
|
||||
- **[Debian 包指南](llmdoc/guides/debian-package.md)** - 安装和配置
|
||||
|
||||
## 🏗️ 构建系统
|
||||
|
||||
### 支持的架构和平台
|
||||
@@ -88,25 +76,8 @@ docker buildx build --pull \
|
||||
|
||||
## 🔧 配置管理
|
||||
|
||||
本项目使用配置文件管理 P2Pool 设置,提供以下优势:
|
||||
|
||||
- ✅ **升级安全** - 配置文件在包升级时不会被覆盖
|
||||
- ✅ **集中管理** - 所有设置在一个位置
|
||||
- ✅ **易于维护** - 支持注释和版本控制
|
||||
|
||||
配置文件模板:[params.conf.example](params.conf.example)
|
||||
|
||||
## 📦 发布流程
|
||||
|
||||
项目使用 Gitea Actions 实现自动化 CI/CD:
|
||||
|
||||
1. **代码推送** → 触发构建(main/develop 分支)
|
||||
2. **创建标签** → 触发完整发布流程
|
||||
3. **自动构建** → 4 种组合(2 架构 × 2 发行版)
|
||||
4. **自动发布** → 上传到包注册中心
|
||||
5. **创建 Release** → 附带下载链接和说明
|
||||
|
||||
|
||||
## 🔐 安全性
|
||||
|
||||
- ✅ 禁用上游合并挖矿捐赠
|
||||
@@ -125,7 +96,6 @@ docker buildx build --pull \
|
||||
|
||||
- **上游项目**: [SChernykh/p2pool](https://github.com/SChernykh/p2pool)
|
||||
- **Monero**: [getmonero.org](https://www.getmonero.org/)
|
||||
- **项目文档**: [llmdoc/index.md](llmdoc/index.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@ set -e
|
||||
# 参数检查
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "Usage: $0 <ARCH> <VERSION> <TARGZ_FILE>"
|
||||
echo "Example: $0 amd64 v4.12 p2pool-amd64-ubuntu-v4.12.tar.gz"
|
||||
echo "Example: $0 amd64 v4.15.1 p2pool-amd64-ubuntu-v4.15.1.tar.gz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
+60
-3
@@ -1,5 +1,6 @@
|
||||
# P2Pool Configuration File Example
|
||||
# Copy this file to /var/lib/p2pool/params.conf and edit as needed
|
||||
# Compatible with: p2pool v4.15+
|
||||
|
||||
# =============================================================================
|
||||
# Monero Node Connection (REQUIRED)
|
||||
@@ -11,6 +12,7 @@ host = 127.0.0.1
|
||||
rpc-port = 18081
|
||||
|
||||
# Monero ZMQ port (required for optimal performance)
|
||||
# v4.14+: ZMQ connections now support IPv6 addresses
|
||||
zmq-port = 18083
|
||||
|
||||
# =============================================================================
|
||||
@@ -29,6 +31,16 @@ p2p = 0.0.0.0:37889
|
||||
# Add known peer nodes (optional)
|
||||
# addpeers = node1.p2pool.io:37889,node2.p2pool.io:37889
|
||||
|
||||
# HAProxy PROXY Protocol v2 for P2P connections (v4.14+)
|
||||
# Enable ONLY if p2pool's P2P port is behind a proxy that sends PROXY Protocol
|
||||
# v2 headers (e.g. HAProxy with "send-proxy-v2" directive).
|
||||
# When enabled, the real client IP is extracted from the PROXY header and used
|
||||
# for peer management, ban checks and logging — instead of the proxy's IP.
|
||||
# P2P traffic is typically low-volume and usually does NOT need load balancing;
|
||||
# leave commented out unless you have a specific reason to proxy P2P.
|
||||
# Leave commented to disable; uncomment to enable.
|
||||
# p2p-proxy-protocol = true
|
||||
|
||||
# =============================================================================
|
||||
# API Settings
|
||||
# =============================================================================
|
||||
@@ -50,15 +62,30 @@ local-api = true
|
||||
# =============================================================================
|
||||
# Enable stratum server for miners to connect
|
||||
# Format: <bind_ip>:<port>
|
||||
# Uncomment and configure if you want to connect mining software
|
||||
# stratum = 0.0.0.0:3333
|
||||
|
||||
# HAProxy PROXY Protocol v2 for Stratum connections (v4.14+)
|
||||
# Enable ONLY if p2pool's Stratum port is behind a proxy that sends PROXY
|
||||
# Protocol v2 headers (e.g. HAProxy with "send-proxy-v2" directive).
|
||||
# When enabled, miners' real IP addresses are correctly extracted and shown
|
||||
# in the `workers` command output, and per-IP ban/rate-limiting works properly.
|
||||
# This is an open standard also supported by nginx, Traefik, AWS ELB, etc.;
|
||||
# it is NOT tied to HAProxy specifically.
|
||||
#
|
||||
# ⚠️ TLV extensions (send-proxy-v2-ssl, send-proxy-v2-ssl-cn,
|
||||
# unique-id-format, crc32c) are silently ignored — only the address block
|
||||
# is read. Do NOT use exact addr_len checks in custom builds (spec §2.2
|
||||
# allows senders to append TLV vectors, increasing addr_len beyond the
|
||||
# base 12 / 36 bytes).
|
||||
#
|
||||
# Leave commented to disable; uncomment to enable.
|
||||
# stratum-proxy-protocol = true
|
||||
|
||||
# =============================================================================
|
||||
# Merge Mining (Optional)
|
||||
# =============================================================================
|
||||
# Enable Tari merge mining
|
||||
# Format: tari://<tari_node_ip>:<port> <tari_wallet_address>
|
||||
# Uncomment and configure if you want to merge mine Tari
|
||||
# merge-mine = tari://127.0.0.1:18142 YOUR_TARI_WALLET_ADDRESS
|
||||
|
||||
# =============================================================================
|
||||
@@ -70,10 +97,16 @@ log-file = /var/log/p2pool/p2pool.log
|
||||
# Log level (0 = none, 1 = fatal, 2 = error, 3 = warn, 4 = info, 5 = debug, 6 = trace)
|
||||
loglevel = 3
|
||||
|
||||
# Disable logging destinations (v4.15+)
|
||||
# Leave commented unless you want to disable logging output.
|
||||
# disable-log is equivalent to no-console-log + no-log-file and saves ~8 MB RAM.
|
||||
# no-console-log = true
|
||||
# no-log-file = true
|
||||
# disable-log = true
|
||||
|
||||
# =============================================================================
|
||||
# Performance Tuning (Advanced)
|
||||
# =============================================================================
|
||||
# Number of light cache blocks to keep in RAM
|
||||
# in-peers = 10
|
||||
# out-peers = 10
|
||||
|
||||
@@ -82,3 +115,27 @@ loglevel = 3
|
||||
# =============================================================================
|
||||
# SOCKS5 proxy for outgoing connections
|
||||
# socks5 = 127.0.0.1:9050
|
||||
|
||||
# SOCKS5 proxy type (v4.14+, i2p value added in v4.15)
|
||||
# Controls how p2pool treats the SOCKS5 proxy configured above.
|
||||
# Accepted values:
|
||||
# auto - auto-detect by port number (9050 = Tor, 4447 = I2P; default)
|
||||
# plain - treat as a standard SOCKS5 proxy (no Tor/I2P-specific behavior)
|
||||
# tor - treat as a Tor SOCKS5 proxy (enables .onion peer handling)
|
||||
# i2p - treat as an I2P SOCKS5 proxy (enables .b32.i2p peer handling)
|
||||
# Only meaningful when `socks5` is set; ignored otherwise.
|
||||
# socks5-proxy-type = auto
|
||||
|
||||
# I2P support (v4.15+)
|
||||
# Requires an I2P SOCKS proxy, usually 127.0.0.1:4447 with i2pd.
|
||||
# Recommended for I2P-only P2P to avoid clearnet/DNS/UPnP leaks:
|
||||
# socks5 = 127.0.0.1:4447
|
||||
# socks5-proxy-type = i2p
|
||||
# no-dns = true
|
||||
# no-upnp = true
|
||||
# no-clearnet-p2p = true
|
||||
#
|
||||
# Broadcast your I2P hidden service .b32.i2p address to peers.
|
||||
# This address is linked to shares mined by your wallet; use a dedicated
|
||||
# I2P address for mining.
|
||||
# i2p-address = YOUR_I2P_ADDRESS.b32.i2p
|
||||
|
||||
Reference in New Issue
Block a user