一个完整的比特币交易流程是怎么样的?

资讯 2024-06-20 阅读:25 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

本文解释了比特币交易的内容,目的和结果。下面的解释适用于新手和中级比特币用户。

This paper explains the content, purpose and outcome of the Bitcoin transaction. The following explanation applies to newer and middle-level Bitcoin users.

作为加密货币用户,你需要熟悉交易雏形——为了你对这种不断发展的创新有信心,以及作为理解新兴多签名交易和合约的基础,这两者都将在本系列的后期进行探讨。这不是纯技术文章,解释将集中在你需要了解的标准比特币交易——我们通常做的支出交易——并且我们将掩盖你可以安全忽略的内容。

As an encrypted currency user, you need to be familiar with the prototype of the transaction — both of which, in order to have confidence in this evolving innovation and as a basis for understanding emerging multi-signature transactions and contracts, will be explored at a later stage in this series. This is not a technical article, but an explanation will focus on the standard bitcoin transactions that you need to know — the expense transactions that we usually do — and we will hide what you can safely ignore.

本文底部的信息图提供了从钱包到区块链的整个比特币交易流程的全面说明。

The information chart at the bottom of this paper provides a comprehensive description of the entire Bitcoin transaction process from wallet to block chain.

注意:即使是核心开发人员也承认,用于描述交易及其组件的某些语言可能导致人们误解了实际发生的事情。在下面的解释中避免了这些误解。因此,在尝试尽可能简单的描述的同时,借助一些图表,让我们直接开始。

Caution: Even core developers recognize that some language used to describe transactions and their components may lead to a misunderstanding of what actually happened. These misunderstandings are avoided in the following explanation. So, while trying to describe them as simple as possible, let us begin directly with some graphs.

  • Bitcoin:具有大写的比特币指的是协议——代码,节点,网络及其对等交互。
  • bitcoin:用小写字母表示货币——我们通过比特币网络发送和接收的加密货币。
  • tx:在文本中使用的任何地方——是比特币交易的缩写。
  • txid:是的缩写——这是人和协议引用交易的哈希。
  • Script:是比特币协议的脚本系统的名称,用于处理和验证交易——脚本是一个聪明的,基于堆栈的指令引擎,它使得从简单支付到复杂的oracle监督合约的所有交易成为可能。
  • UTXO:的缩写,也称为“输出”。
  • satoshi:1 BTC=100,000,000 satoshi

1.定义

1. Definitions

比特币交易是一个经过签名的数据,它被广播到网络上,如果有效,最终会进入区块链的一个区块。

The Bitcoin transaction is a signed data that is broadcast on the network and, if valid, eventually enters a block in the block chain.

2.目的

2. Purpose

比特币交易的目的是将一定数量的比特币的所有权转移到比特币地址。

The purpose of the Bitcoin transaction was to transfer ownership of a certain amount of bitcoin to the Bitcoin address.

3.结果

Outcome

当你发送比特币时,你的钱包客户端会创建一个单一的数据结构,即比特币交易,然后广播到网络。网络上的比特币节点将中继和重新广播交易,如果交易有效,节点将把它包含在他们正在挖掘的块中。通常,在10-20分钟内,交易将与区块链中的一个区块中的其他交易一起被包括在内。此时接收者能够看到他们钱包中的交易金额。

When you send Bitcoin, your wallet client creates a single data structure, the Bitcoin transaction, and then broadcasts it to the network. The Bitcoin node on the network will relay and rebroadcast the transaction, and if the transaction is valid, the node will include it in the piece they are digging. Normally, within 10-20 minutes, the transaction will be included with other transactions in one of the blocks of the block chain. At this point, the recipient will be able to see the amount of the transaction in their wallet.

4.例子

4. Examples

以下是今年早些时候区块链中包含的示例交易:

The following are examples of transactions included in the block chain earlier this year:

image

此标准交易的主要组成部分采用颜色编码:

The main components of this standard transaction are coded in colour:

  • 交易ID(以黄色突出显示)
  • 描述符和元数据(蓝色花括号在右边详细说明)
  • 输入(粉色区域)
  • 输出(绿色区域)

