Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 19 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,23 @@ jobs:
mkdir -p "${PKG}/lib" "${PKG}/config" "${PKG}/web-static" "${PKG}/explorer"
cp "build_${COIN}/src/c2pool/c2pool-${COIN}" "${PKG}/"
strip "${PKG}/c2pool-${COIN}"
for lib in libleveldb.so.1 libsecp256k1.so.2 libsnappy.so.1; do
found=$(find /usr/lib -name "${lib}*" -type f 2>/dev/null | head -1)
[ -n "$found" ] && cp "$found" "${PKG}/lib/"
# Bundle the real runtime shared-library closure resolved from the freshly
# built binary via ldd (SONAME-agnostic). v0.2.3 shipped every Linux tarball
# DOA: this step hardcoded libsecp256k1.so.2 while the runner's
# libsecp256k1-dev provides .so.1 — find matched nothing and the binary's
# only dynamic non-glibc dependency went unbundled. Resolve, don't guess.
ldd "${PKG}/c2pool-${COIN}" | awk '/=> \//{print $3}' | while read -r so; do
case "$(basename "$so")" in
libc.so*|libm.so*|libdl.so*|librt.so*|libpthread.so*|ld-linux*|libstdc++.so*|libgcc_s.so*|libresolv.so*) continue ;;
esac
cp -Lv "$so" "${PKG}/lib/"
done
cp start.sh "${PKG}/" && chmod +x "${PKG}/start.sh"
cp config/c2pool_mainnet.yaml "${PKG}/config/c2pool_mainnet.yaml.example" || true
cp config/c2pool_testnet.yaml "${PKG}/config/" || true
cp "config/${COIN}/c2pool_mainnet.yaml" "${PKG}/config/c2pool_mainnet.yaml.example"
cp "config/${COIN}/c2pool_testnet.yaml" "${PKG}/config/c2pool_testnet.yaml"
# Fail-fast packaging tripwires (BUG A / BUG B regression guards):
ls "${PKG}/lib/" | grep -q '^libsecp256k1\.so' || { echo "PKG-ASSERT FAIL: libsecp256k1 not bundled in ${PKG}/lib"; exit 1; }
head -1 "${PKG}/config/c2pool_mainnet.yaml.example" | grep -qi "${COIN}" || { echo "PKG-ASSERT FAIL: ${PKG} config header does not identify ${COIN}"; exit 1; }
cp -r web-static/* "${PKG}/web-static/"
cp explorer/explorer.py "${PKG}/explorer/"
tar czf "${PKG}.tar.gz" "${PKG}/"
Expand Down Expand Up @@ -304,7 +314,8 @@ jobs:
install_name_tool -id "@executable_path/lib/$(basename $lib)" "$lib"
done
cp start.sh "${PKG}/" && chmod +x "${PKG}/start.sh"
cp config/c2pool_mainnet.yaml "${PKG}/config/c2pool_mainnet.yaml.example" || true
cp "config/${COIN}/c2pool_mainnet.yaml" "${PKG}/config/c2pool_mainnet.yaml.example"
cp "config/${COIN}/c2pool_testnet.yaml" "${PKG}/config/c2pool_testnet.yaml"
cp -r web-static/* "${PKG}/web-static/"
cp explorer/explorer.py "${PKG}/explorer/"

Expand Down Expand Up @@ -577,8 +588,8 @@ jobs:
Copy-Item start.bat "${PKG}/"
Copy-Item -Recurse web-static/* "${PKG}/web-static/"
Copy-Item explorer/explorer.py "${PKG}/explorer/"
Copy-Item config/c2pool_mainnet.yaml "${PKG}/config/c2pool_mainnet.yaml.example"
Copy-Item config/c2pool_testnet.yaml "${PKG}/config/" -ErrorAction SilentlyContinue
Copy-Item "config/${COIN}/c2pool_mainnet.yaml" "${PKG}/config/c2pool_mainnet.yaml.example"
Copy-Item "config/${COIN}/c2pool_testnet.yaml" "${PKG}/config/c2pool_testnet.yaml"
Compress-Archive -Path "${PKG}" -DestinationPath "${PKG}.zip"

- name: Upload package
Expand Down
31 changes: 31 additions & 0 deletions config/bch/c2pool_mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# C2Pool Bitcoin Cash [BCH] Mainnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
port: 9349 # p2pool sharechain P2P port (BCH mainnet default)
# stratum_port: # Stratum is opt-in for this coin: enable with --stratum [HOST:]PORT
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display
#
# Port forwarding (if behind NAT/firewall):
# 9349 TCP — P2P sharechain (REQUIRED for full p2pool participation)
# 8333 TCP — BCH coin P2P (recommended for faster daemon sync)

# --- Operating mode ----------------------------------------------------------
# Deployment: EXTERNAL BCHN (bitcoind-cash) RPC for block templates.
# Run a full BCHN node and set the bch_rpc_* fields below.

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# bch_rpc_host: 127.0.0.1
# bch_rpc_port: # your BCH daemon's RPC port
# bch_rpc_user: user
# bch_rpc_password: pass

27 changes: 27 additions & 0 deletions config/bch/c2pool_testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# C2Pool Bitcoin Cash [BCH] Testnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
# port: # BCH testnet sharechain port — binary default applies; set to override
# stratum_port: # Stratum is opt-in for this coin: enable with --stratum [HOST:]PORT
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display

# --- Operating mode ----------------------------------------------------------
# Deployment: EXTERNAL BCHN (bitcoind-cash) RPC for block templates.
# Run a full BCHN node and set the bch_rpc_* fields below.

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# bch_rpc_host: 127.0.0.1
# bch_rpc_port: # your BCH daemon's RPC port
# bch_rpc_user: user
# bch_rpc_password: pass

31 changes: 31 additions & 0 deletions config/btc/c2pool_mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# C2Pool Bitcoin [BTC] Mainnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
port: 9333 # p2pool sharechain P2P port (BTC mainnet default)
# stratum_port: # Stratum is opt-in for this coin: enable with --stratum [HOST:]PORT
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display
#
# Port forwarding (if behind NAT/firewall):
# 9333 TCP — P2P sharechain (REQUIRED for full p2pool participation)
# 8333 TCP — BTC coin P2P (recommended for faster daemon sync)

# --- Operating mode ----------------------------------------------------------
# Deployment: EXTERNAL bitcoind RPC for block templates (getblocktemplate).
# Run a full bitcoind and set the btc_rpc_* fields below.

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# btc_rpc_host: 127.0.0.1
# btc_rpc_port: # your BTC daemon's RPC port
# btc_rpc_user: user
# btc_rpc_password: pass

27 changes: 27 additions & 0 deletions config/btc/c2pool_testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# C2Pool Bitcoin [BTC] Testnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
# port: # BTC testnet sharechain port — binary default applies; set to override
# stratum_port: # Stratum is opt-in for this coin: enable with --stratum [HOST:]PORT
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display

# --- Operating mode ----------------------------------------------------------
# Deployment: EXTERNAL bitcoind RPC for block templates (getblocktemplate).
# Run a full bitcoind and set the btc_rpc_* fields below.

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# btc_rpc_host: 127.0.0.1
# btc_rpc_port: # your BTC daemon's RPC port
# btc_rpc_user: user
# btc_rpc_password: pass

34 changes: 34 additions & 0 deletions config/dash/c2pool_mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# C2Pool Dash [DASH] Mainnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
port: 8999 # p2pool sharechain P2P port (DASH mainnet default)
stratum_port: 7903 # Stratum mining port
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display
#
# Port forwarding (if behind NAT/firewall):
# 8999 TCP — P2P sharechain (REQUIRED for full p2pool participation)
# 7903 TCP — Stratum mining (REQUIRED for miners to connect)
# 9999 TCP — DASH coin P2P (recommended for faster daemon sync)

# --- Operating mode ----------------------------------------------------------
# Deployment: EXTERNAL dashd RPC fallback. Embedded Dash SPV is NOT wired
# on this release (tracked in #738) — do not rely on embedded mode. Point
# the dash_rpc_* fields below at a running dashd for block templates.
# embedded_dash: false # (unavailable this release)

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# dash_rpc_host: 127.0.0.1
# dash_rpc_port: # your DASH daemon's RPC port
# dash_rpc_user: user
# dash_rpc_password: pass

34 changes: 34 additions & 0 deletions config/dash/c2pool_testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# C2Pool Dash [DASH] Testnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
port: 18999 # p2pool sharechain P2P port (DASH testnet default)
stratum_port: 17903 # Stratum mining port
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display
#
# Port forwarding (if behind NAT/firewall):
# 18999 TCP — P2P sharechain (REQUIRED for full p2pool participation)
# 17903 TCP — Stratum mining (REQUIRED for miners to connect)
# 9999 TCP — DASH coin P2P (recommended for faster daemon sync)

# --- Operating mode ----------------------------------------------------------
# Deployment: EXTERNAL dashd RPC fallback. Embedded Dash SPV is NOT wired
# on this release (tracked in #738) — do not rely on embedded mode. Point
# the dash_rpc_* fields below at a running dashd for block templates.
# embedded_dash: false # (unavailable this release)

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# dash_rpc_host: 127.0.0.1
# dash_rpc_port: # your DASH daemon's RPC port
# dash_rpc_user: user
# dash_rpc_password: pass

32 changes: 32 additions & 0 deletions config/dgb/c2pool_mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# C2Pool DigiByte [DGB] Mainnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
port: 5024 # p2pool sharechain P2P port (DGB mainnet default)
stratum_port: 5025 # Stratum mining port
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display
#
# Port forwarding (if behind NAT/firewall):
# 5024 TCP — P2P sharechain (REQUIRED for full p2pool participation)
# 5025 TCP — Stratum mining (REQUIRED for miners to connect)
# 12024 TCP — DGB coin P2P (recommended for faster daemon sync)

# --- Operating mode ----------------------------------------------------------
# Deployment: DigiByte daemon RPC. Run digibyted and set the dgb_rpc_*
# fields below. See `./c2pool-dgb --help` for algo/mode options.

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# dgb_rpc_host: 127.0.0.1
# dgb_rpc_port: # your DGB daemon's RPC port
# dgb_rpc_user: user
# dgb_rpc_password: pass

27 changes: 27 additions & 0 deletions config/dgb/c2pool_testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# C2Pool DigiByte [DGB] Testnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
# port: # DGB testnet sharechain port — binary default applies; set to override
# stratum_port: # Stratum is opt-in for this coin: enable with --stratum [HOST:]PORT
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display

# --- Operating mode ----------------------------------------------------------
# Deployment: DigiByte daemon RPC. Run digibyted and set the dgb_rpc_*
# fields below. See `./c2pool-dgb --help` for algo/mode options.

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# dgb_rpc_host: 127.0.0.1
# dgb_rpc_port: # your DGB daemon's RPC port
# dgb_rpc_user: user
# dgb_rpc_password: pass

35 changes: 35 additions & 0 deletions config/ltc/c2pool_mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# C2Pool Litecoin [LTC] Mainnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
port: 9326 # p2pool sharechain P2P port (LTC mainnet default)
stratum_port: 9327 # Stratum mining port
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display
#
# Port forwarding (if behind NAT/firewall):
# 9326 TCP — P2P sharechain (REQUIRED for full p2pool participation)
# 9327 TCP — Stratum mining (REQUIRED for miners to connect)
# 9333 TCP — LTC coin P2P (recommended for faster daemon sync)

# --- Operating mode ----------------------------------------------------------
# Default: integrated P2P pool with EMBEDDED LTC + DOGE SPV nodes.
# Zero-config — no litecoind/dogecoind daemon required.
embedded_ltc: true # Embedded LTC SPV (default)
embedded_doge: true # Embedded DOGE SPV for merged mining (default)

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
header_checkpoint: "3088000:4a7fc8d4668c69db4f40fcdeb99ad3dbd85545b742b48e1529ebbec641e547d1"
doge_header_checkpoint: "6160000:51efd04daebddba43ae403662098524d99abf3edad3bddc3ea7b2938c6799939"

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# ltc_rpc_host: 127.0.0.1
# ltc_rpc_port: # your LTC daemon's RPC port
# ltc_rpc_user: user
# ltc_rpc_password: pass

34 changes: 34 additions & 0 deletions config/ltc/c2pool_testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# C2Pool Litecoin [LTC] Testnet Configuration
#
# Zero-config startup: run ./start.sh (Linux/macOS) or start.bat (Windows).
# Miners set their payout address as the stratum username (p2pool-style).
# CLI arguments always override values set here.

# --- Network -----------------------------------------------------------------
port: 19326 # p2pool sharechain P2P port (LTC testnet default)
stratum_port: 19327 # Stratum mining port
web_port: 8080 # Web dashboard / JSON-RPC API port
http_host: "0.0.0.0" # HTTP bind address
# external_ip: "" # Public IP/domain for stratum URL display
#
# Port forwarding (if behind NAT/firewall):
# 19326 TCP — P2P sharechain (REQUIRED for full p2pool participation)
# 19327 TCP — Stratum mining (REQUIRED for miners to connect)
# 9333 TCP — LTC coin P2P (recommended for faster daemon sync)

# --- Operating mode ----------------------------------------------------------
# Default: integrated P2P pool with EMBEDDED LTC + DOGE SPV nodes.
# Zero-config — no litecoind/dogecoind daemon required.
embedded_ltc: true # Embedded LTC SPV (default)
embedded_doge: true # Embedded DOGE SPV for merged mining (default)

# --- Bootstrap header checkpoint (optional) ----------------------------------
# Skip old headers on first sync. Format: HEIGHT:BLOCK_HASH
# header_checkpoint: "HEIGHT:BLOCK_HASH" # set for faster first sync

# --- Coin daemon RPC (for non-embedded / daemon mode) ------------------------
# ltc_rpc_host: 127.0.0.1
# ltc_rpc_port: # your LTC daemon's RPC port
# ltc_rpc_user: user
# ltc_rpc_password: pass

13 changes: 13 additions & 0 deletions start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ if "!BIN!"=="" (
)
for %%f in ("!BIN!") do set BINNAME=%%~nxf

:: Coin-guard: refuse a binary/config coin mismatch (see start.sh).
for /f "tokens=2 delims=-." %%c in ("!BINNAME!") do set BINCOIN=%%c
if exist "%CONFIG%" (
set /p CFGHDR=<"%CONFIG%"
echo !CFGHDR! | findstr /I "!BINCOIN!" >nul
if errorlevel 1 (
echo ERROR: config/coin mismatch - binary is c2pool-!BINCOIN! but config header reads:
echo !CFGHDR!
echo Launch with the coin-correct config, e.g.: %~nx0 config\c2pool_mainnet.yaml
exit /b 1
)
)

echo === !BINNAME! ===
echo Config: %CONFIG%
echo Web: http://0.0.0.0:8080
Expand Down
Loading
Loading