如何使用blockchain.info区块链浏览器查询比特币交易信息?

资讯 2024-06-28 阅读:35 评论:0
币界网报道: 在以太坊世界中, 当我们发起一笔转账交易, 可以从 Etherscan 这样的以太坊区块链浏览器上搜索查看交易的详细信息, 我在之前有写过详细的关于 Etherscan 的使用教程,...
美化布局示例

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

APP下载   官网地址
币界网报道:

在以太坊世界中, 当我们发起一笔转账交易, 可以从 Etherscan 这样的以太坊区块链浏览器上搜索查看交易的详细信息, 我在之前有写过详细的关于 Etherscan 的使用教程, 那么今天, 让我们来到比特币的世界, 学习如何使用blockchain.info区块链浏览器查询比特币区块链上的交易信息。

In the Etherno world, when we start a transfer transaction, we can search for details of the transaction from an Ethercan-based block-chain browser, and I've written a detailed instruction about the use of Ethercan, so today, let's go to the Bitcoin world and learn how to use a blockchain.info block-chain browser to search for transaction information on the Bitco block chain.

前言

Foreword to

1. 什么是 UTXO 机制

What's the UTXO mechanism ?

为了方便大家理解后续 Blockchain 上所显示的内容, 我们还是要首先讲解一下 UTXO 机制, 这也是比特币和以太坊的一个重要的区别。UTXO 代表 Unspent Transaction Output, 它是比特币交易的基本单位是未经使用的一个交易输出[1]。UTXO 是不能再分割、被所有者锁住的或记录于区块链中的并被整个网络识别成货币单位的一定量的比特币[2]。

In order to facilitate your understanding of what was shown in the follow-up Blockchain, we would like to start by explaining the UTXO mechanism, which is an important difference between Bitcoin and Etheria. UTXO represents Unspent Transport Output, the basic unit of Bitcoin transactions is an unused transaction output [1]. UTXO is a certain amount of bitcoins that can no longer be separated, locked by owners or recorded in a block chain and identified by the entire network as monetary units [2].

举一个很详细的例子来说明, 小明的妈妈想去买两瓶酱油, 一瓶酱油的价格是 6 元钱, 但是由于小明的妈妈需要在家做饭, 所以委托小明去商店购买, 小明的妈妈给小明 1 张 10 元, 一张 5 元, 和 一张 1 元, 并承诺其中的 1 元钱做为小明的 “跑腿费”。于是小明将 1 元钱先 “纳入麾下”, 然后到商店, 将 15 元给到售货员, 换取两瓶酱油花费 12 元。售货员找回 3 元钱, 小明回到家将三元钱还给妈妈。

To give a very detailed example, Ming's mother wanted to buy two bottles of soy sauce, and the price of a soy sauce was $6, but because Ming's mom needed to cook at home, she commissioned Ming to buy it at the store, and Ming's mom gave Ming 1 dollar, 1 dollar, 1 dollar, and 1 dollar, and promised to pay Ming back the sum of $3.

在这个故事中, 10 元和 5 元属于小明妈妈的 output[注1], 而对于小明来说, 他充当的是 矿工的角色, 所以小明妈妈给小明的 1 元钱是矿工费, 而对于商店售货员来说, 他的 12 块钱是 input, 而找回的 3 元钱, 对于小明妈妈而言, 就是 UTXO。

In this story, $10 and $5 belong to Ming's mom's output (note 1), and for Ming, he acts as a miner, so Ming's money for Ming's 1 dollar is miner's fee, and for the store salesman, his 12 dollars is input, and the 3 yuan is recovered, and for Ming's mom, it's UTXO.

这里还要提到有趣的一点, 就是上述小明妈妈最初拿出的 10 元和 5 元分别是一个 UTXO, 是小明妈妈在买其他货物的时候, 作为找零获得的。并且 10 元和 5 元都是不可分割的。同时如果一个 UTXO 比一笔交易所需数量大, 它仍会被当做一个整体而消耗掉, 但是同时会在交易中生成零头。

And the interesting thing to mention here is that the 10 and 5 dollars that Ming's mother initially took out is a UTXO, which MIM's mother acquired as a change when buying other goods. And the 10 and 5 dollars are indivisible. And if a UTXO is bigger than the amount required for a transaction, it will still be consumed as a whole, but it will also generate zeros in the transaction.

_____.jpg

图1-1

Figure 1-1

2. 比特币找零地址

