Home web3.0 Bitcoin full node synchronization too slow? SPV mechanism that can verify payments without using a full node

Bitcoin full node synchronization too slow? SPV mechanism that can verify payments without using a full node

Mar 06, 2024 pm 01:22 PM
Blockchain Bitcoin btc Bitcoin blockchain

Since its birth, Bitcoin has been criticized for wasting power resources, but its powerful computing power is a necessary process, and it is difficult to find a better way to replace it.

As it has been around for longer and longer, more and more people are participating in transactions on its underlying technology blockchain, and the content of the distributed ledger has expanded rapidly, SAToshi NakamotoThe storage amount of 1 MB set for a block limits the transaction process and transaction speed.

Therefore, downloading the entire ledger has become a headache. Can you not download the entire ledger, but only find the parts that are relevant to you? In other words, find a filter and keep the useless stuff out.

So the SPV mechanism appeared.

01. SPV mechanism

##The full name of SPV is "Simplified Payment Verification", common translation For simple payment verification. Its purpose is to verify whether a certain transaction exists, but it cannot verify the legality of the transaction. This requires a two-step operation. The first step is to confirm whether the transaction payment has been verified. The second step is to calculate how many confirmations have been obtained.

Satoshi Nakamoto mentioned this concept in his paper:

It is still possible to verify transactions when not running a full node. Users only need to keep the longest chain All block header data on.

To put it simply:

If Xiao Hei transfers a Bitcoin to Da Bai, how can Da Bai know that the transaction of the coin has been completed? It is impossible to find witnesses in a decentralized system.

According to the traditional method: Dabai needs to download all the blockchain ledgers, and then find Xiaohei’s account. First, check whether it has such a Bitcoin before, and whether it has been transferred to Dabai. Record. Just the first step caused Dabai's storage capacity to explode.

The block capacity of each Bitcoin is 1 MB, and the block header is only 80 KB, so you only need to download the block header to save a lot of space.

What exactly are block headers and block bodies?

Compare the block header to a person's head, which stores the block's header information, such as hash value, timestamp, etc.; while the block body is similar to a person's entire body, storing Detailed data of this block, such as specific transaction information. The block header is included in the block body.

That is to say, although a block header has a hash value, after downloading the block header, Dabai still cannot know which block the transaction is recorded in.

At this time, you need to find the full transaction ID with the transaction ID. The node checks to see if it exists and in which block it is.

02. SPV payment verification process

Hey, what if the miners and Xiaohei join forces to deceive Dabai?

This is where the SPV mechanism comes in handy.

If the miners say that Xiao Hei has turned around, he has not.

Then in order to lie, he must forge more transactions so that these transactions can get the same hash value as in his own block header. However, due to the technical characteristics of hashing, it is difficult to achieve the same hash value of the changed data as the original data.

In short, the entire transaction process of SPV is as follows:

The first step is to confirm whether the transaction payment has been verified

. First calculate the transaction hash value of the payment to be verified, save the block header from the blockchain network to the local, and then obtain the Merkel tree hash authentication path corresponding to the payment to be verified from the blockchain.

Compare whether the obtained hash value is consistent with your own. If they are consistent, it proves that the payment is genuine and valid.

The second step,

verify how many confirmations

have been obtained. Based on the position of the block header, the number of confirmations that the payment has received is determined. After completing these two steps, the transaction payment verification is completed.

03. Summary

The SPV mechanism not only

saves storage space

, but also reduces the waste of P2P network bandwidth, allowing ordinary users to complete the download without It can also be operated without data, and it also brings great convenience to auditing accounts. However, since SPV does not have complete block data, it cannot verify that the transaction does not exist. This situation can easily lead to double spending, and random link nodes may also be maliciously attacked by the network.

Do you think there are any other advantages and disadvantages of SPV?

Welcome to share your views in the message area.

The above is the detailed content of Bitcoin full node synchronization too slow? SPV mechanism that can verify payments without using a full node. 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

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.

Undress AI Tool

Undress AI Tool

Undress images for free

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)

Top 10 Digital Virtual Currency Apps Rankings: Top 10 Digital Currency Exchanges in Currency Circle Trading Top 10 Digital Virtual Currency Apps Rankings: Top 10 Digital Currency Exchanges in Currency Circle Trading Apr 22, 2025 pm 03:00 PM

The top ten digital virtual currency apps are: 1. OKX, 2. Binance, 3. gate.io, 4. Coinbase, 5. Kraken, 6. Huobi, 7. KuCoin, 8. Bitfinex, 9. Bitstamp, 10. Poloniex. These exchanges are selected based on factors such as transaction volume, user experience and security, and all provide a variety of digital currency trading services and an efficient trading experience.

