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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

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)

What is Ouyi for? What is Ouyi What is Ouyi for? What is Ouyi Apr 01, 2025 pm 03:18 PM

OKX is a global digital asset trading platform. Its main functions include: 1. Buying and selling digital assets (spot trading), 2. Trading between digital assets, 3. Providing market conditions and data, 4. Providing diversified trading products (such as derivatives), 5. Providing asset value-added services, 6. Convenient asset management.

What are the recommended websites for virtual currency app software? What are the recommended websites for virtual currency app software? Mar 31, 2025 pm 09:06 PM

This article recommends ten well-known virtual currency-related APP recommendation websites, including Binance Academy, OKX Learn, CoinGecko, CryptoSlate, CoinDesk, Investopedia, CoinMarketCap, Huobi University, Coinbase Learn and CryptoCompare. These websites not only provide information such as virtual currency market data, price trend analysis, etc., but also provide rich learning resources, including basic blockchain knowledge, trading strategies, and tutorials and reviews of various trading platform APPs, helping users better understand and make use of them

How to roll positions in digital currency? What are the digital currency rolling platforms? How to roll positions in digital currency? What are the digital currency rolling platforms? Mar 31, 2025 pm 07:36 PM

Digital currency rolling positions is an investment strategy that uses lending to amplify trading leverage to increase returns. This article explains the digital currency rolling process in detail, including key steps such as selecting trading platforms that support rolling (such as Binance, OKEx, gate.io, Huobi, Bybit, etc.), opening a leverage account, setting a leverage multiple, borrowing funds for trading, and real-time monitoring of the market and adjusting positions or adding margin to avoid liquidation. However, rolling position trading is extremely risky, and investors need to operate with caution and formulate complete risk management strategies. To learn more about digital currency rolling tips, please continue reading.

Tutorial on how to register, use and cancel Ouyi okex account Tutorial on how to register, use and cancel Ouyi okex account Mar 31, 2025 pm 04:21 PM

This article introduces in detail the registration, use and cancellation procedures of Ouyi OKEx account. To register, you need to download the APP, enter your mobile phone number or email address to register, and complete real-name authentication. The usage covers the operation steps such as login, recharge and withdrawal, transaction and security settings. To cancel an account, you need to contact Ouyi OKEx customer service, provide necessary information and wait for processing, and finally obtain the account cancellation confirmation. Through this article, users can easily master the complete life cycle management of Ouyi OKEx account and conduct digital asset transactions safely and conveniently.

On which platform is web3 transaction? On which platform is web3 transaction? Mar 31, 2025 pm 07:54 PM

This article lists the top ten well-known Web3 trading platforms, including Binance, OKX, Gate.io, Kraken, Bybit, Coinbase, KuCoin, Bitget, Gemini and Bitstamp. The article compares the characteristics of each platform in detail, such as the number of currencies, trading types (spot, futures, options, NFT, etc.), handling fees, security, compliance, user groups, etc., aiming to help investors choose the most suitable trading platform. Whether it is high-frequency traders, contract trading enthusiasts, or investors who focus on compliance and security, they can find reference information from it.

Top 10 of the formal Web3 trading platform APP rankings (authoritatively released in 2025) Top 10 of the formal Web3 trading platform APP rankings (authoritatively released in 2025) Mar 31, 2025 pm 08:09 PM

Based on market data and common evaluation criteria, this article lists the top ten formal Web3 trading platform APPs in 2025. The list covers well-known platforms such as Binance, OKX, Gate.io, Huobi (now known as HTX), Crypto.com, Coinbase, Kraken, Gemini, BitMEX and Bybit. These platforms have their own advantages in user scale, transaction volume, security, compliance, product innovation, etc. For example, Binance is known for its huge user base and rich product services, while Coinbase focuses on security and compliance. Choosing a suitable platform requires comprehensive consideration based on your own needs and risk tolerance.

How to calculate the transaction fee of gate.io trading platform? How to calculate the transaction fee of gate.io trading platform? Mar 31, 2025 pm 09:15 PM

The handling fees of the Gate.io trading platform vary according to factors such as transaction type, transaction pair, and user VIP level. The default fee rate for spot trading is 0.15% (VIP0 level, Maker and Taker), but the VIP level will be adjusted based on the user's 30-day trading volume and GT position. The higher the level, the lower the fee rate will be. It supports GT platform coin deduction, and you can enjoy a minimum discount of 55% off. The default rate for contract transactions is Maker 0.02%, Taker 0.05% (VIP0 level), which is also affected by VIP level, and different contract types and leverages

Binance binance computer version entrance Binance binance computer version PC official website login entrance Binance binance computer version entrance Binance binance computer version PC official website login entrance Mar 31, 2025 pm 04:36 PM

This article provides a complete guide to login and registration on Binance PC version. First, we explained in detail the steps for logging in Binance PC version: search for "Binance Official Website" in the browser, click the login button, enter the email and password (enable 2FA to enter the verification code) to log in. Secondly, the article explains the registration process: click the "Register" button, fill in the email address, set a strong password, and verify the email address to complete the registration. Finally, the article also emphasizes account security, reminding users to pay attention to the official domain name, network environment, and regularly updating passwords to ensure account security and better use of various functions provided by Binance PC version, such as viewing market conditions, conducting transactions and managing assets.