Coder Social home page Coder Social logo

iq-scm / go-quai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dominant-strategies/go-quai

0.0 0.0 0.0 24.73 MB

Official Go Implementation of the Quai Network

License: GNU Lesser General Public License v3.0

Shell 0.13% JavaScript 0.11% Ruby 0.02% Go 98.34% Assembly 0.58% Makefile 0.16% Smarty 0.04% NSIS 0.43% Dockerfile 0.02% Solidity 0.18%

go-quai's Introduction

Go Quai

Official Golang implementation of the Quai protocol.

API Reference Go Report Card Discord

Building the source

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-quai

Next, you will need to copy some default environment variables to your machine. You can do this by running

$ cp network.env.dist network.env

Building 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-quai

or, to build the full suite of utilities:

$ make all

Executables

The 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.

Running go-quai

Full node on the main Quai network

Using the makefile will preload configuration values from the network.env file.

$ make run-all

Full node on the Garden test network

Garden 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.

Viewing logs

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.log

Modify 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

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.

Contribution

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:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Pull requests need to be based on and opened against the main branch.
  • Commit messages should be prefixed with the package(s) they modify.
    • E.g. "rpc: make trace configs optional"

Please see the Developers' Guide for more details on configuring your environment, managing project dependencies, and testing procedures.

License

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.

go-quai's People

Contributors

alanorwick avatar djadih avatar gameofpointers avatar hubchub avatar jdowning100 avatar kiltsonfire avatar skeptrunedev avatar wizeguyy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.