Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b222b802bf | |||
| 2599d203bb |
@@ -9,7 +9,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1"
|
||||||
PRODUCT_NAME: "p2pool"
|
PRODUCT_NAME: "p2pool"
|
||||||
PACKAGE_VERSION: "v4.14"
|
PACKAGE_VERSION: "v4.15.1"
|
||||||
BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
|
BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
+1
-1
@@ -3,9 +3,9 @@
|
|||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
.claude/
|
.claude/
|
||||||
|
.codex/
|
||||||
|
|
||||||
docs/
|
docs/
|
||||||
example/
|
example/
|
||||||
llmdoc/
|
|
||||||
|
|
||||||
CLAUDE.md
|
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
|
sudo systemctl enable --now p2pool.service
|
||||||
```
|
```
|
||||||
|
|
||||||
详细配置说明请查看:[README-params.md](README-params.md)
|
|
||||||
|
|
||||||
### 本地构建
|
### 本地构建
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Alpine 构建(推荐,体积更小)
|
# Alpine 构建(推荐,体积更小)
|
||||||
docker buildx build --pull \
|
docker buildx build --pull \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--build-arg P2POOL_VERSION=v4.14 \
|
--build-arg P2POOL_VERSION=v4.15.1 \
|
||||||
--output type=local,dest=./output \
|
--output type=local,dest=./output \
|
||||||
-f docker/Dockerfile.alpine .
|
-f docker/Dockerfile.alpine .
|
||||||
|
|
||||||
# Ubuntu 构建
|
# Ubuntu 构建
|
||||||
docker buildx build --pull \
|
docker buildx build --pull \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--build-arg P2POOL_VERSION=v4.14 \
|
--build-arg P2POOL_VERSION=v4.15.1 \
|
||||||
--output type=local,dest=./output \
|
--output type=local,dest=./output \
|
||||||
-f docker/Dockerfile.ubuntu .
|
-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)
|
配置文件模板:[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)
|
- **上游项目**: [SChernykh/p2pool](https://github.com/SChernykh/p2pool)
|
||||||
- **Monero**: [getmonero.org](https://www.getmonero.org/)
|
- **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
|
if [ $# -ne 3 ]; then
|
||||||
echo "Usage: $0 <ARCH> <VERSION> <TARGZ_FILE>"
|
echo "Usage: $0 <ARCH> <VERSION> <TARGZ_FILE>"
|
||||||
echo "Example: $0 amd64 v4.14 p2pool-amd64-ubuntu-v4.14.tar.gz"
|
echo "Example: $0 amd64 v4.15.1 p2pool-amd64-ubuntu-v4.15.1.tar.gz"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+32
-11
@@ -1,6 +1,6 @@
|
|||||||
# P2Pool Configuration File Example
|
# P2Pool Configuration File Example
|
||||||
# Copy this file to /var/lib/p2pool/params.conf and edit as needed
|
# Copy this file to /var/lib/p2pool/params.conf and edit as needed
|
||||||
# Compatible with: p2pool v4.14+
|
# Compatible with: p2pool v4.15+
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Monero Node Connection (REQUIRED)
|
# Monero Node Connection (REQUIRED)
|
||||||
@@ -38,8 +38,8 @@ p2p = 0.0.0.0:37889
|
|||||||
# for peer management, ban checks and logging — instead of the proxy's IP.
|
# 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;
|
# 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 out unless you have a specific reason to proxy P2P.
|
||||||
# Accepted values: none (default), v2
|
# Leave commented to disable; uncomment to enable.
|
||||||
# p2p-proxy-protocol = none
|
# p2p-proxy-protocol = true
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# API Settings
|
# API Settings
|
||||||
@@ -78,8 +78,8 @@ local-api = true
|
|||||||
# allows senders to append TLV vectors, increasing addr_len beyond the
|
# allows senders to append TLV vectors, increasing addr_len beyond the
|
||||||
# base 12 / 36 bytes).
|
# base 12 / 36 bytes).
|
||||||
#
|
#
|
||||||
# Accepted values: none (default), v2
|
# Leave commented to disable; uncomment to enable.
|
||||||
# stratum-proxy-protocol = none
|
# stratum-proxy-protocol = true
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Merge Mining (Optional)
|
# Merge Mining (Optional)
|
||||||
@@ -97,6 +97,13 @@ log-file = /var/log/p2pool/p2pool.log
|
|||||||
# Log level (0 = none, 1 = fatal, 2 = error, 3 = warn, 4 = info, 5 = debug, 6 = trace)
|
# Log level (0 = none, 1 = fatal, 2 = error, 3 = warn, 4 = info, 5 = debug, 6 = trace)
|
||||||
loglevel = 3
|
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)
|
# Performance Tuning (Advanced)
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
@@ -109,12 +116,26 @@ loglevel = 3
|
|||||||
# SOCKS5 proxy for outgoing connections
|
# SOCKS5 proxy for outgoing connections
|
||||||
# socks5 = 127.0.0.1:9050
|
# socks5 = 127.0.0.1:9050
|
||||||
|
|
||||||
# SOCKS5 proxy type (v4.14+)
|
# SOCKS5 proxy type (v4.14+, i2p value added in v4.15)
|
||||||
# Controls how p2pool treats the SOCKS5 proxy configured above.
|
# Controls how p2pool treats the SOCKS5 proxy configured above.
|
||||||
# Accepted values:
|
# Accepted values:
|
||||||
# auto — auto-detect whether it is a plain proxy or Tor (default)
|
# auto - auto-detect by port number (9050 = Tor, 4447 = I2P; default)
|
||||||
# plain — treat as a standard SOCKS5 proxy (no Tor-specific behavior)
|
# plain - treat as a standard SOCKS5 proxy (no Tor/I2P-specific behavior)
|
||||||
# tor — treat as a Tor SOCKS5 proxy (enables onion routing optimizations,
|
# tor - treat as a Tor SOCKS5 proxy (enables .onion peer handling)
|
||||||
# e.g. .onion peer resolution, correct onion connection counters)
|
# i2p - treat as an I2P SOCKS5 proxy (enables .b32.i2p peer handling)
|
||||||
# Only meaningful when `socks5` is set; ignored otherwise.
|
# Only meaningful when `socks5` is set; ignored otherwise.
|
||||||
# socks5-proxy-type = auto
|
# 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