Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Ckpool proxy #59

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
24 changes: 24 additions & 0 deletions conf/ckpool.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"btcd": [
{
"url": "http://10.5.0.21:18332",
"auth": "username",
"pass": "password",
"notify": false
}
],
"btcsig": "/mined by docker-ckpool/",
"blockpoll": 100,
"nonce1length": 4,
"nonce2length": 8,
"update_interval": 30,
"version_mask": "1fffe000",
"serverurl": [
"10.5.0.40:3332"
],
"mindiff": 1,
"startdiff": 1,
"maxdiff": 1,
"zmqblock": "tcp://10.5.0.16:28332",
"logdir": "logs"
}
17 changes: 17 additions & 0 deletions conf/ckproxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"proxy" : [
{
"url" : "10.5.0.19:3333",
"auth" : "tb1qa0sm0hxzj0x25rh8gw5xlzwlsfvvyz8u96w3p8.sv2-gitgab19",
"pass" : ""
}
],
"update_interval" : 30,
"serverurl" : ["0.0.0.0:3333"],
"mindiff" : 1,
"startdiff" : 1,
"maxdiff" : 1,
"logdir" : "logs"
}

# ./minerd -a sha256d -o stratum+tcp://127.0.0.1:3333 -q -D -P -u tb1qa0sm0hxzj0x25rh8gw5xlzwlsfvvyz8u96w3p8.sv2-gitgab19
48 changes: 44 additions & 4 deletions docker-compose-config-a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,46 @@ services:
cap_add:
- NET_ADMIN

sv1-ckpool:
container_name: sv1-ckpool
labels:
logging: "config-c"
build:
context: .
dockerfile: ./sv1-ckpool.dockerfile
# ports:
# - "3332:3332"
volumes:
- "./conf:/ckpool-solo/src/conf"
restart: unless-stopped
networks:
sv2-net:
ipv4_address: 10.5.0.40
healthcheck:
test: ["CMD-SHELL", "curl --silent --user username:password --data-binary '{\"jsonrpc\":\"1.0\",\"id\":\"healthcheck\",\"method\":\"getblockchaininfo\",\"params\":[]}' -H 'Content-Type: application/json' http://10.5.0.16:18332/ | jq -e '.result.initialblockdownload == false' || exit 1"]
interval: 30s
timeout: 10s
retries: 10
start_period: 10s

sv1-ckproxy:
container_name: sv1-ckproxy
labels:
logging: "config-c"
build:
context: .
dockerfile: ./sv1-ckproxy.dockerfile
ports:
- "3333:3333"
volumes:
- "./conf:/ckpool-solo/src/conf"
restart: unless-stopped
depends_on:
- sv1-pool
networks:
sv2-net:
ipv4_address: 10.5.0.41

sv1-pool-miner-proxy:
image: sv1-custom-proxy-builder-image
labels:
Expand All @@ -352,17 +392,17 @@ services:
"/usr/local/bin/monitor_and_apply_latency.sh 10.5.0.8 2 & exec ./target/release/sv1-custom-proxy",
]
ports:
- "3333:3333"
# - "3333:3333"
- "2345:2345"
environment:
- SERVER=10.5.0.8:3332
- CLIENT=0.0.0.0:3333
- SERVER=10.5.0.40:3332
- CLIENT=10.5.0.19:3333
- PROM_ADDRESS=10.5.0.19:2345
- PROXY_TYPE=pool-miner
container_name: sv1-pool-miner-proxy
depends_on:
- sv1-custom-proxy-builder
- sv1-pool
- sv1-ckpool
restart: unless-stopped
networks:
sv2-net:
Expand Down
46 changes: 44 additions & 2 deletions docker-compose-config-c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ services:
- "38333:18333"
- "28332:18332"
- "18443:18443"
- "8332:8332"
container_name: sv1-node-pool-side
depends_on:
- common-template-provider-builder
Expand Down Expand Up @@ -281,11 +282,11 @@ services:
"/usr/local/bin/monitor_and_apply_latency.sh 10.5.0.8 2 & exec ./target/release/sv1-custom-proxy",
]
ports:
- "3333:3333"
# - "3333:3333"
- "2345:2345"
environment:
- SERVER=10.5.0.8:3332
- CLIENT=0.0.0.0:3333
- CLIENT=10.5.0.19:3333
- PROM_ADDRESS=10.5.0.19:2345
- PROXY_TYPE=pool-miner
container_name: sv1-pool-miner-proxy
Expand Down Expand Up @@ -323,6 +324,47 @@ services:
networks:
sv2-net:
ipv4_address: 10.5.0.21

sv1-ckpool:
container_name: sv1-ckpool
labels:
logging: "config-c"
build:
context: .
dockerfile: ./sv1-ckpool.dockerfile
# ports:
# - "3333:3333"
volumes:
- "./conf:/ckpool-solo/src/conf"
restart: unless-stopped
networks:
sv2-net:
ipv4_address: 10.5.0.40
healthcheck:
test: ["CMD-SHELL", "curl --silent --user username:password --data-binary '{\"jsonrpc\":\"1.0\",\"id\":\"healthcheck\",\"method\":\"getblockchaininfo\",\"params\":[]}' -H 'Content-Type: application/json' http://10.5.0.16:18332/ | jq -e '.result.initialblockdownload == false' || exit 1"]
interval: 30s
timeout: 10s
retries: 10
start_period: 10s


sv1-ckproxy:
container_name: sv1-ckproxy
labels:
logging: "config-c"
build:
context: .
dockerfile: ./sv1-ckproxy.dockerfile
ports:
- "3333:3333"
volumes:
- "./conf:/ckpool-solo/src/conf"
restart: unless-stopped
depends_on:
- sv1-pool
networks:
sv2-net:
ipv4_address: 10.5.0.41

monitor-traffic-tcpdump:
image: inzania/network-traffic-metrics:latest
Expand Down
21 changes: 21 additions & 0 deletions sv1-ckpool.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:latest


ARG REPO=ckpool-solo
ARG BRANCH=solobtc
ARG REPO_URL=https://bitbucket.org/ckolivas/${REPO}.git


RUN apt-get update && apt-get install -y autoconf automake libtool build-essential git yasm libzmq3-dev libcap2-bin pkgconf

RUN git clone ${REPO_URL}

WORKDIR /ckpool-solo

COPY conf/ckpool.conf .

RUN ./autogen.sh && ./configure && make

WORKDIR ./src

CMD ["./ckpool","-B","-k", "-c", "./conf/ckpool.conf"]
21 changes: 21 additions & 0 deletions sv1-ckproxy.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:latest


ARG REPO=ckpool-solo
ARG BRANCH=solobtc
ARG REPO_URL=https://bitbucket.org/ckolivas/${REPO}.git


RUN apt-get update && apt-get install -y autoconf automake libtool build-essential git yasm libzmq3-dev libcap2-bin pkgconf

RUN git clone ${REPO_URL}

WORKDIR /ckpool-solo

COPY conf/ckproxy.conf ./src

RUN ./autogen.sh && ./configure && make

WORKDIR ./src

CMD ["./ckpool","-p","-k", "-c", "./ckproxy.conf"]
Loading