第01部分—何躍(444715148)odim校對(duì)_第1頁(yè)
第01部分—何躍(444715148)odim校對(duì)_第2頁(yè)
第01部分—何躍(444715148)odim校對(duì)_第3頁(yè)
第01部分—何躍(444715148)odim校對(duì)_第4頁(yè)
第01部分—何躍(444715148)odim校對(duì)_第5頁(yè)
已閱讀5頁(yè),還剩9頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、翻譯 第1部分 Find detailed information about the Bitcoin protocol and related specifications.比特幣協(xié)議和相關(guān)規(guī)范的細(xì)節(jié)說(shuō)明The Developer Guide aims to provide the information you need to start building Bitcoin-based applications. To make the best use of this guide, you may want to install the current version of Bitcoin

2、 Core, either from source or from a pre-compiled executable.這個(gè)開(kāi)發(fā)者指南的目標(biāo)是為了在你開(kāi)發(fā)一個(gè)比特幣周邊應(yīng)用的時(shí)候提供,給你提供足夠的信息。為了更好地使用這個(gè)指南,你需要安裝最新的bitcoin內(nèi)核的客戶端,可以下載github里面的源碼或者官網(wǎng)的預(yù)編譯版本 。Once installed, youll have access to three programs: bitcoind, bitcoin-qt, and bitcoin-cli. When run with no arg

3、uments, all three programs default to Bitcoins mainnetwork (mainnet) which will require you purchase satoshis in order to generate transactions.一旦安裝完畢,你將有以下的三個(gè)可執(zhí)行程序:bitcoind, bitcoin-qt, andbitcoin-cli。 如果你啟動(dòng)的時(shí)候沒(méi)帶參數(shù),所有的程序都會(huì)默認(rèn)連接到比特幣主網(wǎng)絡(luò)network (mainnet)。這樣要在網(wǎng)絡(luò)上創(chuàng)建就你在交易,你的時(shí)候就需要支

4、付比特幣才能創(chuàng)建交易。比特幣的最小單位是“聰(satoshis)”,0.00000001 BTC = 1 satoshis。However, for development, its safer and cheaper to use Bitcoins test network (testnet) where the satoshis spent have no real-world value. Testnet also relaxes some restrictions (such as standard tra

5、nsaction checks) so you can test functions which might currently be disabled by default on mainnet.但是,為了開(kāi)發(fā),使用比特幣測(cè)試網(wǎng)絡(luò)更為安全和便宜 network (testnet) ,在測(cè)試網(wǎng)絡(luò)中的比特幣沒(méi)有真實(shí)世界的價(jià)值。 測(cè)試網(wǎng)絡(luò) 對(duì)有些限制有所放松,(如對(duì)標(biāo)準(zhǔn)交易的檢測(cè)),它能測(cè)試一些在主網(wǎng)絡(luò)中被禁止的一些函數(shù),對(duì)有些限制有所放松,(比如標(biāo)準(zhǔn)交易 交易是否標(biāo)準(zhǔn)檢測(cè))。To use testnet, use t

6、he argument -testnet with each program or add testnet=1 to your bitcoin.conf file. To get free satoshis for testing, use Piotr Piaseckis testnet faucet. Testnet is a public resource provided for free by members of the community, so please dont a

7、buse it.如果要使用測(cè)試網(wǎng)絡(luò)testnet, 啟動(dòng)的時(shí)候需要添加參數(shù) -testnet 或者添加testnet=1到你的bitcoin.conf 文件里面. 在Piotr Piaseckis testnet faucet,你這里可以獲得一些免費(fèi)的測(cè)試比特幣Piotr Piaseckis testnet faucet。測(cè)試網(wǎng)絡(luò)是社區(qū)人員免費(fèi)提供的公共資源,請(qǐng)不要濫用。You can speed up development further using the regression test mode which creates a new&

