Balance check by tianweixi

View this thread on steempeak.com
· @tianweixi ·
$22.88
Balance check
The concept of balance should be said to be deeply ingrained. The balance is generated by what is called the debit and credit bookkeeping 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 information of the first transaction when initiating the transaction, so that you can know that B has been from A 10 Bitcoins were received there, indicating that the conditions for initiating the second transaction were met. Therefore, the balance check in Bitcoin is done retrospectively.



The figure above depicts 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 it with the specific content of the transaction ( The left side of B's ​​signature). If they are 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 rejected.

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 here.
————————————————
Copyright statement: This article is the original article of the CSDN blogger "Dongda Data Group Zzzcg". It follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting.


![image.png](https://cdn.steemitimages.com/DQmSu5rftrCwV6GdWufVv1yztNZ1k73RWuVjRsB82EEpgeR/image.png)
👍  , , , , , , , , , , , , , , , ,
properties (23)
post_id89,614,502
authortianweixi
permlinkbalance-check
categorybalance
json_metadata{"tags":["balance","check"],"image":["https:\/\/cdn.steemitimages.com\/DQmSu5rftrCwV6GdWufVv1yztNZ1k73RWuVjRsB82EEpgeR\/image.png"],"app":"steemit\/0.2","format":"markdown"}
created2021-02-26 14:55:39
last_update2021-02-26 14:55:39
depth0
children0
net_rshares48,725,216,982,115
last_payout2021-03-05 14:55:39
cashout_time1969-12-31 23:59:59
total_payout_value21.714 SBD
curator_payout_value1.165 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2,018
author_reputation14,491,425,587,942
root_title"Balance check"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (17)