Skip to content

EQB Node

hgthynne edited this page May 9, 2020 · 11 revisions

See Release Notes

Installation

Windows binaries

  • Download the node binaries to your local drive
  • Optionally customize data\equibit.conf (doc TBD)
  • Run start-node.bat to launch the Equibit node

When running the batch files under Windows 10, Windows Defender will likely popup a warning for an "unrecognized app". Click the "More info" followed by "Run anyway".

Windows from source

  • Install Visual Studio 2019 (Community Edition or higher)
  • Create a directory to hold Equibit source directories - for example source
  • Install vcpkg into source\vcpkg by following the instructions on the vcpkg Github
  • Install the packages that the Equibit node requires:
    • vcpkg install boost:x64-windows-static
    • vcpkg install libevent:x64-windows-static
    • vcpkg install openssl:x64-windows-static
    • vcpkg install zeromq:x64-windows-static
    • vcpkg install berkeleydb:x64-windows-static
    • secp256k1:x64-windows-static
  • Clone LevelDB 1.22 from the Github repository (from the source directory):
    • git clone --recurse-submodules https://github.com/google/leveldb.git
    • cd leveldb
    • git checkout 1.22
  • Build LevelDB 1.22:
    • cmake -G "Visual Studio 16" -A x64
    • Open leveldb.sln in Visual Studio
    • Change active solution configuration to Release
    • Change the runtime library configuration for the leveldb project from multi-threaded DLL to multi-threaded, so that static libraries will be generated
    • Build the leveldb project
  • Clone and build the Equibit node (from the source directory):
    • git clone https://github.com/Equibit/equibit
    • If a different directory structure was used, edit equibit\build_msvc\common.vcxproj to set the paths for VCPkgDir and LevelDBDir
    • Open build_msvc\equibit.sln in Visual Studio
    • Optionally change the solution to the Debug configuration
    • Build the solution

The binaries will be generated in the build_msvc\x64\Release directory.

Ubuntu from source

To run natively on Ubuntu you will have to build from source. If you're comfortable with git and build tools you should be good to go.

  • Run git clone https://github.com/Equibit/equibit
  • cd to equibit
  • Follow Ubuntu build instructions in the README

Ubuntu Service

Most likely you will want to automatically start the node when the machine boots. The Ubuntu systemctl service can be used to easily provide this capability. A sample service file and start script has been created in the repository.

  • Copy the src/equibitd and src/equibit-cli binaries from the src folder to a new folder (eg. equibit-node). This step is optional if you used make install.
  • Copy the start-node.sh script into this folder.
  • Edit start-node.sh to point to the data directory created with the Equibit configuration file. See the Configuration section below.
  • Give start-node.sh execute permissions: chmod +x ./start-node.sh
  • Copy the sample service definition file into the service definition directory: sudo cp ./equibit-node.service /etc/systemd/system
  • Edit the User, WorkingDirectory and ExecStart settings in the service definition file to point to the node directory.
  • Run sudo systemctl enable equibit-node.service to enable the service.
  • Run sudo systemctl start equibit-node to start the node.

Note. It is not recommended to run the Equibit node as root. Create a new user to run the service or run under an existing user.

Docker

  • You'll probably want to install Docker
  • Create a data folder
  • Add a configuration file equibit.conf to the folder (see template below)
  • Start the node: docker run --rm --name testnet -p 17331:17331 -p 18331:18331 -v [data folder]:/data -d macterra/eqb-testnet:v02.15
    • Substitute the path for your own data folders
    • Expose the same ports that is specified in the equibit.conf file
    • The 17331 port should be exposed if you are running a seed node (specify listen=1 in the config file and add port forwarding if you are behind a firewall)
    • The 18331 (RPC) port should be exposed for the miner to connect
  • Make sure it syncs OK: docker logs -f testnet
  • Login to the container to issue commands: docker exec -it testnet bash
    • Once logged in you can use the alias ec instead of equibit-client -datadir=/data, e.g. ec uptime
  • When you stop the container docker stop testnet it will be automatically removed but the blockchain data will persist in your data folder so you can restart any time

Configuration

  • Create a data folder
  • Add a configuration file named equibit.conf to the data folder
  • Run: equibitd -datadir=[path to data folder]

Template for equibit.conf

rpcuser=equibit
rpcpassword=equibit
rpcallowip=0.0.0.0/0
uacomment=anon-node

testnet=1
server=1
txindex=0
rest=1
listen=1
logtimemicros=1
debug=1
debugexclude=libevent
debugexclude=leveldb
debugexclude=tor
keypool=1
discover=0
mocktime=0

CLI Commands

  • equibit-cli -datadir=[path] uptime to check if the node is running
  • equibit-cli -datadir=[path] getwalletinfo to check your balance
  • equibit-cli -datadir=[path] getnewaddress main bech32 to generate an address in the main account to receive funds
  • equibit-cli -datadir=[path] sendtoaddress [address] [amount] to send funds
  • equibit-cli -datadir=[path] help [command] to get documentation

Clone this wiki locally