8、#160;testnet local to your computer. This regtest mode will let you generate blocks almost instantly with a RPC command so you can generate your own satoshis and add transactions to the block chain immediately.你可以進(jìn)一步使用regression test mode(回歸測(cè)試模式)來(lái)加快你的開(kāi)發(fā),這個(gè)模式可以

9、在你的電腦上創(chuàng)建一個(gè)本地的測(cè)試網(wǎng)絡(luò)。 回歸測(cè)試模式可以讓你通過(guò)RPC命令快速很快地創(chuàng)建blocks、獲取測(cè)試比特幣、即刻在生成交易到block chain上生成交易。 bitcoin-qt provides a combination full Bitcoin peer and wallet frontend. From the Help menu, you can access a console where you can enter the RPC commands used throughout this docum

10、ent. bitcoin-qt 提供了一個(gè)完整的Bitcoin peer 和錢包的前端.在幫助菜單中錢包里面,你可以找到一個(gè)敲RPC 命令的終端 bitcoind is more useful for programming: it provides a full peer which you can interact with through RPCs to port 8332 (or 18332 for testnet). bitcoind 是個(gè)更有用的程序: 它提供了一個(gè)完整的&

11、#160;peer(節(jié)點(diǎn)) 你可以使用RPCs命令和它交流,正式端口默認(rèn)8332 (測(cè)試網(wǎng)絡(luò)默認(rèn)端口18332). bitcoin-cli allows you to send RPC commands to bitcoind from the command line. For example, bitcoin-cli help bitcoin-cli 允許你通過(guò)命令行發(fā)送 RPC 命令給bitcoind . 舉個(gè)例子,bitcoin-cli help All three progr

12、ams get settings from bitcoin.conf in the Bitcoin application directiory:這三個(gè)程序都會(huì)從Bitcoin程序目錄里的bitcoin.conf中讀取參數(shù)設(shè)置配置文件bitcoin.conf,這個(gè)文件在Bitcoin程序目錄里面: Windows: %APPDATA%Bitcoin OSX: $HOME/Library/Application Support/Bitcoin/ Linux: $HOME/.bitcoin/Questions about Bit

13、coin development are best sent to the Bitcoin Forum and IRC channels. Errors or suggestions related to documentation on B can be submitted as an issue or posted to the bitcoin-documentation mailing list.關(guān)于比特幣開(kāi)發(fā)的問(wèn)題最好發(fā)送到比特幣論壇 和IRC 頻道. 對(duì)于B的文檔的錯(cuò)誤和建議,請(qǐng)以提案

14、的方式提交提交一個(gè)提案或者發(fā)送到 bitcoin-documentation 郵件列表.In the following guide, some strings have been shortened or wrapped: “” indicates extra data was removed, and lines ending in a single backslash “” are continued below. If you hover your mouse over a paragraph, cross-reference links will be shown in b

15、lue. If you hover over a cross-reference link, a brief definition of the term will be displayed in a tooltip.在以下下面的指南書里面, 某些字符串被縮寫成: “” ,標(biāo)表示明額外的數(shù)據(jù)被刪除了, 以 “” 結(jié)束的行表標(biāo)明下面的還有. 如果你把你的鼠標(biāo)移動(dòng)到一個(gè)段落,有鏈接的文字會(huì)變成藍(lán)色。如果你移動(dòng)到有鏈接的文字上,在工具提示上會(huì)出現(xiàn)有一個(gè)簡(jiǎn)明的簡(jiǎn)介。在上面Block Chain區(qū)塊鏈The block chain provides Bitcoins public l

16、edger, a timestamped record of all confirmed transactions. This system is used to protect against double spending and modification of previous transaction records, using proof of work verified by the peer-to-peer network to maintain a global consensus.區(qū)塊鏈提供了比特幣的所有公

