Home Backend Development Golang Improving the Bitcoin network using Utreexo

Improving the Bitcoin network using Utreexo

Jul 30, 2024 am 08:03 AM

Improving the Bitcoin network using Utreexo

The world is growing ever digital by the day and more and more aspects of our lives have become more and more intangible. Currency hasn’t been left out, from physical cash, to cashless systems and now cryptocurrencies. Since the inception of the first block of Bitcoin in 2009 it’s adoption has grown ever so rapidly and with more adoption comes more stability and trust in the network which will only increase it’s adoption.

First of all, what is Bitcoin, and how does Bitcoin work?

Bitcoin is a decentralized peer to peer network digital currency created in 2008 by a pseudo anonymous entity named Satoshi Nakamoto. The Bitcoin network is a network made up of computers, also referred to as nodes which are interconnected to each other and help propagate transactions and validate transactions throughout the network. This network uses the digital currency bitcoin (BTC). These transactions are stored on a decentralized public ledger which uses blockchain technology.
The Bitcoin blockchain is made up of blocks which are linked to each preceding block, except for the first block also known as the Genesis block which isn’t connected to any preceding block. Blocks are made up of several transactions which have been validated and carefully added to a block by miners, before performing the mining process. A transaction is basically a transfer of value between bitcoin wallets. Miners are responsible for performing the major work on the network which confirm or “mine” new blocks and add them to the blockchain.
There are several resources to learn about Bitcoin available online. These resources give more details about the functioning of bitcoin.
Despite the great things about bitcoin, scalability has always been a major issue. Bitcoin blocks are limited to a size of 1MB, with a block mined roughly every 10 minutes. This has put the current size of the Bitcoin blockchain at around 580 GB as of this writing, which is about 18% up over the last year. For full nodes to join the blockchain and verify networks, they need to download the entire blockchain and start performing performing validation on all old blocks and on newly added blocks. This size is about guaranteed to keep growing by the day and at some point, might become too large, so much so that it dissuades some normal users from joining the network due to it’s resource constraints.
Asides the size of the blockchain, nodes also verify and store the current state of the network. This state is the current Unspent transaction output set (UTXO) which is relatively much smaller in size to the entire blockchain, however, this state as well is guaranteed to keep growing fast as more and more users carry out more transactions on the network. This set is the set of all Unspent transaction outputs in the network.

So what is Utreexo?

Utreexo introduces a hash based dynamic accumulator which allows to significantly reduce the size of the current state. It allows for nodes to fully verify inputs of a transaction without knowing the entire state of the system. It accomplishes this by letting the owner of funds maintain a proof that the funds actually do exist, and they then present this funds when they are about to spend the funds.
Utreexo introduces a new type of node called a Compact State Node. These nodes only store an accumulator representation of the state. In order for these nodes to verify transactions, they need an inclusion proof. This proof is provided by the spending transaction when they are about to spend some inputs.

How does Utreexo improve the Bitcoin network?

As seen above Utreexo allows one to represent the state of the Bitcoin network as a dynamic accumulator, these accumulators are only a few kilobytes in size, as opposed to the current state of Bitcoin, which is over 5GB large.
To understand how Utreexo works, we have to first understand what a cryptographic accumulator is, and how it works. A cryptographic accumulators, allows us to query a set without storing or revealing all members of the set. This accumulator construction approach works great for Bitcoins UXTO set because for each transaction, we would like to query whether the TXOs being spent are indeed members of the UTXO set, and if not, reject the transaction.
Regular nodes when joining the network have to download the entire blockchain history which is over 580GB and verify transactions and build their own copy of the UTXO set. They then have to verify all state changes hitting the node. All of these processes are resource intensive operations, which thereby limit the number of participants in the network which then limits scalability.
This initial synchronization process, also known as the Initial Block Download (IBD) can take a very long time, depending on internet connection and hardware resources. One of the major factors affecting the speed of this IBD operation is the type of storage disk used and the speed of I/O operations, especially, the ability to rapidly perform random access reads. This is why computers using a solid state drive, which normally has far superior random access read times can use over 30 times less time to verify the transactions, as compared to computers with a Hard disk drive.
With Utreexo, the type of disk used wouldn’t make such a massive difference, as we will see just a slight performance difference between SSD computers and HDD computers
Utreexo introduces a hash-based dynamic accumulator with no trusted setup or manager requirements. As mentioned above, accumulators are compact representations of a set, to which elements can be added and proven. A Utreexo accumulator uses a forest of perfect Merkle trees which allows for efficient removals of elements from the accumulator, reducing the total number of leaves in the forest when deletions occur.
Additions are computable without any data beyond the accumulator and the element to be added, and deletions are computable with an inclusion proof of the data to be deleted.
The design of the accumulator is a forest of perfect binary hash trees. The representation of the accumulator which must be stored includes: the number of elements stored, and the root of every tree in the forest.
The logical structure of the perfect binary tree is beyond the scope of this article as this was just an introductory article. However, the full Utreexo paper can be found here.

Conclusion

Utreexo hash based accumulator aims to reduce the size of the bitcoin state to just a few kilobytes, allowing pretty much any device out there to join the bitcoin network and begin verifying transactions with no need for expensive and top shelf hardware. This will greatly increase scalability of the bitcoin network as the size of the accumulator grows very slowly (Onlogn) space complexity.