2. Bitcoin for a change of address

上述这个故事中, 有一个概念我们要着重讲解一下, 就是 “找零机制”。首先我们要知道, 找零地址可以是我们之前使用的地址 (即转账地址), 也可以是新的地址。如果我们在转账的时候, 不设置找零地址的话, 那么所有的 “找零” 都将支付给矿工。在上述例子中, 如果小明买完酱油之后, 小明的妈妈忘记向小明要回找零的 3 元钱, 那这笔钱是不是就被小明 “私吞” 了呢? 同样, 如果你有 100 个 BTC, 转账给朋友 1 个 BTC之后, 忘记设定找零地址, 那么剩下的 99 个 BTC 将全部 “无偿” 捐献给打包这笔交易的矿工。听上去是不是很可怕?

In one of the above-mentioned stories, we want to focus on the idea of finding a zero mechanism. First of all, we need to know that finding a zero address can be the address we used earlier (i.e. the transfer address) or a new address. If we don't set a zero address at the time of the transfer, then all the "finding" will be paid to the miners. In the above-mentioned example, if Ming's mother forgets to find zero money from Ming to Ming, then the money will be “approached.” Similarly, if you have 100 BTCs, transfer one BTC to a friend, and forget to set a zero address, the remaining 99 BTCs will donate all of them “no charge” to the miners who packed the deal, doesn't it sound awful?

但是, imToken 的用户则无需担心忘记设置找零地址, 因为 imToken 已经自动帮你完成这一切, 即每次转账都会新为你生成一个找零地址[注2]。

However, users of imToken need not worry about forgetting to find a zero address, because imToken has already done all of this automatically, which means that each transfer will generate a new zero address for you [note 2].

那么有的人会问道, 为什么每次都要生成一个新的地址, 用于接收找零代币? 直接使用原地址接收找零不好吗? 这个问题我们会在下边谈到。

So someone would ask, "Why does it always have to create a new address for the receipt of zero coins?

基础篇

Foundation

3. 如何查询转账地址信息

3. How to query the transfer address

如果你对上述概念还是一知半解, 没有关系, 我通过实战操作再来帮助你深入理解。打开 https://blockchain.info/ 网站, 输入你的 BTC 转账地址, 点击 Search 按钮, 进行查询。

If you still know the concepts in question, it doesn't matter, I'll help you understand them in real time. Open the https://blockchain.info/ website, enter your BTC transfer address, click on the Seech button, and search.

_____2018-04-08___5.02.21.png

图 3-1

Figure 3-1

这里可以看到, 我当前地址曾经一共收到过 0.01 个BTC (Total Received 所显示), 但是由于我使用 imToken 发起过一次转账交易, 所以当前的地址中所剩 BTC 为 0 (Final Balance 所显示)。

As can be seen here, I have received a total of 0.01 BTCs at my current address (as shown by Total Received), but since I have initiated a transfer transaction using ImToken, the remaining BTCs at the current address are 0 (as shown by Final Balance).

这里有一个问题, 我当前地址本来有 0.01 个 BTC, 而我只转出 0.001 个 BTC, 为什么当前地址余额变成了 0 ?

Here's a question: I have 0.01 BTC at my current address, and I just transfer 0.001 BTC, and why is the current address balance turned 0?

其实这就是文章开篇提到的比特币 UTXO 机制, 比特币为了安全性和匿名性, 可以在每次使用一个地址转账过后, 将 “找零” 转向新的地址。可以看到图 3-2 的 Transactions 类目下一笔转账交易竟然出现两个 “收款地址”, 一个是真正的转账目标地址, 另一个则是找零地址。但是我们单从地址上无法分辨到底哪个是找零地址, 哪个是转账地址, 只能通过已知哪个是目标地址, 然后使用排除法判断。但通过我测试, 一般情况下第一个都是转账地址, 第二个为找零地址 (多笔转账不适宜)。

In fact, this is the bitcoin UTXO mechanism referred to in the opening of the article, which, for the sake of security and anonymity, can shift the word "zero" to a new address after each transfer using an address. It can be seen that two “receipt addresses” appear for a transfer transaction under the Transactions class of 3-2. One is the real target address for the transfer, the other is the zero address. But we can't tell from an address which is the zero address, which is the transfer address, only by knowing which is the target address, and then by using the exclusion method. But by my test, the first is usually the transfer address, and the second is the zero address (many transfers are not appropriate).

_____2018-04-08___5.53.27__.png

