Skip to content

Commit

Permalink
Updated docker installation instructions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
rdugan committed Sep 7, 2023
1 parent 5771f19 commit ab09829
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,25 @@ ks_worker_job_counter{ip="192.168.0.65",miner="BzMiner-v11.1.0",wallet="kaspa:qz

## Build from source (native executable)

Install go 1.18 or later using whatever package manager is approprate for your system, or from https://go.dev/doc/install.
* Install go 1.18 or later using whatever package manager is approprate for your system, or from https://go.dev/doc/install.

run `cd cmd/kaspabridge;go build .`
* run `cd cmd/kaspabridge;go build .`

Modify the config file in ./cmd/bridge/config.yaml with your setup, the file comments explain the various flags
* Modify the config file in ./cmd/bridge/config.yaml with your setup, the file comments explain the various flags

run `./kaspabridge` in the `cmd/kaspabridge` directory
* run `./kaspabridge` in the `cmd/kaspabridge` directory

all-in-one (build + run) `cd cmd/kaspabridge/;go build .;./kaspabridge`
All-in-one (build + run) `cd cmd/kaspabridge/;go build .;./kaspabridge`

## Docker all-in-one

*Note: Best option for users who want access to reporting, and aren't already using Grafana/Prometheus. Requires a local copy of this repository, and docker installation.*
*Best option for users who want access to reporting, and aren't already using Grafana/Prometheus. Requires a local copy of this repository, and docker installation.*

* [Install Docker](https://docs.docker.com/engine/install/) using the appropriate method for your OS. The docker commands below are assuming a server type installation - details may be different for a desktop installation.

`docker compose -f docker-compose-all-src.yml up -d --build` [^1] will run the bridge assuming a local kaspad node with default port settings, and listen on port 5555 for incoming stratum connections. These settings can be overridden by modifying/adding/deleting the parameters in the 'command' section of the [docker-compose-all-src.yml](docker-compose-all-src.yml) file. Additionally, Prometheus (the stats database) and Grafana (the dashboard) will be started and accessible on ports 9090 and 3000 respectively. Once all services are running, the dashboard should be reachable at <http://127.0.0.1:3000/d/x7cE7G74k1/ksb-monitoring> with default user/pass: admin/admin
* Clone this repository using git (`git clone https://github.com/rdugan/kaspa-stratum-bridge.git`) or download and unpack the [zip file](https://github.com/rdugan/kaspa-stratum-bridge/archive/refs/heads/main.zip)

* Enter the 'kaspa-stratum-bridge' directory and type the command `docker compose -f docker-compose-all-src.yml up -d --build` [^1]. This will run the bridge assuming a local kaspad node with default port settings, and listen on port 5555 for incoming stratum connections. These settings can be updated in the [config.yaml](cmd/kaspabridge/config.yaml) file, or overridden by modifying/adding/deleting the parameters in the 'command' section of the [docker-compose-all-src.yml](docker-compose-all-src.yml) file. Additionally, Prometheus (the stats database) and Grafana (the dashboard) will be started and accessible on ports 9090 and 3000 respectively. Once all services are running, the dashboard should be reachable at <http://127.0.0.1:3000/d/x7cE7G74k1/ksb-monitoring> with default user/pass: admin/admin

[^1]: This command builds the bridge component from source, rather than the previous behavior of pulling down a pre-built image. You may still use the pre-built image by replacing 'docker-compose-all-src.yml' with 'docker-compose-all.yml', but it is not guaranteed to be up to date, so compiling from source is the better alternative.

Expand All @@ -104,9 +107,13 @@ Many of the stats on the graph are averaged over a configurable time period (24h

## Docker bridge only

*Note: Best option for users who want docker encapsulation, and don't need reporting, or are already using Grafana/Prometheus. Requires a local copy of this repository, and docker installation.*
*Best option for users who want docker encapsulation, and don't need reporting, or are already using Grafana/Prometheus. Requires a local copy of this repository, and docker installation.*

* [Install Docker](https://docs.docker.com/engine/install/) using the appropriate method for your OS. The docker commands below are assuming a server type installation - details may be different for a desktop installation.

* Clone this repository using git (`git clone https://github.com/rdugan/kaspa-stratum-bridge.git`) or download and unpack the [zip file](https://github.com/rdugan/kaspa-stratum-bridge/archive/refs/heads/main.zip)

`docker compose -f docker-compose-bridge-src.yml up -d --build` [^2] will run the bridge assuming a local kaspad node with default port settings, and listen on port 5555 for incoming stratum connections. These settings can be overridden by modifying/adding/deleting the parameters in the 'command' section of the [docker-compose-bridge-src.yml](docker-compose-bridge-src.yml) file. No further services will be enabled.
* Enter the 'kaspa-stratum-bridge' directory and type the command `docker compose -f docker-compose-bridge-src.yml up -d --build` [^2]. This will run the bridge assuming a local kaspad node with default port settings, and listen on port 5555 for incoming stratum connections. These settings can be updated in the [config.yaml](cmd/kaspabridge/config.yaml) file, or overridden by modifying/adding/deleting the parameters in the 'command' section of the [docker-compose-bridge-src.yml](docker-compose-bridge-src.yml) file. No further services will be enabled.

[^2]: This command builds the bridge component from source, rather than the previous behavior of pulling down a pre-built image. You may still use the pre-built image by issuing the command `docker run -p 5555:5555 onemorebsmith/kaspa_bridge:latest`, but it is not guaranteed to be up to date, so compiling from source is the better alternative.

Expand Down

1 comment on commit ab09829

@strannik37
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Antminer KS3
please help me there is no connection of this miner through the bridge
discord for communication for logs and errors strannik38
error bridge
{"level":"info","ts":"2023-09-24T22:55:10+03:00","msg":"hosting prom stats on :2114/metrics","server":"prometheus"}
{"level":"info","ts":"2023-09-24T22:55:10+03:00","msg":"checking kaspad sync state","component":"kaspaapi:localhost:16110"}
{"level":"info","ts":"2023-09-24T22:55:10+03:00","msg":"kaspad synced, starting server","component":"kaspaapi:localhost:16110"}
{"level":"info","ts":"2023-09-24T22:55:52+03:00","msg":"new client connecting - 192.168.0.108","component":"stratum","address":":8051"}
{"level":"info","ts":"2023-09-24T22:55:52+03:00","msg":"client subscribed ","component":"stratum","address":":8051","client":"192.168.0.108","client_id":1,"context":"{"RemoteAddr":"192.168.0.108","WalletAddr":"","WorkerName":"","RemoteApp":"GodMiner/2.0.0","Id":1,"Logger":{},"State":{"Jobs":{},"JobLock":{}},"Extranonce":"000000"}"}
{"level":"warn","ts":"2023-09-24T22:56:12+03:00","msg":"client misconfigured, no miner address specified - disconnecting","component":"stratum","address":":8051","client":"192.168.0.108","client_id":1,"client":"{"RemoteAddr":"192.168.0.108","WalletAddr":"","WorkerName":"","RemoteApp":"GodMiner/2.0.0","Id":1,"Logger":{},"State":{"Jobs":{},"JobLock":{}},"Extranonce":"000000"}"}
{"level":"info","ts":"2023-09-24T22:56:12+03:00","msg":"disconnecting","component":"stratum","address":":8051","client":"192.168.0.108","client_id":1}
{"level":"info","ts":"2023-09-24T22:56:12+03:00","msg":"client disconnecting - 192.168.0.108","component":"stratum","address":":8051"}
{"level":"error","ts":"2023-09-24T22:56:12+03:00","msg":"error reading from socket","component":"stratum","address":":8051","client":"192.168.0.108","client_id":1,"error":"error reading from connection: read tcp 192.168.0.102:8051->192.168.0.108:52314: use of closed network connection","errorVerbose":"read tcp 192.168.0.102:8051->192.168.0.108:52314: use of closed network connection\nerror reading from connection\ngithub.com/onemorebsmith/kaspastratum/src/gostratum.readFromConnection\n\t/tmp/kaspa-stratum-bridge/src/gostratum/stratum_client.go:54\ngithub.com/onemorebsmith/kaspastratum/src/gostratum.spawnClientListener\n\t/tmp/kaspa-stratum-bridge/src/gostratum/stratum_client.go:19\nruntime.goexit\n\t/usr/lib/go-1.18/src/runtime/asm_amd64.s:1571"}
{"level":"info","ts":"2023-09-24T22:56:12+03:00","msg":"removing client 1"}
{"level":"info","ts":"2023-09-24T22:56:12+03:00","msg":"removed client 1"}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

logs miner
time="2023-09-24 19:55:52" level=error pid=1206 msg="Failed to get extranonce2_size"
time="2023-09-24 19:55:52" level=notice pid=1206 msg="no need to parse extranonce"
time="2023-09-24 19:56:12" level=error pid=1206 msg="stratum login failed"
time="2023-09-24 19:56:12" level=error pid=1206 msg="Sweep error string = N0:1"
time="2023-09-24 19:56:20" level=notice pid=1206 msg="set_miner_start_time total_tv_start_sys=3713 total_tv_end_sys=3714"
time="2023-09-24 19:56:20" level=error pid=1206 msg="error pool input"
time="2023-09-24 19:56:20" level=error pid=1206 msg="pool0, url = stratum+tcp://192.168.0.102:8051, user = kaspa:qz5s28v6mhaxkcdvcqk53f6mfr6llcek2l7hslkmz22u29xvyc5mxpu86jn6k, pass = x"
time="2023-09-24 19:56:20" level=error pid=1206 msg="pool1, url = , user = , pass = x"
time="2023-09-24 19:56:20" level=error pid=1206 msg="pool2, url = , user = , pass = x"

Please sign in to comment.