17、開(kāi)總賬本, 這個(gè)總賬本由所有有時(shí)序的已確定的交易組成。這個(gè)系統(tǒng)被用于防止保護(hù)雙花雙發(fā)和修改以前的交易記錄, 通過(guò)由被全球P2P網(wǎng)絡(luò)驗(yàn)證的 工作量證明POW 來(lái)保證全球的的一致性.Block Chain Overview區(qū)塊鏈概覽The illustration above shows a simplified version of a block chain. A block of one or more new transactions is collected into the transaction data part of a 

18、;block. Copies of each transaction are hashed, and the hashes are then paired, hashed, paired again, and hashed again until a single hash remains, the Merkle root of a Merkle tree.上面的這個(gè)插圖展示了一個(gè)簡(jiǎn)化版本的區(qū)塊鏈. 一個(gè)包含一個(gè)或者多個(gè)交易的區(qū)塊 的會(huì)被收集一個(gè)或者多個(gè)交易到區(qū)塊的交易數(shù)據(jù)部分. 每個(gè)交易的副本都會(huì)被哈希hashed,然后將哈希值進(jìn)行hash配對(duì),然后再

19、進(jìn)行哈希hash,再配對(duì),再哈系hash,直到只、配對(duì)到只剩下一個(gè)哈希hash值,這個(gè)剩下的哈希hash值就是 Merkle tree(Merkle 樹(shù))的Merkle root(根節(jié)點(diǎn))。The Merkle root is stored in the block header. Each block also stores the hash of the previous blocks header, chaining the blocks together. This ensures a

20、transaction cannot be modified without modifying the block that records it and all following blocks.Merkle根節(jié)點(diǎn) 被存儲(chǔ)在 區(qū)塊頭. 每個(gè)區(qū)塊 也會(huì)存儲(chǔ)上一個(gè)區(qū)塊的頭的哈希值, 以用于把所有的區(qū)塊鏈接在一起. 這保證了在如果你不修改把當(dāng)前和后面的所有區(qū)塊都修改的情況下,你是不可能修改交易記錄是不會(huì)被修改的。Transactions are also chained together. Bitcoin wallet

21、0;software gives the impression that satoshis are sent from and to addresses, but bitcoins really move from transaction to transaction. Each standard transaction spends the satoshis previously spent in one or more earlier transactions, so the input&#

22、160;of one transaction is the output of a previous transaction.交易記錄也被鏈接在一起。. 比特幣錢包 軟件只記錄了比特幣的發(fā)送接收從一個(gè)地址發(fā)送到另外一個(gè)地址, 但是比特幣確實(shí)真實(shí)的在一個(gè)交易間和一個(gè)交易之間轉(zhuǎn)移。. 每個(gè)標(biāo)準(zhǔn)交易花費(fèi)的satoshis 的是前一個(gè)交易轉(zhuǎn)移過(guò)來(lái)的幣, 所以一個(gè)交易的 輸入的交易是上一個(gè)交易的輸出。A single transaction can spend bitcoins to multiple outputs, as

23、 would be the case when sending satoshis to multiple addresses, but each output of a particular transaction can only be used as an input once in the block chain. Any subsequent reference is a forbidden double spendan attempt to spend the same satoshi

24、s twice.單個(gè)比特幣比交易能把比特幣 發(fā)送到不同的輸出中, 就像你把比特幣一次發(fā)送到不同的比特幣地址一樣,但是一次輸出只能在區(qū)塊鏈中只能使用一次 所有的后續(xù)引用都禁止的雙花發(fā)一種把比特幣花兩次的嘗試。Outputs are not the same as Bitcoin addresses. You can use the same address in multiple transactions, but you can only use each output once. Outputs

25、0;are tied to transaction identifiers (TXIDs), which are the hashes of signed transactions.輸出不同于比特幣 地址。你可以在多個(gè)交易中使用同一個(gè)地址 在復(fù)合交易中, 但是輸出 只能被使用一次。輸出 被綁定在交易id上與交易id(TXIDs)綁定, txid就是交易簽名交易的哈希值Because each output of a particular transaction can only be spent once, all transacti

