How does blockchain save bills
in today's life, many people use this pretext to cheat, such as direct selling, capital, technology, etc. There is no right or wrong in technology, but in people
with the progress of the times and society, the beginning of the application of any technology will be questioned positively and negatively. However, with the relative application and maturity of technology and the improvement of technology, the various applications around people will continue to improve. I believe that in the near future, these doubts will graally dissipate
the following is a summary of some blockchain scams around us
trap 1: block chain is the coin trap
trap two: virtual currency transactions, promise low investment, high return
trap three: centralization can solve all problems
trap four: block chain extension procts can be laid down with a mining machine to earn money
trap five: WeChat, Alipay trading transactions virtual currency
constructor(index,timestamp,data,previousHash=' 39;)< br />{
this.index=index;< br />this.timestamp=timestamp;< br />this.data=data;< br />this.previousHash=previousHash;< br />$this.hash=this.calculateHash();< br />}
calculateHash(){
return SHA256(this,index+this.previousHash+this.timestamp+JSON.stringify(this.data)).tostring();< br />}
}
class Blockchain{
constructor(){
this.chain=[this.createGenesisBlock()];<
}
/ / create a generated information block
creategenesis block() {
return new block (0, & quot; 01/01/2019",& quot; Genesis block", 0);
/ / the date is the user's data. In fact, it is the hash value obtained by adding several values together. Here, the information is encrypted and the picture is encrypted. Then the data is still stored in the database, but all the data are hash values. To get this data, you must know the hash value of the previous data block. Then, if the hacker needs to crack all the nodes, the hash value is decrypted, Then all the blocks from the first node to the last node can be decrypted to get the real data. So the security of data stored in the blockchain depends on whether the data is encrypted. If the plaintext is not encrypted, then it is not a blockchain
}
/ / get the last block
getlatesblock() {
return this.chain [this.chain. Length-1]
}
/ / create block
addblock (newblock) {
newblock. Previoushash = this. Getlatesblock(). Hash< br />newBlock.hash=newBlock.calculateHash();< br />this.chain.push(newBlock);< br />}
}
on the other hand, all nodes (computers in short) participating in the network will store one account book, which is updated in real time. Even if one node fails, the blockchain will not be affected.
Many small white just admission, was the private key, public key, address, and other relations confused. Some of them even lost their private key. They had money on the address, but they just couldn't get it out. Today, Xiao will try to figure out the relationship between the private key, the public key and the address
The relationship among < H2 > private key, public key and address is as follows:the private key is converted into (generated) public key, and then converted into address. If there is bitcoin or integrity coin on an address, the private key converted into the address can be used to spend the above integrity coin. The generation of public key and address depends on private key, so private key is the most important
mobile wallet is the same, but the file management method of mobile phone is not as convenient as computer. Therefore, the general mobile wallet will provide a function called or similar to "export private key". Through this function, the private key can be exported in various forms
for example, bitcoin mobile wallet can be exported as a two-dimensional code, which can be printed or scanned on paper. When replacing a mobile phone, install a bitcoin wallet and scan the QR code to migrate bitcoin. Bitcoin mobile wallet and trustcoin mobile wallet can be exported as a clear text string and printed on paper - this is paper wallet
paper wallet allows users to spend your bitcoin or trustcoin at any terminal with bitcoin or trustcoin wallet
because the wallet is lost or damaged, the private key will be lost, and the transfer right of the digital currency will be lost completely. To prevent such tragedies, you should always back up the data in your wallet. In addition to the address, all the private keys are saved ring the backup
< H2 > summary-
the private key should be protected to prevent loss and forgetting. When the mobile phone clears the information, it is best to it by hand, but do not disclose it
-
you should prevent your wallet from being lost or damaged, resulting in the loss of your private key and the loss of the transfer right of digital currency. Otherwise, you will not be able to withdraw more money, which is not useless