AlgoNode / go-algorand

Algorand's official implementation in Go, with extras by Nodely.io (Algonode)
https://developer.algorand.org/
Other
1 stars 0 forks source link
rel/stable
CircleCI
rel/beta
CircleCI
rel/nightly
CircleCI

go-algorand

Algorand's official implementation in Go.

Algorand is a permissionless, pure proof-of-stake blockchain that delivers decentralization, scalability, security, and transaction finality.

Getting Started

Our developer website has the most up to date information about using and installing the Algorand platform.

Building from source

Development is done using the Go Programming Language. The version of go is specified in the project's go.mod file. This document assumes that you have a functioning environment setup. If you need assistance setting up an environment please visit the official Go documentation website.

Linux / OSX

We currently strive to support Debian-based distributions with Ubuntu 20.04 being our official release target. Building on Arch Linux works as well. Our core engineering team uses Linux and OSX, so both environments are well supported for development.

OSX only: Homebrew (brew) must be installed before continuing. Here are the installation requirements.

Initial environment setup:

git clone https://github.com/algorand/go-algorand
cd go-algorand
./scripts/configure_dev.sh
./scripts/buildtools/install_buildtools.sh

At this point, you are ready to build go-algorand. We use make and have a number of targets to automate common tasks.

build

make install

test

# unit tests
make test

# integration tests
make integration

style and checks

make fmt
make lint
make fix
make vet

or alternatively

make sanity

Running a node

Once the software is built you'll find binaries in ${GOPATH}/bin, and a data directory will be initialized at ~/.algorand. Start your node with ${GOPATH}/bin/goal node start -d ~/.algorand, use ${GOPATH}/bin/carpenter -d ~/.algorand to see activity. Refer to the [developer website][developer site url] for how to use the different tools.

Providing your own data directory

You can run a node out of other directories than ~/.algorand and join networks other than mainnet. Just make a new directory and copy into it the genesis.json file for the network. For example:

mkdir ~/testnet_data
cp installer/genesis/testnet/genesis.json ~/testnet_data/genesis.json
${GOPATH}/bin/goal node start -d ~/testnet_data

Genesis files for mainnet, testnet, and betanet can be found in installer/genesis/.

Contributing

Please refer to our CONTRIBUTING document.

Project Layout

go-algorand is split into various subsystems containing various packages.

Core

Provides core functionality to the algod and kmd daemons, as well as other tools and commands:

Daemon

Contains the two daemons which provide Algorand clients with services:

Interfacing

Allows developers to interface with the Algorand system:

Deployment

Help Algorand developers deploy networks of their own:

Utilities

Provides utilities for the various components:

Test

test (README) contains end-to-end tests and utilities for the above components.

License

License: AGPL v3

Please see the COPYING_FAQ for details about how to apply our license.

Copyright (C) 2019-2024, Algorand Inc.