首先,关于交易的四个公理:

First, with regard to the four justices of the transaction:

  • 我们发送的任何比特币金额总是发送到一个地址。
  • 我们收到的任何比特币金额都被锁定在接收地址——这通常与我们的钱包相关联。
  • 每当我们花费比特币时,我们花费的金额将始终来自之前收到的并且目前存在于我们钱包中的资金。
  • 地址接收比特币,但他们不发送比特币——比特币是从钱包发送的。

进入我们钱包的金额并不像实体钱包中的硬币那样混乱。收到的金额不会混合,但保持独立且与钱包收到的确切金额不同。这是一个例子:

The amount that comes into our wallets is not as confusing as the coins in the real wallets. The amounts received are not commingled, but remain independent and differ from the exact amount received in the wallets.

示例:

Example:

你创建一个全新的钱包,并及时收到三个0.01,0.2和3BTC的金额,如下所示:你将3BTC发送到与钱包相关联的地址,并由Alice向另一个地址付款。

You created a brand-new wallet and received three 0.01.02 and 3BTCs in time, as follows: you sent 3BTCs to the address connected to the wallet and Alice paid for the other address.

image

钱包报告的余额为3.21BTC,但如果你真的看钱包里面,你会看到——不是321,000,000 satoshi(321 mil satoshi),但是三个不同的数量仍然由他们的原始交易组合在一起:0.01,0.2和3BTC。

The balance reported in the wallet is 3.21BTC, but if you really look in the wallet, you will see - not 321,000,000 satoshi (321 m satoshi), but three different quantities are still combined by their original transactions: 0.01.02 and 3BTC.

image

收到的比特币金额不会混合,但保持分开,作为发送到钱包的确切金额。上例中的三个金额称为其原始交易的输出。

The amounts received in bitcoins are not commingled, but are kept separate as the exact amount to be sent to the wallet.

比特币钱包始终保持输出分离和独特。

Bitcoin wallets always maintain output separation and uniqueness.

输出是(通过标准交易)发送到比特币地址的金额,以及解锁输出金额的一组规则。在比特币用语中,输出称为“未使用的交易输出”或。

The output is the amount sent to the Bitcoin address (through a standard transaction) and a set of rules for unlocking the amount of the output. In Bitcoin, the output is called “out of an unused transaction” or

可以使用与接收地址相关联的私钥解锁标准交易输出。地址及其相关的公钥/私钥对将在本系列的后面部分介绍。目前,我们只关注总数。

You can use a private key unlocking standard transaction output associated with the receiving address. The address and its associated public key/private key pairs are presented at the end of this series. At present, we are only concerned with the total number.

示例:

Example:

让我们考虑一个例子,在你向Bob发送0.15BTC的情况下跟踪钱。

Let's consider an example of tracking money when you send 0.15 BTC to Bob.

正如我们所看到的,你的钱包没有选择15mil miloshi(0.15 BTC)来自一个无差别的321 mil satoshi组成钱包余额。相反,钱包从钱包中包含的三个现有输出中选择一个支出候选者。因此,它选择(由于各种原因,现在不重要)0.2BTC输出。钱包将解锁0.2 BTC输出并使用全部0.2BTC作为新的0.15 BTC交易的输入。0.2BTC输出在此过程中花费。

As we can see, your wallet does not choose 15 millimil miloshi (0.15 BTC) from a non-differentiated 321 milli satoshi balance. Instead, the wallet selects a candidate for expenditure from the three existing outputs contained in the wallet. So it chooses (for various reasons, it is not important now) 0.2 BTC output. The wallet unlocks 0.2 BTC output and uses all 0.2 BTC as input for the new 0.15 BTC transactions. 0.2 BTC output costs in this process.

image

你的钱包创建的花费交易将向Bob的地址发送0.15BTC——它将作为输出存放在他的钱包中——等待最终花费。

The expense transaction that your wallet created will send 0.15 BTC to Bob's address — which will be stored in his wallet as an output — to wait for the final cost.

