dominant-strategies / go-quai
- четверг, 24 августа 2023 г. в 00:00:01
Official Go Implementation of the Quai Network
Official Golang implementation of the Quai protocol.
For prerequisites and detailed build instructions please read the Installation Instructions.
First, clone the repository and navigate to it using
$ git clone https://github.com/dominant-strategies/go-quai.git
$ cd go-quaiNext, you will need to copy some default environment variables to your machine. You can do this by running
$ cp network.env.dist network.envBuilding go-quai requires both a Go (version 1.19 or later) and a C compiler. You can install
them using your favorite package manager. Once these dependencies are installed, run
$ make go-quaior, to build the full suite of utilities:
$ make allThe go-quai project comes with several wrappers/executables found in the cmd
directory.
| Command | Description |
|---|---|
go-quai |
Our main Quai CLI client. It is the entry point into the Quai network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Quai network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. go-quai --help for command line options. |
test |
Runs a battery of tests on the repository to ensure it builds and functions correctly. |
go-quaiUsing the makefile will preload configuration values from the network.env file.
$ make run-allGarden test network is based on the Blake3 proof-of-work consensus algorithm. As such, it has certain extra overhead and is more susceptible to reorganization attacks due to the network's low difficulty/security.
Logs are stored in the go-quai/nodelogs directory by default. You can view them by using tail or another utility, like so:
$ tail -f nodelogs/zone-0-0.logModify the network.env configuration file to reflect:
NETWORK=garden. You should also set ENABLE_ARCHIVE=true to make sure to save the trie-nodes after you stop your node. Then build and run with the same commands as mainnet.
Configuration is handled in network.env.dist file. You will need to copy or rename the file to network.env. The make commands will automatically pull from this file for configuration changes.
Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!
If you'd like to contribute to go-quai, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our Discord Server to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.
Please make sure your contributions adhere to our coding guidelines:
main branch.Please see the Developers' Guide for more details on configuring your environment, managing project dependencies, and testing procedures.
The go-quai library (i.e. all code outside of the cmd directory) is licensed under the
GNU Lesser General Public License v3.0,
also included in our repository in the COPYING.LESSER file.
The go-quai binaries (i.e. all code inside of the cmd directory) is licensed under the
GNU General Public License v3.0, also
included in our repository in the COPYING file.