图 3-2

Figure 3-2

4. 如何查询交易是否成功

4. How to query the success of the transaction

如图 4-1, 我使用 imToken 中生成的 BTC 地址 19Fbiok5SuP7YWReGDwMp

As chart 4-1, I use the BTC address generated in imToken 19Fbiok5Sup7YWReGDwMp

77tfx1vVDVih1 向 1Aqyai7gLr44DPmPdW3S24YeEKfiiW9foV 地址转账0.0009 个 BTC, 这时候交易属于 Uncomfirmed Transaction 转账, 也就是说还没有矿工确认打包。BTC 和以太坊目前都是 POW 机制, 即交易需要矿工打包确认。不同的是, 以太坊的出块速度是 15 秒, 而比特币需要 10 分钟。

77tfx1vVDVih1 transfers 0.0009 BTCs to 1Aqyai7g Lr44DPmPdW3S24YeKfiiW9foV addresses when the transaction belongs to Uncomfurmed Transport, i.e. no miners confirm the package. BTC and Ether are currently Pow mechanisms, i.e. the transaction requires confirmation by the miners.

_____2018-04-09___4.03.54.png

图 4-1

Figure 4-1

我们普遍认为确认一笔比特币交易确认需要 6 个区块确认, 但是一般情况下只要看到 1 个区块确认, 即 1 Comfirmation(如图 3-2), 就基本可以确定这笔交易成功了, 同时也可以使用 imToken 查看到余额的变化。

There is a general consensus that the confirmation of a bitcoin transaction requires six blocks to be confirmed, but normally one block to be confirmed, i.e., one community (e.g. figure 3-2), is basically certain that the transaction has been successful, and that ImToken can be used to see the changes in the balance.

_____2018-04-09___4.21.00.png

图 4-2

Figure 4-2

5. 如何查询矿工费

5. How to find miners' fees

比特币和以太坊一样, 转账也需要支付足够的矿工费。比特币的最小计数单位是 “聪” (Satoshi, 简称 sat)。其实在比特币的底层协议中, 并没有规定每笔交易的矿工费需要多少, 只是要求地址中总输入(input)不小于总输出(output), 所以从理论上来说, 如果一笔转账交易不支付矿工费, 也是会被矿工打包, 并且交易成功, 但是时间确是不确定的, 有可能会等上很多年。

Bitcoin, like Etheria, transfers also have to pay enough for miners. Bitcoin's subtotal unit is "Satoshi," but in the bottom line of Bitcoin, it doesn't specify how much it costs per transaction, it just requires that the total input be no less than the total output (output), so theoretically, if a transfer transaction does not pay the miners, it's also packed by the miners, and the deal is successful, but it's uncertain, and it's likely to wait for many years.

目前比特币的转账矿工费, 是按照交易数据字节大小和 input 以及 output 的数量来来确定的。数据越大, 交易数量越多, 矿工费越多。一般情况下每笔交易的字节数在 200 ~ 300 bytes, 而每个 bit 你所愿意支付的费用可以自定义, 例如使用 imToken 设置 20 sat/b, 以图 5-1 为例。

The transfer fee for Bitcoin is currently determined by the size of the transaction data bytes and the number of input and outputs. The larger the data, the greater the number of transactions, the greater the cost for miners. Normally, the number of bytes per transaction is 200 ~ 300 bytes, and each bit is self-defined, for example, using the imToken set 20 sat/b, for example, in figure 5-1.

_____2018-04-09___5.14.44.png

图 5-1

Figure 5-1

这笔交易的数据大小是 226 bytes, 而我设置的矿工费是 20 sat/b, 所以我消耗的矿工费是 gas fee=226 * 20 * 10e-8, 大约是 0.0000452 个 BTC。

The size of the transaction is 226 bytes, and I set the miner's fee at 20 sat/b, so I spent the miner's fee at gas feed=226 * 20 * 10e-8, about 0.000452 BTCs.

但其实绝大多数钱包服务商在计算用户交易矿工费的时候, 是提前估算好的, 所以会存在一些偏差。

But the vast majority of wallet providers, when calculating the cost of the user-trading miners, are pre-estimated, so there are some deviations.

进阶篇

Step

6. From -> To OR Input -> Output

用户在使用 Blockchain 查询 BTC 交易的时候, 会发现很多和使用 Ethereum 的不同之处。因为以太坊属于 account 模型, 它是 “From -> To“ 结构, 我们发起转账时, 每一个 TxId 都包含一个付款地址和一个收款地址。

