참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
Introduction
Here, we’ll be installing go-quai-stratum, the Go implementation of the stratum proxy on Quai Network. This tutorial is focused on Linux Distributions and MacOS systems. Prefer a video tutorial? Check out a video walkthrough on setting up a stratum proxy here:Environment Setup
For the simplest installation process, we recommend installing and running go-quai-stratum on the same computer that you’re running go-quai. Running go-quai-stratum on a separate computer is only recommended for advanced users as it requires additional networking configuration.Install Dependencies
To run an instance of go-quai-stratum, you’ll need to install a few dependencies. You can install dependencies with your favorite package manager (apt, brew, etc.).1
Go v1.23.0+
- Linux Snap Install
- MacOS Install
Snap is not default installed on all Linux distros
2
Git, Make, and G++
- Linux Install
- MacOS Install
Install git, make, and g++ with the following command:
3
go-quai-stratum
Now that you’ve installed the base dependencies, we can go ahead and clone the go-quai-stratum repo in the root directory.To clone the go-quai-stratum repo and navigate to it, run the following commands:This command installs the main branch to your local machine. Unless you intend to develop, you must checkout the latest release.You can find the latest release on the go-quai-stratum releases page. Then, check out the latest release with:For example (this not the latest release, check the releases page for the latest release number):
Configuration
To run the Quai stratum proxy, you’ll need to do some minor configuration. Start by copying the example configuration file to a local configuration file:config.json file, you’ll be able to configure networking settings and other relevant variables:
Running the Proxy
Build
Before running the proxy, we need to build the source. You can build via Makefile by running the following command:Run
Now that we’ve built the source, we can start our proxy. We recommend using a process manager like tmux to run the proxy as background service. To run the proxy, you’ll need to select a shard to run against. Start the proxy by changingREGION-NAME and ZONE-NAME to the corresponding or chain names for the region and zone your node is running.
REGION-NAME and ZONE-NAME can be found below. You must select a corresponding region and zone, e.g. cyprus and cyprus1.
| Chain Name | Type | Chain Index | Websocket Port | Stratum Run Flags |
|---|---|---|---|---|
| Cyprus | Region | 8002 | --region=cyprus | |
| Cyprus1 | Zone | [0 0] | 8220 | --region=cyprus --zone=cyprus1 |
| Cyprus2 | Zone | [0 1] | 8221 | --region=cyprus --zone=cyprus2 |
3333 port. You can change the port the proxy listens on by passing it in with the --stratum flag in the run command if you’d like.
Changing the proxy listening port is useful for running multiple proxies on a single global node. If you’re only mining on a single shard,
there is no need to change the listening port.
