Yú'é de gàiniàn yīnggāi shuō gēnshēndìgù, yú'é shì bànsuízhe chēng zhī wèi jièdài jì zhàng fǎ ér chǎnshēng de, yěshì mùqián yínháng pǔbiàn cǎiyòng de fāngfǎ, jiāng yīgè rén de jiāoyì jìlù tǒngjì hǎo hòu suànchū yīgè yú'é, dànshì zài bǐtè bì zhōng méiyǒu yú'é zhège gàiniàn, yīn wéi qí cǎiyòng de shì UXTO móxíng de jì zhàng fāngfǎ. Bǐrú A->B10 gè bǐtè bì,B->C5 gè bǐtè bì, duìyú dì èr bǐ jiāoyì lái shuō,B zài fāqǐ zhè bǐ jiāoyì shí yào zhù míng dì yī bǐ jiāoyì de xìnxī, zhèyàng jiù kěyǐ zhīdào B céngjīng cóng A nàlǐ shōu dàoguò 10 gè bǐtè bì, shuōmíng mǎnzú dì èr bǐ jiāoyì fāqǐ de tiáojiàn. Suǒyǐ bǐtè bì zhōng yú'é de jiǎnchá shì tōngguò zhuīsù de fāngfǎ. Shàng tú miáoshùle liǎng bǐ jiāoyì, jiāoyì 10001 zhōng,B xiàng C zhuǎnle 10 gè bǐtè bì, yànzhèng zhè bǐ jiāoyì de guòchéng shì: Shǒuxiān jiāng B de qiānmíng tōngguò B de gōng yào jiěmì, ránhòu zài hé jiāoyì de jùtǐ nèiróng (B qiānmíng zuǒ cè) duìbǐ, rúguǒ xiāngtóng, shuōmíng xiāoxī shì B fāchū de, ránhòu zài jiǎnchá 10000 zhège jiāoyì shìfǒu zhēn de cúnzài yǐjí tā de nèiróng de zhēnshí xìng. Zhè liǎng diǎn dōu mǎnzúle, jiù shuōmíng jiāoyì 10001 shì kěyǐ bèi jiēshòu de, fǒuzé jùjué jiēshòu. Shíjì shang, zhēnshí de jiāoyì bǐ zhège fùzá de duō, yīnwèi yǒu kěnéng shì duō bǐ jiāoyì gòuchéngle shūrù, bǐrú B->C20 gè bǐtè bì, shì yóu duō bǐ jiāoyì A->B10,D->B10 gòuchéng de, zé qián yī bǐ jiāoyì ID jiùshì liǎng gè ID, shènzhì kěnéng gèng duō. Zhèlǐ wéi le jiǎndān miáoshù, zhǐ lièjǔ yī bǐ jiāoyì. 5.3 Shuāngchóng zhīfù A tóngshí fāle liǎng tiáo xiāoxī, tóngshí gěi B hé C zhuǎnle 10 gè bǐtè bì, shíjì shang tā zhǐyǒu 10 gè huì zěnme yàng? Jiǎshè D jiédiǎn xiān shōu dàole zhuǎn gěi B10 gè BTC, ránhòu shōu dàole zhuǎn gěi C10 gè bǐtè bì, tōngguò shàngmiàn de yànzhèng fāngfǎ, zìrán huì jùjué hòumiàn de yīgè, yǔ cǐ tóngshí,E jiédiǎn kěnéng xiān shōu dàole zhuǎn gěi C10 gè BTC, ránhòu shōu dàole zhuǎn gěi B10 gè bǐtè bì, tā zìrán huì jùjué hòu zhě. Zhìyú nǎ yī bǐ jiāoyì zuìzhōng huì shàng liàn, jiù yào kàn D hé E nǎge xiān jiějué nántí, chénggōng wā kuàng.
Show more
670 / 5000
Translation results
The concept of balance should be said to be deeply ingrained. The balance is generated with the so-called debit and credit accounting method. It is also a method commonly used by banks. A person’s transaction records are counted and a balance is calculated, but there is no balance in Bitcoin. This concept is because it uses the accounting method of the UXTO model. For example, A->B10 bitcoins, B->C5 bitcoins. For the second transaction, B must indicate the first transaction information when initiating this transaction, so that you can know that B has been from A 10 Bitcoins were received there, indicating that the conditions for the second transaction were met. Therefore, the check of the balance in Bitcoin is through the retrospective method.
The figure above describes two transactions. In transaction 10001, B transferred 10 bitcoins to C. The process of verifying this transaction is: first decrypt B’s signature with B’s public key, and then combine the specific content of the transaction ( On the left side of B's signature), if the same, it means that the message was sent by B, and then check whether the transaction of 10000 really exists and the authenticity of its content. If these two points are met, it means that transaction 10001 is acceptable, otherwise it is refused.
In fact, the real transaction is more complicated than this, because it is possible that multiple transactions constitute the input. For example, B->C20 bitcoins are composed of multiple transactions A->B10, D->B10, then The previous transaction ID is just two IDs, or even more. For the sake of brief description, only one transaction is listed.
Double payment
A sends two messages at the same time and transfers 10 bitcoins to B and C at the same time. What if he actually only has 10? Assuming that node D receives 10 BTC transferred to B first, and then receives 10 bitcoins transferred to C, through the above verification method, it will naturally reject the latter one. At the same time, node E may first receive 10 BTC transferred to C , And then received 10 bitcoins transferred to B, he would naturally reject the latter. As for which transaction will eventually go on the chain, it depends on whether D or E solves the problem first and successfully mines.