Files
xxxigcc/llmdoc/architecture/configuration-system.md
Wang Defa 20935a6c89
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -11s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -4s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 1s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 10s
Build and Release / release (push) Successful in 44s
添加 llmdoc 文档系统,升级版本至 3.4.8-xg1
- 初始化 llmdoc 文档系统(overview/architecture/guides/reference)
- 创建 9 个核心文档,涵盖项目概览、安装架构、配置系统等
- 升级 CI 工作流和构建脚本版本号至 3.4.8-xg1
- 添加 .gitignore 文件
2025-12-25 09:06:01 +08:00

62 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 配置系统架构
## 1. 身份
- **定义**XXXigCC 配置管理系统
- **目的**:为矿工和控制中心提供灵活、可动态调整的配置机制
## 2. 核心组件
- [script/install.sh](../../script/install.sh):配置生成和管理的核心逻辑
- `/etc/miner/xxxigcc/config.json``/etc/xxxigcc/config.json`:主配置文件
- 服务配置文件:定义服务启动参数
## 3. 执行流程
### 3.1 配置生成
安装脚本动态生成配置:
- 使用 `jq` 命令行工具精确修改 JSON 配置
- 支持命令行参数覆盖默认配置
### 3.2 配置应用
- 创建配置文件
- 使用 `replace_config()` 函数更新配置
- 通过服务文件将配置传递给守护进程
## 4. 配置参数
### 4.1 日志配置
- `log-file`:日志文件路径
- `verbose`:是否启用详细日志
### 4.2 矿池配置 (pools 数组)
- `url`:矿池地址
- `user`:钱包地址
- `pass`:矿池密码
- `tls`:是否启用 TLS
- `algo`:挖矿算法(默认 rx/0
- `nicehash`:是否启用 NiceHash 模式
- `keepalive`:是否保持连接
- `daemon`SOLO 挖矿模式
### 4.3 CPU 配置
- `cpu.rx`CPU 线程亲和性配置
- `randomx.1gb-pages`:是否启用 1GB 大页内存
### 4.4 CC控制中心配置
- `cc-client.enabled`:是否启用 CC
- `cc-client.servers[0].url`CC 服务器地址
- `cc-client.servers[0].access-token`CC 访问令牌
- `cc-client.servers[0].use-tls`CC 是否使用 TLS
### 4.5 捐赠设置
- `donate-level`:捐赠级别(默认为 0
- `donate-over-proxy`:是否通过代理捐赠
## 5. 设计原理
- 高度动态和可配置
- JSON 格式,易于读写和程序解析
- 支持细粒度配置,从矿池到 CPU 资源
- 内置默认值,降低使用复杂性