26、ons included in the block chain can be categorized as either Unspent Transaction Outputs (UTXOs) or spent transaction outputs. For a payment to be valid, it must only useUTXOs as inputs.因?yàn)槊總€(gè)交易的輸出只能被使用一次, 所有在區(qū)塊鏈 中的輸出能被分類為未使用交易輸出Unspent Transaction Outputs (UTXO

27、s) 或者已使用輸出. 為了讓了一個(gè)支付是有效的, 必須使用 未使用輸出UTXOs 來(lái)作為輸入.Satoshis cannot be left in a UTXO after a transaction or they will be irretrievably lost, so any difference between the number of satoshis in a transactions inputs and outputs is given as a

28、60;transaction fee to the Bitcoin miner who creates the block containing that transaction. For example, in the illustration above, each transaction spends 10,000satoshis fewer than it receives from its combined inputs, effectively paying a 10,000satoshi transa

29、ction fee.比特幣在產(chǎn)生交易之后,不能留在UTXO中, 否則這個(gè)余額會(huì)永久的丟失掉, 所以有在輸入和輸出之間的差值就是交易費(fèi),都是對(duì)給把這個(gè)交易打包到一個(gè)區(qū)塊的礦工的獎(jiǎng)勵(lì)。舉例如,在上面的插圖中,每次交易收到的都比發(fā)出的會(huì)少1000聰, 這10000聰就是交易費(fèi)Proof Of WorkProof Of Work 工作量證明The block chain is collaboratively maintained on a peer-to-peer network, so Bitcoin requires each block prov

30、e a significant amount of work was invested in its creation to ensure that untrustworthy peers who want to modify past blocks have to work harder than trustworthy peers who only want to add new blocks to the block chain.區(qū)塊鏈 是由P2P網(wǎng)絡(luò)(peer-to-peer netwo

31、rk)協(xié)作維護(hù)的, 比特幣網(wǎng)絡(luò)要求在創(chuàng)建區(qū)塊的時(shí)候要提供一定的工作量證明,以用來(lái)保證那些想改變歷史區(qū)塊的不誠(chéng)實(shí)的節(jié)點(diǎn)必須付出比那些僅僅想在鏈上加一個(gè)新區(qū)塊的誠(chéng)實(shí)節(jié)點(diǎn)更多的資源。Chaining blocks together makes it impossible to modify transactions included in any block without modifying all following blocks. As a result, the cost to modify a particular block increa

32、ses with every new block added to the block chain, magnifying the effect of the proof of work.如果不修改后面所有的區(qū)塊,修改改變已經(jīng)打包到區(qū)塊中的交易成為一件不可能的事情,這也是把區(qū)塊鏈接到一起的用處。 因此,修改一個(gè)一個(gè)區(qū)塊鏈的費(fèi)用數(shù)據(jù)會(huì)隨著新區(qū)塊鏈的增加而增加,增加了工作量證明的作用也就隨之變大。The proof of work used in Bitcoin takes advantage of the apparently rand

33、om nature of cryptographic hashes. A good cryptographic hash algorithm converts arbitrary data into a seemingly-random number. If the data is modified in any way and the hash re-run, a new seemingly-random number is produced, so there is no way to modify the data to make the hash number predictable.

34、用在比特幣網(wǎng)絡(luò)中的工作量證明利用了密碼學(xué)哈希算法的偽隨機(jī)性。一個(gè)好的密碼學(xué)哈??梢园讶我獾臄?shù)據(jù)轉(zhuǎn)換成一個(gè)看起來(lái)隨機(jī)的數(shù)字。如果這個(gè)原始數(shù)據(jù)的更改任何地方被更改,然后重新計(jì)算哈希,有將會(huì)生成一個(gè)完全不同的新的哈希結(jié)果。所以沒(méi)有辦法可以讓一個(gè)修改數(shù)據(jù)以預(yù)知哈希的結(jié)果是不可能的可以預(yù)測(cè)。To prove you did some extra work to create a block, you must create a hash of the block header which does not exceed a certain value. For example, if