Users find a lot of differences in the BTC transactions when they use Blockchain. Because Ether is the account model, it is the "From-> To" structure, and when we initiate the transfer, each TxId contains a payment address and a collection address.

而比特币则不然, 它是 UTXO 机制, 即多个 input 可以对应多个 output[注3], 大家可以回忆一下开篇我们讲到的故事, 小明的妈妈给小明 10 元和 5 元, 这是两个 output, 而 input 是 12 元, 但我们可以认为 12 元其实是多个 input, 包括给采购商的价格、给政府的税收、店家的利润以及成本等等。

And Bitcoin's not, but it's a UTXO mechanism, that's multiple inputs that can match multiple outputs [note 3], and you can remember the opening story that Ming's mother gave to Ming for 10 and 5 dollars, which is two outputs, and input is 12 dollars, but we can think that 12 dollars is actually multiple inputs, including prices to buyers, taxes to the government, shopkeeper's profits and costs.

_____2018-04-10___4.41.50.png

图 6-1

Figure 6-1

所以我们在查询一笔 BTC 交易的时候, 如果输入交易号进行查询, 可能会出现多个地址同时向一个地址发起一笔交易, 也可能会出现一个地址向多个地址同时发起交易。图 6-1 向我们展示了多个 output 对应一个 input。

So when we look at a BTC transaction, if you enter a transaction number for a query, there may be multiple addresses that start a transaction at one address at the same time, or one address that starts a transaction at the same time to multiple addresses. Figure 6-1 shows us multiple outputs for one input.

7. 关于 Unable to decode output address

Unable to decode output address

我们在使用 blockchain.info 查询一些交易信息的时候, 会发现如图7-1这样的情况, 有些收款地址显示为 Unable to decode output address, 却看不到真正的收款地址。那么这个是怎么回事呢?

When we use Blockchai.info to search for some transaction information, we find that, as in figure 7-1, some of the collection addresses are shown as Unable to decode output address, but we don't see the real collection address. So what's going on?

_____2018-04-11___11.28.02.png

点击交易号, 进入该笔交易的详情, 我们可以看到 Output Scripts 里:`RETURN PUSHDATA(32) [some garbage]` 这个脚本从 `OP_RETURN` 开始, 被称为空数据输出, 用于用户在区块链中存储任意数据。由于这些输出数据不同于代币转账, 是不能进行花费的, 所以 scripts 脚本不能对他进行有效评估。但其实这样的数据输出大多是伴随着一个正常转账输出出现的。举个例子, 这有点像转账信息备注, 比如图7-2, 用户在做这笔 0.577 个 BTC 转账的时候, 就可以将转账的一些信息写入这笔交易 “ Alice send to Bob”. 但是这样的信息是无法进行消费的, 所以会永远处于 Unspent 状态, 并且出现 Unable to decode output address (无法解析输出地址) 这样的情况。