0.05BTC差额(0.2 BTC输入减去0.15 BTC输出)称为改变,交易将通过新创建的地址将其发送回你的钱包。0.05 BTC改变的金额将作为新输出存放在你的钱包中——等待最终花费。所以,现在你钱包里会显示以下内容:

The difference of 0.05 BTC (0.2 BTC input minus 0.15 BTC output) is referred to as a change, and the transaction will be sent back to your wallet through a newly created address. The amount changed by BTC will be stored as a new output in your wallet - pending final cost. So now the following is shown in your wallet:

image

“等待花费”的三个输出中的每一个被锁定到其接收地址,直到选择它们中的一个或多个作为新花费交易的输入为止。

Each of the three "waiting for expense" outputs is locked to its receiving address until one or more of them is selected as input for the new cost transaction.

在后台,当选择作为新交易的输入时,不同的钱包客户端应用不同的逻辑规则。一个理智的钱包策略是尽可能先使用旧的,但实现方式不同。我们现在并不关注选择的方式,因为我们的目标一直是强调我们的钱包收到的金额是分开的和不同的。

Backstage, when choosing to be a new transaction, different wallet clients apply different logical rules. A rational wallet strategy is to use as much old as possible, but in different ways. We don't care about the way we choose, because our goal has always been to stress that the amounts we receive in our wallets are separate and different.

各种收到的金额不会像在实体钱包中那样混合。相反,在我们花费比特币时,收到的金额(UTXO)被单独使用(或组合使用)。在创建支出交易时,我们的钱包选择UTXO(具有足够的价值以满足我们想要发送的金额)并且通常创建两个新输出:一个用于接收器,一个用于我们收到的更改到钱包。更改成为我们钱包中的全新UTXO,我们发送的金额成为锁定到收件人地址的UTXO——可能与钱包相关联,也可能不与钱包相关联,例如冷存储。用作支出交易的输入的原始UTXO将“花费”并永久销毁。

The amounts received are not as mixed as in the real wallet. On the contrary, when we spend bitcoin, the amounts received (UTXO) are used separately (or in combination). When we create expenditure transactions, our wallet selects UTXO (with sufficient value to meet the amount we want to send) and usually creates two new outputs: one for the receiver, and one for the changes we receive to the wallet. Changes become a whole new UTXO in our wallet, and the amount we send becomes UTXO, which is locked to the addressee's address — may be linked to the wallet or not, for example, cold storage. The original UTXO, which is used as input to the expense transaction, will be “costed” and permanently destroyed.

这是钱包软件如何处理输出(UTXO)的介绍。一旦选择了UTXO用于支出,它就需要与接收它的地址相关联的私钥。此私钥兑换UTXO并允许它成为新支出交易中的输入。以前的交易输出被重新用作新交易的输入的机制是比特币协议功能的核心——完全符合Satoshi的设计。

This is a description of how the wallet software handles the output (UTXO). Once UTXO is selected for expenditure, it needs a private key associated with the address to which it is received. This private key converts UTXO and allows it to be an input in a new expense transaction. The mechanism for re-inputing the transaction output as a new transaction is at the core of the Bitcoin protocol function - fully in line with Satoshi's design.

建议你浏览我们汇智网的各种编程语言的区块链教程和区块链技术博客,深入了解区块链,比特币,加密货币,以太坊,和智能合约。