35、 the maximum possible hash value is 22561, you can prove that you tried up to two combinations by producing a hash value less than 22561.為了證明你已經(jīng)做了一些創(chuàng)建區(qū)塊的工作,你需要計(jì)算出一個(gè)不大于某個(gè)特定值的去塊頭的哈希值。舉個(gè)例子: 如果這個(gè)最大哈希值是22561,你只需要證明你做了兩2次組合就可以使哈希值小于22561。In the example given above, you will almost certainly prod

36、uce a successful hash on your first try. You can even estimate the probability that a given hash attempt will generate a number below the target threshold. Bitcoin itself does not track probabilities but instead simply assumes that the lower it makes the target threshold, the mor

37、e hash attempts, on average, will need to be tried.在上面的例子中,你很有可能在第一次嘗試的時(shí)候就產(chǎn)生成了一個(gè)成功的哈希值在你第一次嘗試的時(shí)候。你甚至可以估算評(píng)估你需要達(dá)到的某個(gè)閾值所,你需要的嘗試的次數(shù)。比特幣本身并不能控制這個(gè)可能性,但是單純假設(shè)這個(gè)閾值越小,需要嘗試的次數(shù)越多,差不多平均下起來(lái)也就是個(gè)平均數(shù)(這個(gè)是概率平均)。New blocks will only be added to the block chain if their hash is at least as challengin

38、g as a difficulty value expected by the peer-to-peer network. Every 2,016 blocks, the network uses timestamps stored in each block header to calculate the number of seconds elapsed between generation of the first and last of those last 2,016 blocks. The ideal

39、value is 1,209,600 seconds (two weeks).只有當(dāng)哈系值至少跟P2P網(wǎng)絡(luò)預(yù)期的難度值難度相當(dāng)?shù)臅r(shí)候,算出的在期待閾值以下最小的那個(gè)哈希值的節(jié)點(diǎn)才能把新的區(qū)塊才會(huì)被加到區(qū)塊鏈上。, 比特幣網(wǎng)絡(luò)使用儲(chǔ)存在存在2016個(gè)區(qū)塊頭的時(shí)間戳的差值來(lái)計(jì)算下一輪的難度。這個(gè)差值的理想的間隔是1,209,600秒(兩周)。 If it took fewer than two weeks to generate the 2,016 blocks, the expected difficulty value is increased proportionally

40、 (by as much as 300%) so that the next 2,016 blocks should take exactly two weeks to generate if hashes are checked at the same rate. 如果產(chǎn)生2016個(gè)區(qū)塊需要的時(shí)間小于兩周,預(yù)期期待的難度將成比例地提高(大約300%)以便于下一個(gè)塊能夠準(zhǔn)確地在兩周生成10分鐘左右,前提是保證在當(dāng)前的HASH在同一算力. If it took more than two weeks to generate the blocks, the expected&#

41、160;difficulty value is decreased proportionally (by as much as 75%) for the same reason. 如果產(chǎn)生2016個(gè)塊的時(shí)間超過(guò)兩周,同樣地,預(yù)期期待的難度將降低(75%左右)。(Note: an off-by-one error in the Bitcoin Core implementation causes the difficulty to be updated every 2,016 blocks using timestamps from only 2

42、,015 blocks, creating a slight skew.)(注意: 由于比特幣內(nèi)核實(shí)現(xiàn)的一個(gè)實(shí)現(xiàn)差一錯(cuò)誤,導(dǎo)致每到造成了要在2016區(qū)塊的時(shí)候,因?yàn)槭褂昧说?015塊的時(shí)間戳,難度就會(huì)更新難度很難,因?yàn)槭褂昧说?015塊的時(shí)間戳,這導(dǎo)致了輕微的偏差。Because each block header must hash to a value below the target threshold, and because each block is linked to the block t

