Android blockchain database
Public chain, also known as "public chain", refers to the blockchain that anyone in the world can enter the system at any time to read data, send confirmatory transactions and compete for bookkeeping. The public chain is generally considered to be "completely decentralized", because no indivial or institution can control or tamper with the reading and writing of data in it. In terms of application, blockchain public chain mainly includes bitcoin, Ethereum, super ledger, most counterfeit currencies and smart contracts. The ancestor of blockchain public chain is bitcoin blockchain, which has the following characteristics:
1, open source code
upload the code to GitHub, and everyone can get complete blockchain data by downloading, Accept the test of the public
2, complete decentralization
anyone can become a node, each node is open, everyone can participate in the calculation of the blockchain, any node is not permanent, but phased, and any center is not mandatory for nodes. Anyone can read and send transactions, and transactions can be effectively confirmed on the blockchain. Anyone can participate in the consensus process. The consensus process determines whether a block can be added to the blockchain and the exact current state. Everyone can get financial reward from it, which is proportional to their contribution to the consensus process. These public chains are generally considered to be "completely decentralized"
3. Developing decentralized applications
through this public chain, developers can easily develop centralized applications. Public chain can protect the rights and interests of users from the influence of program developers
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 />}
}
bitcoin trading platform has many running platforms, such as mtgox in Japan, bitcoin in China and so on
therefore, investors need to choose a reliable bitcoin trading platform. The reference factors are: 1. The longer the running time, the better; 2. The bigger the instry reputation, the better; 3. The larger the team size, the better; 4. Being able to visit<
it is suggested that China choose "fire coin net", which is cooperated by Wukou School of finance of Tsinghua University. Sequoia Capital has invested 10 million US dollars; The choice of coinbase in foreign countries is an important choice for Silicon Valley banks to invest.
College Students' innovation and entrepreneurship ideas include printing and ing services, leisure errands, school leisure food stores, college students' Tutoring instry, and online stores
1. Printing and ing service
in fact, many schools have printing and ing stores. It seems that the market is saturated, but in fact, there is still a lot of space. Especially in the graation season, students have to print various reports, resumes and other information. The key to starting a business is to find the right location
5. Setting up shop on the Internet
the sales volume of health care instry on the Internet is even more considerable than that of books and music. Buying daily necessities on the Internet is often favored by people because it can avoid the curious eyes of people on the street and face the situation of salesmen
extended materials
precautions
1, risk perception
the risk perception of entrepreneurs depends on the entrepreneur's self-confidence, independent of plan, desire for control and other factors. Only those who have the courage to take risks can meet the challenges, invest their time, energy and financial resources and bear the possible losses
2. Alertness
is also called entrepreneur early warning, which is used to reflect the ability of entrepreneurs to find out whether market opportunities exist or whether they have value. When one person has insight into the value of a resource while others don't, the warning has already appeared
distinguish blockchain from ordinary database;, The main point is that the specific rules for putting data into the database are different. In other words, it can not conflict with other data already in the database. It is only added, immutable, and the data itself is locked to an owner (which can be owned). It is replicable and available. Finally, everyone agrees that the state of data in a decentralized database is compliant.