npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

go-quai

v1.0.3

Published

The unofficial Golang implementation of the Quai protocol.

Downloads

5

Readme

Go Quai

The official Golang implementation of the Quai protocol.

API Reference Go Report Card Discord

Prerequisites

  • Go v1.21.0+
  • Git
  • Make

For details on installing prerequisites, visit the node installation instructions in the Quai Documentation.

Building the source

Once you have the necessary prerequisites, clone the go-quai 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 the boilerplate node configuration file (network.env.dist) into a configuration file called network.env. You can do this by running:

$ cp network.env.dist network.env

Building go-quai requires both a Go (version 1.21.0+ 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.

go-quai

Our main Quai CLI client. go-quai is the entry point into the Quai network (main-, test-, or private net), capable of running as a slice node (single slice), multi-slice node (subset of slices), and a global node (all slices). Each of these types of nodes can be run as full node (default), a light node (retrieving data live), or an archive node (retaining all historical state).

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

| go-quai Nodes | Single Slice | Multiple Slices | All Slices | | :---------------: | :-----------------------: | :----------------------: | :-----------------: | | Full Node | Slice Full Node (Default) | Multi-Slice Full Node | Global Full Node | | Light Nodes | Slice Light Node | Multi-Slice Light Node | Global Light Node | | Archive Node | Slice Archive Node | Multi-Slice Archive Node | Global Archive Node |

test

Runs a battery of tests on the repository to ensure it builds and functions correctly.

Running go-quai

Configuration

Configuration is handled in the network.env 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.

The default configuration of the network.env file is for a global full node on the main (colosseum) network.

  • The SLICES parameter determines which slices of the network the node will run (i.e. determines whether the node will be a slice node, a multi-slice node, or a global node).

  • The COINBASE paratmeter contains the addresses that mining rewards will be paid to. There is one COINBASE address for each slice.

  • The NETWORK parameter determines the network that the node will run on. Networks include the mainnet (colosseum) and garden networks.

Starting and stopping a node

The go-quai client can be started by using:

$ make run

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

The go-quai client can be stopped by using:

$ make stop

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

X and Y should be replaced with values between 0-2 to define which slice's logs to display.

Garden test network

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

To run on the Garden test network, 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.

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.

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"

If you wish to submit more complex changes, please check up with the core devs first in the Quai development Discord Server to ensure your 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.

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.