Bitcoin account book modification
what is the essence of bitcoin
A: in essence, it is a multi person account book. But the currency (bitcoin) on the account book is generated out of thin air, and the algorithm is sha256 workload proof
how to identify its uniqueness< As like as two peas, br / > answer: it's still a book. All the books are kept by all the game player in the world. Just imagine, the whole world knows that I have five coins. I pay five coins to a in the way of bookkeeping, and keep the account book. Unless you change 51% of everyone's account book, it will be effective, but the change has to be proved by workload, so it is not so easy to change. This guarantees uniqueness I can only give you a general idea. Although it's not easy to understand, you can check it yourself)
according to my understanding, bitcoin should not be stored in a database to record users' bitcoin... It is stored locally
A: it's stored locally, but it's broadcast immediately in P2P mode. Everyone who plays bitcoin keeps a locally. If your account book is different from others, for example, if you say you have 100 million, your account book is invalid. If no one admits it, it can't be sent
PS: it's learned a lot, involving economics, cryptography, sociology, computer programming, etc. One can't master all of them, so there are many people who don't understand them. When you understand 1 / 2 of what XX learned above, you will understand.
bookkeeping
because bookkeeping is a reward, each time you can add a certain number of bitcoin for yourself, so everyone is competing for bookkeeping, which of course leads to a problem: when there is inconsistency in bookkeeping, the system introces workload proof to solve the problem, and the rules are as follows:
1. In a period of time, only one person can succeed in bookkeeping
2. Obtain the unique bookkeeping right by solving the cryptography problem
3. Other nodes the bookkeeping results
but before the workload proof, The accounting node will do the following preparatory work:
1. Collect the original transaction information that has not been recorded in the broadcast
2. Check whether the payment address in each transaction information has enough balance
3. Verify whether the transaction has the correct signature
4. Package and record the verified transaction information
5. Add a reward transaction: add 12.5 to your address Bitcoin
if you succeed in competing for bookkeeping rights, you can get a reward of 12.5 bitcoin
workload proof
the hash value of the previous block and the current account page information will be hashed together as the original information in each bookkeeping. In order to ensure that only one person can keep accounts around 10 minutes, we have to improve the difficulty of keeping accounts. The results of hash must start with several zeros. In order to satisfy the condition, hash is to introce a random number variable
denoted by pseudo code:
1. Hash (last hash value, transaction record set) = 456635bcd
2. Hash (last hash value, transaction record set, random number) = 0000afd635bcd
if you change part of the original information of hash, the hash value will also change continuously. Therefore, when you run hash, the value of random number will change continuously, A random number can always be found so that the result of hash starts with several zeros. The node that finds the random number first obtains the unique bookkeeping right
verification
after the node successfully finds the hash value, it will broadcast and package the block to the whole network immediately, and the node of the network will verify it after receiving the broadcast. If the verification is passed, it indicates that a node has successfully decrypted, it will not compete for the current block, but will choose to accept the block and record it in its own account book for the next round of competitive guessing. Only the fastest decrypted block in the network will be added to the ledger, and other nodes will to ensure the uniqueness of the whole ledger
If a node has cheating behavior, it will cause the node of the network to fail the verification, give up its packaged block directly, and cannot be recorded in the general ledger, then the consumption cost of the cheating node will be in vain. Therefore, miners consciously abide by the consensus protocol of bitcoin system, and ensure the security of the whole system
it's like you go to the construction site to move bricks. After moving bricks for one day, the contractor asks you how can you prove that you move bricks for one day?
Analysis of the role of adventure and mining skills, what are the roles of skills in adventure and mining mobile games, and what are the differences of different skills. Today, I'd like to introce the role of adventure and mining skills{ RRRRR}
< critical hit
class A certain probability causes 150% of the attack power & mdash; 400% of the damage. Some skills can't be dodged, some skills can only be triggered when the enemy's combat power or own combat power is lower than what percentage, and some skills can't be launched until a certain round
< percentage
class It has a certain probability to damage the enemy's current combat power percentage. Heroes with this skill are best placed in the front row. The earlier you trigger, the better. Armor can resist the damage of this ability
< recovery class
It has a certain probability to recover the combat power of your damage percentage or the combat power of the enemy. Hit damage will be resisted by armor, but recovered combat power will not count as armor. When you regain your combat power, you will ignore the enemy's armor
< four dimensional
class Increase your four dimensions, attack, defense, dodge and king
Zhejiang Xinyun blockchain Technology Co., Ltd. is a limited liability company (invested or controlled by natural person) registered in Ouhai District, Wenzhou City, Zhejiang Province on April 2, 2018. Its registered address is located in room B309, 46-54 Dongfang Road, Ouhai Economic Development Zone, Wenzhou City, Zhejiang Province (trial area of cloud sharing creative space)
the unified social credit code / registration number of Zhejiang Xinyun blockchain Technology Co., Ltd. is 91330304ma2cnkpx00, and the enterprise legal person is Xiao Kang. At present, the enterprise is in business
Zhejiang Xinyun blockchain Technology Co., Ltd., within the province, the current registered capital of the enterprise is general
view more information and information of Zhejiang Xinyun blockchain Technology Co., Ltd. through network enterprise credit
this is the consensus issue of bitcoin. In other words, how to achieve decentralization at the same time, let the nodes of the whole network reach a consensus and keep the consistency of all accounts? This is a problem that the decentralized system could not solve for a long time in the past
Nakamoto Tsung proposed the solution of proof of work. It stipulates that the person who pays the most calculation work has a better chance to obtain the final bookkeeping right. His bookkeeping results will be recognized by the whole network. How to measure the calculation workload? Bookkeepers need to spend computer power to solve a problem called hash function. This problem can only be guessed one by one through computer enumeration. The stronger the calculation power, the easier it is to guess the right answer. Once a lucky bookkeeper finds the answer, he will get the right to keep accounts. And get a bitcoin reward. Everyone should listen to his accounting results and start new records on his basis
to put it simply, more is more. The harder you work, the luckier you are. POW solves the problem of mutual distrust nodes reaching consensus, and is considered to be the ancestor of all consensus mechanisms. It makes bitcoin a truly decentralized autonomous system.
