Git Product home page Git Product logo

utreexod's Introduction

utreexod

Build Status ISC License GoDoc

utreexod is a full node bitcoin implementation with support for utreexo accumulators. Utreexo accumulator is an append only merkle forest data structure with support for deleting elements from the set. More information at Utreexo library github repository

The main features over a traditional node are:

  • Immediate node bootstrap by having the UTXO state hardcoded into the codebase.
  • Uses a tiny amount of memory.
  • Extremely low disk i/o needed compared to a traditional node. Will not wear out micro sd cards.

The catch is that it uses more bandwidth compared to a normal node. For block downloads it's around 1.7 times more data. For transactions the absolute worst case is 4 times more but transaction relay supports caching so it'll be a lot better.

This project is currently under active development and is in a beta state. Using it on mainnet for anything other than negligible amounts of bitcoin is not recommended.

Requirements

Go 1.18 or newer.

Rust 1.73.0 or newer (To compile the built in BDK wallet support).

Installation

https://github.com/utreexo/utreexod/

Linux/MacOSX - Build from Source

To build with BDK wallet:

make all

To build without the BDK wallet:

go build -o . ./...

Getting Started

To run a utreexo node:

# The node will start from the hardcoded UTXO state and skip the initial block download.
# If the node was built with the bdk wallet, it'll start with the bdk wallet enabled.
`./utreexod`

# For utreexo archival nodes that will not skip the initial block download.
`./utreexod --noassumeutreexo --prune=0`

# To disable to bdkwallet. NOTE: the wallet will not be disabled if the node had ever
# started up with the wallet enabled.
`./utreexod --nobdkwallet`

To use the built in bdk wallet:

# Show the mnemonic word list of the wallet.
`./utreexoctl getmnemonicwords`

# Get a fresh address from the wallet.
`./utreexoctl freshaddress`

# Get an address that has not received funds yet from the wallet.
`./utreexoctl unusedaddress`

# Get an address at the desired index.
`./utreexoctl peekaddress "bip32-index"`
Example:
# Returns the address at index 100.
`./utreexoctl peekaddress 100`

# Get the current balance of the wallet.
`./utreexoctl balance`

# List all the relevant transactions for the wallet.
`./utreexoctl listbdktransactions`

# List all the relevant utxos that the wallet controls.
`./utreexoctl listbdkutxos`

# Create a transaction from the wallet.
`./utreexoctl createtransactionfrombdkwallet "feerate_in_sat_per_vbyte" [{"amount":n,"address":"value"},...]`
Example:
# feerate of 1 satoshi per vbyte, sending 10,000sats to address tb1pdt9hl8ymdetdmvgk54aft8jaq4xle998m8e6adwxs4vh7vwpl9jsyadlhq
`./utreexoctl createtransactionfrombdkwallet 1 '[{"amount":10000,"address":"tb1pdt9hl8ymdetdmvgk54aft8jaq4xle998m8e6adwxs4vh7vwpl9jsyadlhq"}]'`
# feerate of 12 satoshi per vbyte, sending 10,000sats to address tb1pdt9hl8ymdetdmvgk54aft8jaq4xle998m8e6adwxs4vh7vwpl9jsyadlhq and 20,000sats to address tb1puuv30z568uc58c40duwl5ytyu5898fyehlyqtm0al2xk70z8tw0qcxfn6w
`./utreexoctl createtransactionfrombdkwallet 12 '[{"amount":10000,"address":"tb1pdt9hl8ymdetdmvgk54aft8jaq4xle998m8e6adwxs4vh7vwpl9jsyadlhq"},{"amount":20000,"address":"tb1puuv30z568uc58c40duwl5ytyu5898fyehlyqtm0al2xk70z8tw0qcxfn6w"}]'`

Bridge nodes are nodes that keep the entire merkle forest and attach proofs to new blocks and transactions. Since miners and nodes publish blocks and transactions without proofs, these nodes are needed to allow for utreexo nodes without a soft fork. To run a bridge node:

# Either one will work. The only difference these have is that the flatutreexoproofindex
# stores all the data in .dat files instead of leveldb. It makes it easier to read the
# proofs for tinkering.
`./utreexod --flatutreexoproofindex`
`./utreexod --utreexoproofindex`

# For running bridge nodes that are also archival.
`./utreexod --flatutreexoproofindex --prune=0`
`./utreexod --utreexoproofindex --prune=0`

Community

Discord

Issue Tracker

The integrated github issue tracker is used for this project.

License

utreexod is licensed under the copyfree ISC License.

utreexod's People

Contributors

davecgh avatar kcalvinalvin avatar dajohi avatar roasbeef avatar jrick avatar jcvernaleo avatar aakselrod avatar drahn avatar martelletto avatar tuxcanfly avatar cfromknecht avatar wpaulino avatar onyb avatar flammit avatar jongillham avatar evanlinjin avatar owainga avatar halseth avatar stevenroose avatar wallclockbuilder avatar guggero avatar jimmysong avatar tsenart avatar 0xmichalis avatar jakesylvestre avatar dirbaio avatar federicobond avatar lindlof avatar rjected avatar torkelrogstad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.