Meme Coin Exchange Ranking Meme Coin Main Exchange Top 10 Spots Meme Coin Exchange Ranking Meme Coin Main Exchange Top 10 Spots Apr 22, 2025 am 09:57 AM

The most suitable platforms for trading Meme coins include: 1. Binance, the world's largest, with high liquidity and low handling fees; 2. OkX, an efficient trading engine, supporting a variety of Meme coins; 3. XBIT, decentralized, supporting cross-chain trading; 4. Redim (Solana DEX), low cost, combined with Serum order book; 5. PancakeSwap (BSC DEX), low transaction fees and fast speed; 6. Orca (Solana DEX), user experience optimization; 7. Coinbase, high security, suitable for beginners; 8. Huobi, well-known in Asia, rich trading pairs; 9. DEXRabbit, intelligent

The latest updates to the oldest virtual currency rankings The latest updates to the oldest virtual currency rankings Apr 22, 2025 am 07:18 AM

The ranking of virtual currencies’ “oldest” is as follows: 1. Bitcoin (BTC), issued on January 3, 2009, is the first decentralized digital currency. 2. Litecoin (LTC), released on October 7, 2011, is known as the "lightweight version of Bitcoin". 3. Ripple (XRP), issued in 2011, is designed for cross-border payments. 4. Dogecoin (DOGE), issued on December 6, 2013, is a "meme coin" based on the Litecoin code. 5. Ethereum (ETH), released on July 30, 2015, is the first platform to support smart contracts. 6. Tether (USDT), issued in 2014, is the first stablecoin to be anchored to the US dollar 1:1. 7. ADA,

What are the digital currency trading apps suitable for beginners? Learn about the coin circle in one article What are the digital currency trading apps suitable for beginners? Learn about the coin circle in one article Apr 22, 2025 am 08:45 AM

When choosing a digital currency trading platform suitable for beginners, you need to consider security, ease of use, educational resources and cost transparency: 1. Priority is given to platforms that provide cold storage, two-factor verification and asset insurance; 2. Apps with a simple interface and clear operation are more suitable for beginners; 3. The platform should provide learning tools such as tutorials and market analysis; 4. Pay attention to hidden costs such as transaction fees and cash withdrawal fees.

The top ten free platform recommendations for real-time data on currency circle markets are released The top ten free platform recommendations for real-time data on currency circle markets are released Apr 22, 2025 am 08:12 AM

Cryptocurrency data platforms suitable for beginners include CoinMarketCap and non-small trumpet. 1. CoinMarketCap provides global real-time price, market value, and trading volume rankings for novice and basic analysis needs. 2. The non-small quotation provides a Chinese-friendly interface, suitable for Chinese users to quickly screen low-risk potential projects.

Recommended top 10 for easy access to digital currency trading apps (latest ranking in 25) Recommended top 10 for easy access to digital currency trading apps (latest ranking in 25) Apr 22, 2025 am 07:45 AM

The core advantage of gate.io (global version) is that the interface is minimalist, supports Chinese, and the fiat currency trading process is intuitive; Binance (simplified version) has the highest global trading volume, and the simple version model only retains spot trading; OKX (Hong Kong version) has the simple version of the interface is simple, supports Cantonese/Mandarin, and has a low threshold for derivative trading; Huobi Global Station (Hong Kong version) has the core advantage of being an old exchange, launches a meta-universe trading terminal; KuCoin (Chinese Community Edition) has the core advantage of supporting 800 currencies, and the interface adopts WeChat interaction; Kraken (Hong Kong version) has the core advantage of being an old American exchange, holding a Hong Kong SVF license, and the interface is simple; HashKey Exchange (Hong Kong licensed) has the core advantage of being a well-known licensed exchange in Hong Kong, supporting France

A list of special services for major virtual currency trading platforms A list of special services for major virtual currency trading platforms Apr 22, 2025 am 08:09 AM

Institutional investors should choose compliant platforms such as Coinbase Pro and Genesis Trading, focusing on cold storage ratios and audit transparency; retail investors should choose large platforms such as Binance and Huobi, focusing on user experience and security; users in compliance-sensitive areas can conduct fiat currency trading through Circle Trade and Huobi Global, and mainland Chinese users need to go through compliant over-the-counter channels.

Can two exchanges convert coins to each other? Can two exchanges convert coins to each other? Can two exchanges convert coins to each other? Can two exchanges convert coins to each other? Apr 22, 2025 am 08:57 AM

Can. The two exchanges can transfer coins to each other as long as they support the same currency and network. The steps include: 1. Obtain the collection address, 2. Initiate a withdrawal request, 3. Wait for confirmation. Notes: 1. Select the correct transfer network, 2. Check the address carefully, 3. Understand the handling fee, 4. Pay attention to the account time, 5. Confirm that the exchange supports this currency, 6. Pay attention to the minimum withdrawal amount.