43、hat preceded it, it requires (on average) as much hashing power to propagate a modified block as the entire Bitcoin network expended between the time the original block was created and the present time. Only if you acquired a majority of the networks hashing power

44、could you reliably execute such a 51 percent attack against transaction history.由于每一塊的頭的部哈希值必須小于某個(gè)閾值,而且每一所有的區(qū)塊也必須鏈接到它前面的一個(gè)這個(gè)區(qū)塊的前面一個(gè)。要在原始區(qū)塊生成到當(dāng)前這段時(shí)間里傳送一個(gè)已修改的區(qū)塊,(一般來(lái)說(shuō))需要消耗和整個(gè)比特幣網(wǎng)絡(luò)消耗的算力一樣多的哈系算力。it requires (on average) as much hashing power to propagate a modified block as the entire Bitcoin

45、network expended between the time the original block was created and the present time。只有你掌握了全網(wǎng)大多數(shù)哈希算力,例你才能有效地實(shí)現(xiàn)對(duì)交易歷史進(jìn)行的51%的攻擊。The block header provides several easy-to-modify fields, such as a dedicated nonce field, so obtaining new hashes doesnt require waiting for new transactions. Also,

46、 only the 80-byte block header is hashed for proof-of-work, so adding more bytes of transaction data to a block does not slow down hashing with extra I/O.區(qū)塊頭提供了一些容易改的字段,例比如dedicated nonce field,所以獲取新塊的哈希不需要等新的交易的到來(lái)。同樣,. 只有80字節(jié)的區(qū)塊頭會(huì)被計(jì)算到POW的哈希中,因此所以添加更多的交易信息不會(huì)降低讓伴有額外IO的哈希計(jì)算降低速

47、度和額外的IO.Block Height And Forking區(qū)塊高度及分叉Any Bitcoin miner who successfully hashes a block header to a value below the target threshold can add the entire block to the block chain. (Assuming the block is otherwise valid.) These blocks are com

48、monly addressed by their block heightthe number of blocks between them and the first Bitcoin block (block 0, most commonly known as the genesis block). For example, block 2016 is where difficulty could have been first adjusted.任何所有成功計(jì)算出小于閾值的哈系值的礦工可以能把整這個(gè)區(qū)

49、塊加到區(qū)塊鏈中(假設(shè)這個(gè)區(qū)塊是有效的)。這些區(qū)塊被標(biāo)記為當(dāng)前區(qū)塊的高度-就是當(dāng)前區(qū)塊到第一個(gè)塊(genesis block)的差值. 比如,第2016塊是第一個(gè)調(diào)整難度的塊。Multiple blocks can all have the same block height, as is common when two or more miners each produce a block at roughly the same time. This creates an apparent fork in the&

50、#160;block chain, as shown in the illustration above.多個(gè)區(qū)有很多塊可以會(huì)有同樣的區(qū)塊高度,這在兩個(gè)或兩個(gè)以上的礦工幾乎在同一時(shí)間創(chuàng)建了一個(gè)區(qū)塊的情況下是很常見(jiàn)的。當(dāng)兩個(gè)或者多個(gè)礦工幾乎在同一時(shí)間創(chuàng)建了一個(gè)區(qū)塊. 這就正如上圖所示,區(qū)塊鏈上出現(xiàn)了顯然的在區(qū)塊鏈上分叉了,就像上面的插圖一樣。When miners produce simultaneous blocks at the end of the block chain, each peer individually choos