You are advised to go through the block chain curricula and block chain technology blogs in the various programming languages of our network, to get a deeper look at the block chain, bitcoin, encrypted currency, the talisman, and smart contracts.

  • java比特币开发教程,本课程面向初学者,内容即涵盖比特币的核心概念,例如区块链存储、去中心化共识机制、密钥与脚本、交易与UTXO等,同时也详细讲解如何在Java代码中集成比特币支持功能,例如创建地址、管理钱包、构造裸交易等,是Java工程师不可多得的比特币开发学习课程。
  • php比特币开发教程,本课程面向初学者,内容即涵盖比特币的核心概念,例如区块链存储、去中心化共识机制、密钥与脚本、交易与UTXO等,同时也详细讲解如何在Php代码中集成比特币支持功能,例如创建地址、管理钱包、构造裸交易等,是Php工程师不可多得的比特币开发学习课程。
  • php以太坊,主要是介绍使用php进行智能合约开发交互,进行账号创建、交易、转账、代币开发以及过滤器和交易等内容。
  • java以太坊开发教程,主要是针对java和android程序员进行区块链以太坊开发的web3j详解。
  • 以太坊入门教程,主要介绍智能合约与dapp应用开发,适合入门。
  • 以太坊开发进阶教程,主要是介绍使用node.js、mongodb、区块链、ipfs实现去中心化电商DApp实战,适合进阶。
  • python以太坊,主要是针对python工程师使用web3.py进行区块链以太坊开发的详解。
  • C#以太坊,主要讲解如何使用C#开发基于.Net的以太坊应用,包括账户管理、状态与交易、智能合约开发与交互、过滤器和交易等。
  • EOS入门教程,本课程帮助你快速入门EOS区块链去中心化应用的开发,内容涵盖EOS工具链、账户与钱包、发行代币、智能合约开发与部署、使用代码与智能合约交互等核心知识点,最后综合运用各知识点完成一个便签DApp的开发。

汇智网原创翻译,转载请标明出处。这里是原文

Original translation, reprinted with place of origin. This is .

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 0.00003374个比特币等于多少人民币/美金

    0.00003374个比特币等于多少人民币/美金
    0.00003374比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00003374比特币等于2.2826 1222美元/16.5261124728人民币。比特币(BTC)美元(USDT)人民币(CNY)0.00003374克洛克-0/22216.5261124728比特币对人民币的最新汇率为:489807.72 CNY(1比特币=489807.72人民币)(1美元=7.24人民币)(0.00003374USDT=0.0002442776 CNY)。汇率更新于2024...
  • 0.00006694个比特币等于多少人民币/美金

    0.00006694个比特币等于多少人民币/美金
    0.00006694比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00006694比特币等于4.53424784美元/32.5436 16人民币。比特币(BTC)美元(USDT)人民币(CNY)0.000066944.53424784【比特币密码】32.82795436 16比特币对人民币的最新汇率为:490408.64 CNY(1比特币=490408.64人民币)(1美元=7.24人民币)(0.00006694USDT=0.0004846456 CNY)汇率更新时...
  • 0.00015693个比特币等于多少人民币/美金

    0.00015693个比特币等于多少人民币/美金
    0.000 15693比特币等于多少人民币?根据比特币对人民币的最新汇率,0.000 15693比特币等于10.6 1678529美元/76.86554996人民币。比特币(BTC)【比特币价格翻倍】美元(USDT)人民币(CNY)0.000/克洛克-0/5693【数字货币矿机】10.6 167852976.8655254996比特币对人民币的最新汇率为:489,807.72 CNY(1比特币= 489,807.72人民币)(1美元=7.24人民币)(0.00015693 U...
  • 币圈院士:5.20比特币(BTC)以太坊(ETH)行情分析

    币圈院士:5.20比特币(BTC)以太坊(ETH)行情分析
    利空出尽?华尔街多头坚信美股将摆脱泥潭 经济衰退风险被夸大A lot of people on Wall Street believe that beauty will escape the quagmire; the risk of recession is exaggerated. 从目前美国经济的情况加上美股先有的走势来判断,确信通胀已经或即将见顶,这为价格压力回落铺平了道路,这最终将使美联储得以放缓...
  • 2000年美国GDP占世界的304%,中国GDP仅占35%,现在呢?

    2000年美国GDP占世界的304%,中国GDP仅占35%,现在呢?
    GDP作为全球公认的实力基准,就像是一个大国实力的代言人,它是布雷顿森林体系下全球团结的声音。它不仅仅是数字的累积,更是大国综合实力的人格化,默默诉说着每个国家的辉煌与荣耀。虽然GDP不是衡量一个国家综合实力的唯一标准,但无疑是最关键的指标之一。作为一面镜子,它反映了国家的经济实力和发展水平,是国家综合实力的重要体现,不容忽视。2000年,中国GDP迈过/克洛克-0/万亿美元的重要门槛,达到/克洛克-0/。2/克洛克-0/万亿美元(折合人民币7。7万亿元)。然而,在全球经济的...
标签列表