Skip to content

mit-dci/utcd

This branch is 12 commits ahead of, 776 commits behind btcsuite/btcd:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7310b99 · Jan 24, 2022
Oct 2, 2020
Feb 6, 2019
May 18, 2021
May 18, 2021
Feb 1, 2021
May 18, 2021
May 18, 2021
Mar 9, 2020
Nov 20, 2020
Jan 18, 2021
Nov 14, 2020
May 1, 2015
May 18, 2021
May 27, 2018
May 18, 2021
May 18, 2021
Sep 17, 2020
Nov 24, 2020
May 18, 2021
May 18, 2021
May 18, 2021
May 18, 2021
Feb 1, 2021
Aug 27, 2020
Jan 18, 2021
Jan 12, 2017
Jan 24, 2022
May 18, 2021
May 18, 2021
Oct 21, 2016
Apr 14, 2020
Aug 10, 2021
Aug 10, 2021
Sep 8, 2020
May 23, 2018
Jan 7, 2016
Sep 14, 2020
Feb 1, 2021
Jan 26, 2021
May 1, 2015
Jul 8, 2019
Sep 17, 2020
May 18, 2021
Jul 22, 2020
Aug 11, 2016
Aug 11, 2016
Nov 3, 2016
Aug 31, 2020
Feb 1, 2021
May 18, 2021
May 18, 2021

Repository files navigation

This repository has moved to utreexod.

utcd

ISC License

utcd is a fork of btcd, an alternative full node bitcoin implementation written in Go (golang). utcd implements the Utreexo accumulator into btcd.

To validate the parallel node benchmarks in the bitmex blog, refer to the instructions below. For all other purposes, please refer to the utreexod repository.

Requirements

Go 1.15 or newer.

Build

Without secp256k1:

env CGO_ENABLED=0 go build

With secp256k1:

$ git submodule init
$ git submodule update
$ cd btcec/secp256k1
$ ./autogen.sh
$ ./configure --prefix=$PWD
$ make all
$ make check
$ make install
$ cd ../..
$ go build

Basically just build the secp256k1 library with --prefix set to the btcec/secp256k1 directory and then go build. utcd with secp256k1 isn't supported on Windows.

Getting Started

1: Running a bridgenode. For mainnet, at least 1tb of disk space is required.

./btcd --utreexo

2: Running a coordinator node

./btcd --utreexocsn --utreexomain --nolisten --norpc --blocksonly --connect=IP_OF_THE_BRIDGENODE

3: Running a worker node. Recommended to set --numworkers flag equal to that of the logical cores on your machine. --mainnodeip is also required if the coordinator node is on a remote machine.

./btcd --utreexocsn --utreexoworker --numworkers=1 --nolisten --nocfilters --norpc --blocksonly --connect=IP_OF_THE_BRIDGENODE --mainnodeip=IP_OF_THE_COORDINATOR_NODE

Replicating IBD benchmarks

There were three setups completed for the IBD benchmarks:

  1. Bridgenode and IBD node on two different machines.
  • Set up the bridgenode on a separate machine. Note the public ip address of this machine.
  • Run the coordinator node with flag --connect=IP_OF_THE_BRIDGENODE then run the worker node on the same machine also with --connect=IP_OF_THE_BRIDGENODE.
  • When the coordinator node is finished with the IBD, it'll display this log 2021-05-11 05:13:22.501 [INF] BTCD: Done verifying all roots
  • Subtract the start time from this time.
  1. Bridgenode and IBD node on the same machine.
  • Set up the bridgenode.
  • Run the coordinator node with flag --connect=127.0.0.1 then run the worker node on the same machine also with flag --connect=127.0.0.1
  • When the coordinator node is finished with the IBD, it'll display this log 2021-05-11 05:13:22.501 [INF] BTCD: Done verifying all roots
  • Subtract the start time from this time.
  1. Bridgenode and two IBD nodes for multi-machine IBD.
  • Set up the bridgenode on a separate machine. Note the public ip address of this machine.
  • Run the coordinator node with flag --connect=IP_OF_THE_BRIDGENODE then run the worker node on the same machine also with --connect=IP_OF_THE_BRIDGENODE. Note the public ip address of this machine. Port 18330 is used to communicate with a remote worker. You can change this port number by editing worker.go. Just find all the 18330s and replace with whatever port you want.
  • On a different machine, run a worker node with flag --mainnodeip=IP_OF_THE_COORDINATOR_NODE. Make sure the port 18330 is open on the coordinator node side.
  • When the coordinator node is finished with the IBD, it'll display this log 2021-05-11 05:13:22.501 [INF] BTCD: Done verifying all roots
  • Subtract the start time from this time.

IRC

  • irc.libera.chat
  • channel #utreexo

License

utcd is licensed under the copyfree ISC License.

About

An alternative full node bitcoin implementation written in Go (golang)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%