51、es which block to trust. (In the absence of other considerations, discussed below, peers usually trust the first block they see.)當(dāng)?shù)V工同時(shí)在區(qū)塊鏈的末端生成區(qū)塊的時(shí)候創(chuàng)建了一個(gè)塊在區(qū)塊鏈的最后的時(shí)候,每個(gè)節(jié)點(diǎn)都獨(dú)立地選擇相信哪個(gè)區(qū)塊。.(在沒(méi)有其他考慮的情況下,節(jié)點(diǎn)通常選擇相信他們接收到的第一個(gè)塊)。Eventually a miner produces another blo

52、ck which attaches to only one of the competing simultaneously-mined blocks. This makes that side of the fork longer than the other side. Assuming a fork only contains valid blocks, normal peers always follow the longestfork (the most difficult chain

53、to recreate) and throw away (orphan) blocks belonging to shorter forks.最終,礦工會(huì)創(chuàng)建一個(gè)新塊,這個(gè)區(qū)塊附在其中一個(gè)競(jìng)爭(zhēng)的會(huì)在并行區(qū)塊鏈的一條后面添加一個(gè)新塊。,這會(huì)使這個(gè)分支比別的分支更長(zhǎng)。假設(shè)一個(gè)分支只包括有效的區(qū)塊,正常所有的節(jié)點(diǎn)將選擇最長(zhǎng)的那個(gè)分支(最難創(chuàng)建的一個(gè)鏈),然后拋棄比它短的分支。Long-term forks are possible if different miners work at cross-purposes, such as somemine

54、rs diligently working to extend the block chain at the same time other miners are attempting a 51 percent attack to revise transaction history.長(zhǎng)期的分叉是可能的,如果這些礦工有其他意圖,比如一些礦工在分叉之后的一條分支上奮力計(jì)算,嘗試51%攻擊去修改交易歷史。Since multiple blocks can have the same height during

55、 a block chain fork, block heightshould not be used as a globally unique identifier. Instead, blocks are usually referenced by the SHA256(SHA256() hash of their header.由于很多區(qū)塊在分叉的時(shí)候會(huì)有同樣的高度,所以高度不能作為唯一的區(qū)分。通常,都用它的SHA256的哈希值來(lái)表示這個(gè)區(qū)塊。Transaction DataEvery block must inclu

56、de one or more transactions. The first one of these transactions must be a coinbase transaction which should collect and spend the block reward and any transaction fees paid by transactions included in this block.每個(gè)區(qū)塊必須包含一個(gè)或者多個(gè)交易記錄,第一個(gè)交易記錄必須是coinbase(幣基)記錄,這個(gè)記錄包含了區(qū)

57、塊獎(jiǎng)勵(lì)和本區(qū)塊的所有的交易費(fèi)。The UTXO of a coinbase transaction has the special condition that it cannot be spent (used as an input) for at least 100 blocks. This temporarily prevents a miner from spending the transaction fees and block reward from a

58、0;block that may later be orphaned (destroyed) after a block chain fork.由挖礦出來(lái)的幣有一個(gè)特殊的使用條件,就是在此后的100塊只能不能使用。這個(gè)可以部分防止有的礦工花費(fèi)可能以后被拋棄的區(qū)塊獎(jiǎng)勵(lì)(分叉之后,這個(gè)礦工的這條鏈被拋棄)。Blocks are not required to include any non-coinbase transactions, but miners almost always do include additional trans

59、actions in order to collect their transaction fees.區(qū)塊不是必須包含所有的非-coinbase的交易,但是礦工們通常會(huì)為了他們的交易費(fèi)把這些交易記錄給收錄進(jìn)來(lái)。All transactions, including the coinbase transaction, are encoded into blocks in binaryrawtransaction format prefixed by a block transaction sequence numbe

60、r.所有的交易記錄,包含coinbase記錄,會(huì)在前面加上交易隊(duì)列的編報(bào),并被編碼為rawtransaction格式的二進(jìn)制進(jìn)行存儲(chǔ)。The rawtransaction format is hashed to create the transaction identifier (txid). From these txids, the Merkle tree is constructed by pairing each txid with one other txid and then hashing them together. If there are

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論