The above is the detailed content of Improving the Bitcoin network using Utreexo. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1582
276
Developing Kubernetes Operators in Go Developing Kubernetes Operators in Go Jul 25, 2025 am 02:38 AM

The most efficient way to write a KubernetesOperator is to use Go to combine Kubebuilder and controller-runtime. 1. Understand the Operator pattern: define custom resources through CRD, write a controller to listen for resource changes and perform reconciliation loops to maintain the expected state. 2. Use Kubebuilder to initialize the project and create APIs to automatically generate CRDs, controllers and configuration files. 3. Define the Spec and Status structure of CRD in api/v1/myapp_types.go, and run makemanifests to generate CRDYAML. 4. Reconcil in the controller

reading from stdin in go by example reading from stdin in go by example Jul 27, 2025 am 04:15 AM

Use fmt.Scanf to read formatted input, suitable for simple structured data, but the string is cut off when encountering spaces; 2. It is recommended to use bufio.Scanner to read line by line, supports multi-line input, EOF detection and pipeline input, and can handle scanning errors; 3. Use io.ReadAll(os.Stdin) to read all inputs at once, suitable for processing large block data or file streams; 4. Real-time key response requires third-party libraries such as golang.org/x/term, and bufio is sufficient for conventional scenarios; practical suggestions: use fmt.Scan for interactive simple input, use bufio.Scanner for line input or pipeline, use io.ReadAll for large block data, and always handle

go by example http middleware logging example go by example http middleware logging example Aug 03, 2025 am 11:35 AM

HTTP log middleware in Go can record request methods, paths, client IP and time-consuming. 1. Use http.HandlerFunc to wrap the processor, 2. Record the start time and end time before and after calling next.ServeHTTP, 3. Get the real client IP through r.RemoteAddr and X-Forwarded-For headers, 4. Use log.Printf to output request logs, 5. Apply the middleware to ServeMux to implement global logging. The complete sample code has been verified to run and is suitable for starting a small and medium-sized project. The extension suggestions include capturing status codes, supporting JSON logs and request ID tracking.

How does the switch statement work in Go? How does the switch statement work in Go? Jul 30, 2025 am 05:11 AM

Go's switch statement will not be executed throughout the process by default and will automatically exit after matching the first condition. 1. Switch starts with a keyword and can carry one or no value; 2. Case matches from top to bottom in order, only the first match is run; 3. Multiple conditions can be listed by commas to match the same case; 4. There is no need to manually add break, but can be forced through; 5.default is used for unmatched cases, usually placed at the end.

go by example generics go by example generics Jul 29, 2025 am 04:10 AM

Go generics are supported since 1.18 and are used to write generic code for type-safe. 1. The generic function PrintSlice[Tany](s[]T) can print slices of any type, such as []int or []string. 2. Through type constraint Number limits T to numeric types such as int and float, Sum[TNumber](slice[]T)T safe summation is realized. 3. The generic structure typeBox[Tany]struct{ValueT} can encapsulate any type value and be used with the NewBox[Tany](vT)*Box[T] constructor. 4. Add Set(vT) and Get()T methods to Box[T] without

What is the standard project layout for a Go application? What is the standard project layout for a Go application? Aug 02, 2025 pm 02:31 PM

The answer is: Go applications do not have a mandatory project layout, but the community generally adopts a standard structure to improve maintainability and scalability. 1.cmd/ stores the program entrance, each subdirectory corresponds to an executable file, such as cmd/myapp/main.go; 2.internal/ stores private code, cannot be imported by external modules, and is used to encapsulate business logic and services; 3.pkg/ stores publicly reusable libraries for importing other projects; 4.api/ optionally stores OpenAPI, Protobuf and other API definition files; 5.config/, scripts/, and web/ store configuration files, scripts and web resources respectively; 6. The root directory contains go.mod and go.sum

Integrating Go with Kafka for Streaming Data Integrating Go with Kafka for Streaming Data Jul 26, 2025 am 08:17 AM

Go and Kafka integration is an effective solution to build high-performance real-time data systems. The appropriate client library should be selected according to needs: 1. Priority is given to kafka-go to obtain simple Go-style APIs and good context support, suitable for rapid development; 2. Select Sarama when fine control or advanced functions are required; 3. When implementing producers, you need to configure the correct Broker address, theme and load balancing strategy, and manage timeouts and closings through context; 4. Consumers should use consumer groups to achieve scalability and fault tolerance, automatically submit offsets and use concurrent processing reasonably; 5. Use JSON, Avro or Protobuf for serialization, and it is recommended to combine SchemaRegistr

How to implement a set data structure efficiently in Go? How to implement a set data structure efficiently in Go? Jul 25, 2025 am 03:58 AM

Go does not have a built-in collection type, but it can be implemented efficiently through maps. Use map[T]struct{} to store element keys, empty structures have zero memory overhead, and the implementation of addition, inspection, deletion and other operations are O(1) time complexity; in a concurrent environment, sync.RWMutex or sync.Map can be combined to ensure thread safety; in terms of performance, memory usage, hashing cost and disorder; it is recommended to encapsulate Add, Remove, Contains, Size and other methods to simulate standard collection behavior.

See all articles