Local DevNet Setup

The fastest way to experiment with the Accumulate CLI or API is to replace the Accumulate Testnet with a running local devnet.

A local devnet allows you to run accumulate Node locally on your computer, and it's hosted on your company.

Requirements

  • You should have Go 1.18 installed on your machine.

  • You should have a basic knowledge of CLI.

  • You should have the Accumulate CLI setup already.

To set up the Accumulate CLI tool, go to CLI setup.

You can run a local devnet with the Accumulate Github or Gitlab source code.

When using the CLI tool with your local devnet, you must specify the CLI to point to localhost by appending-s local with every command.

Follow the steps:

1. Mac:

Initialize the Devnet

Before you run the code, make sure you “git checkout” the branch for the network version you want for your local devnet. Please see Networks for the list of available versions.

Use this command below to initialize the local devnet

  • init devnet: Initialize the configure files for the devnet

  • --no-empty-blocks: A Tendermint command that will not allow empty blocks stored in the database

  • --no-website: this will stop the creation of a website

  • --reset: This flag will delete the previous configuration that you have or the data

  • -w .nodes: is the working directory where the data is stored (you can also specify a custom location).

  • -v 1: specifies how many validators that you are using

  • -b 1: is the number of BVN that you are using

  • -f 0: x is the number of followers

Local network IP Address

The export ACC\_API the command sets the CLI to look for this IP address when executing commands.

Add Loopback Alias

If you run the above command, it will prompt you to add your computer admin password. After that, repeat this step until you get to 9.

Example

In Mac, you have to do this step from 127.0.1.1 - 127.0.1.9 because Mac requires a loopback alias.

Run the Devnet

To check that the devnet is running fine, open a new terminal and run the below command in the accumulate folder

The above command will return an output similar to the following:

2. Windows:

Build accumulated (the node daemon)

Use this command below to build accumulate.

Initialize the devnet

Use this command below to initialize the local devnet.

Syntax

  • --bvns 1: is the number of BVN that you are using

  • --validators 1: specifies how many validators that you are using

  • --followers 0: The number of followers you are using

  • --log-levels 'error;executor=debug': (optional) to receive logs after running devnet

  • --reset: This flag will delete the previous configuration that you have

  • -w (optional) the working directory where you want data stored. If omitted, a working directory will be added in the default location.

The above command will return an output similar to the following:

Run the Devnet

Add ‘-w’ if you included in the previous command 'D:\.accumulate'

To point the CLI to your local devnet, add ‘-s local’ to each command.

To test if your devnet is working, check out the CLI guide.

Last updated

Was this helpful?