Click on the transaction number to enter into the details of the transaction, and we can see in OutputS scripts: `RETURN PUSHDATA(32) [some garbage] `This script starts with `OP_RETURN ', which is called an empty data output, and is used by users to store arbitrary data in the chain of blocks. Because these output data are different from money transfers, they cannot be spent, so Scripts scripts cannot effectively assess him. But much of this data output is accompanied by a normal transfer output. For example, this is sort of a transfer note, such as figure 7-2, when users can write some of the transfer information into the transaction “Alice send to Bob” but this information is not affordable, so it will always be in the state of Unspent, and there will be a Unable to decode external address.

_____2018-04-11___11.48.20.png

结语

Concluding remarks

8. UTXO 的好处

8. Benefits of UTXO

上边我们在讲到找零地址的时候, 抛出一个问题, 为什么比特币在做每笔转账的时候, 都要设置新的找零地址。其实这一点, 中本聪在<<比特币: 一种点对点的电子现金系统>> 里边, 在谈及隐私 (Privacy) 特性时有提到: “作为额外的预防措施, 使用者可以让每次交易都生成一个新的地址, 以确保这些交易不被追溯到一个共同的所有者。” [4]

We're talking about zero addresses, and there's a question as to why bitcoin, when making every transfer, has to have a new zero address. In fact, this is the point in < < bitcoin: a point-to-point electronic cash system > > inside, in the context of privacy, it is mentioned that: “A further precaution, users can allow each transaction to generate a new address to ensure that the transaction is not traced back to a common owner.”[4]

所以说, 比特币的 UTXO 机制, 更好的保障了比特币的匿名性。如果我们在查看一个有多笔输出的钱包地址情况下, 很难确认哪个是找零地址, 哪个是收款地址, 除非我们是当事人。

So, the UTXO mechanism of Bitcoin is a better safeguard of Bitcoin's anonymity. If we look at a wallet address with multiple exits, it's hard to know which one is a zero, which one is a collection address, unless we're the parties.

作者注:

Author's Note:

注[1]: input 和 output 是一个相互转化的关系, 因为你当前钱包的余额是由 input 得来, 而当你发起转账时, 他就变成了 output. 所以说 input 和 output 是一个抽象出来的概念。

NOTE [1]: Input and output are a transversal relationship, because the balance of your current wallet is earned by input, and when you initiate the transfer, he becomes output. So input and output are abstract concepts.

注[2]: 在使用 imToken 的时候, 如果你是使用助记词导入的比特币钱包, 那么每次的找零地址, 会是一个新的地址。如果你是 WIF 导入, 既使用明文私钥导入钱包, 那么每次转账的找零地址, 就是你当前钱包的地址, 不会生成新的接收地址。

NOTE [2]: When using imToken, if you are a bitcoin wallet imported with an obituary, each time you look for a zero address, it is a new address. If you are a WIF import, both import the wallet with an explicit private key, then the search for a zero address for each transfer, is the address of your current wallet, and does not generate a new receiving address.

注[3]: 这里所说的多个 input 对应多个 output 可以是1个 input 对应多个 output, 也可以是多个 output 对应 1 个 input或者多个 input 对应 多个 output。

NOTE [3]: Many inputs refer to multiple outputs, either one input to multiple outputs, or one input to one or more inputs to multiple outputs.


美化布局示例

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

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

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

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

分享:

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

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

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 美国可以使用什么加密货币交易所_前10名比特币交易平台名单

    美国可以使用什么加密货币交易所_前10名比特币交易平台名单
    美国可以使用什么加密货币交易所?What is an encrypted currency exchange that the United States can use?随着加密货币的普及,加密货币交易所也越来越多。对于美国的加密货币交易者而言,选择一个可靠、安全且易于使用的交易所是十分重要的事情。那么,美国可以使用哪些加密货币交易所呢?以下是前10名比特币交易平台名单:The choice of a reliable, secure, and easy-to-use...
  • 2017比特币已经挖出,比特币是什么?

    2017比特币已经挖出,比特币是什么?
    20 17比特币已经挖出了目录。20 17比特币被挖出来了。比特币是什么?比特币在20 17达到挖矿上限。在20 17中,比特币达到了挖矿上限,这意味着比特币的总数达到了2 1 100,000。比特币挖矿会越来越少。由于比特币挖矿的奖励每四年减半一次,未来比特币挖矿的数量将减少,比特币的价格可能会上涨。影响比特币市场的主要因素。除了挖矿上限和奖励减半之外,比特币市场还受到供需、投资者情绪和监管政策等因素的影响。比特币的未来前景。随着全球对比特币的认知度越来越高,比特币的前景仍...
  • 2015年宝马3系二手车价格多少钱

    2015年宝马3系二手车价格多少钱
    爱你一生不变心6558 2022-04-28 13:20:03 二手车能不能买主要看车况,如果车况好就可以考虑,车况不好价格再低也别考虑,像2015款宝马3系目前行情价是在18.32万这样,如果低...
  • Coinbase:财富100强企业过去一年的Web3采用率增长39%

    Coinbase:财富100强企业过去一年的Web3采用率增长39%
    随着比特币、以太坊等主流加密货币在web2世界的认可度变得越来越高,许多web2传统公司也积极拥抱web3,加速采用和开发区块链产品的速度和应用层面。With ˂a style= "max-width": 90%" href=https://m.php.cn/zt/21172.html" target="_blank" bitcoin, ˂a style="color:#f60; text-decoration: unde...
  • 区块链技术原理(转载)

    区块链技术原理(转载)
    转自:https://cloud.tencent.com/developer/article/1838661From: https://clud.tencent.com/development/article/1838661 本文主要是对区块链进行概念分析和组成技术解析,从哈希运算、数字签名、共识算法、智能合约、P2P网络等技术在区块链中的应用进行综合分析This paper focuses on conceptual analysis and technical com...
标签列表