Ethereum rookie course
what is Ethereum:
Ethereum is an innovation based on the application of technologies and concepts in bitcoin to computers. Ethereum itself imitates a lot of bitcoin technology to maintain the computer platform. blockchain technology is one of them
Ethereum platform can safely run any program users want
advantages of Ethereum over other competitive currencies before Ethereum appeared, some digital currencies imitated bitcoin. However, these projects have their own shortcomings, they can only support one or several specific applications at the same time< However, the reason why Ethereum can surpass the limitations of these projects in the past is because of the core idea of Ethereum
what Ethereum wants to implement is a blockchain protocol with built-in programming language. Since it supports programming language, in theory, any blockchain application can be defined with this language, and then run on Ethereum's blockchain protocol as an application
The design of Ethereum is very flexible and adaptable
Ethereum target sets the advantages of blockchain technology, in order to add the advantages of blockchain, such as decentralization, openness and security, to almost all computing fields
blockchain applications of Ethereum
Ethereum has many blockchain applications, such as digital applications of gold and stocks, financial derivatives applications, DNS and digital authentication, etc
Ethereum has achieved more than 100 blockchain applications by many start-ups
Ethereum has also been closely watched by some financial institutions, banking consortia (such as R3), as well as large companies like Samsung, Deloitte, RWE and IBM. As a result, a number of blockchain applications such as simplified and automated financial transactions, merchant loyalty index tracking, and gift cards designed to achieve decentralization of electronic transactions have emerged
the relationship between Ethereum and blockchain:
Ethereum is a programmable blockchain
Ethereum does not give users a series of preset operations (such as bitcoin transaction), but allows users to create complex operations according to their own wishes
in this way, Ethereum can be used as a platform for various types of decentralized blockchain applications, including but not limited to cryptocurrency
like other blockchains, Ethereum also has a peer-to-peer network protocol. Ethereum blockchain database is maintained and updated by many nodes connected to the network. Each network node runs the Ethereum simulator and executes the same instructions. Therefore, people sometimes call Ethereum "world computer"
Ethereum is an implementation of blockchain. In Ethereum network, many nodes are connected with each other to form Ethereum network:
Ethereum node software provides two core functions: data storage and contract code execution
in each Ethereum node, complete blockchain data is stored. Ethereum not only saves the transaction data on the chain, but also saves the compiled contract code on the chain
At the same time, a virtual machine is provided to execute the contract code Ethereum virtual machine
Ethereum blockchain not only stores data and code, but also contains a virtual machine (EVM) in each node to execute contract code - it sounds like a computer operating system
in fact, this is the core difference between Ethereum and bitcoin: the existence of virtual machine has brought blockchain into the era of 2.0 and made blockchain a friendly platform for application developers for the first time
the above content comes from the introction course of Ethereum DAPP development
If you want to query the transaction records on the main network, you can use Etherscan. However, if you build your own private chain, how should you query the transaction records
the answer is that you need to listen to the logs on the chain, save them in the database, and then query them in the database. For example:
< pre t = "code" L = "Java" > varaddr = & quot& quot;< br />varfilter=web3.eth.filter({fromB lock:0 ,toBlock:' latest', address:addr });< br />filter.get(function(err,transactions){transactions.forEach(function(tx){
vartxInfo=web3.eth.getTransaction(tx.transactionHash);
/ / at this time, the transaction information txinfo can be stored in the database
})< br />}); Pre >
Web3. Eth. Filter() is used to monitor the log on the chain, and Web3. Eth. Gettransaction() is used to extract the information of the specified transaction. Once the transaction information is obtained, it can be stored in the database for query
recommend a practical introction, you can see: Ethereum tutorial
Ethereum specifies the JSON RPC API application development interface that each node needs to implement. This interface is transport independent. Applications can use this interface protocol to operate Ethereum nodes through HTTP, websocket or IPC and other communication mechanisms:
During Iwasaki's lifetime, the Meiji government once purchased a steamboat for Mitsubishi company and provided supplementary funds to help the struggling Mitsubishi company. However, the Meiji Government prohibited Mitsubishi from developing any business other than shipping. The only exception is that the Meiji government also allowed Mitsubishi to develop maritime related businesses, such as coal mine development, which can be used for maritime transportation
mitaro has paid attention to Gao coal mine in Kyushu for a long time. The high island coal mine was first mined by the British, Gulliver. Gulefei is a famous "God of death", he is the director of Nagasaki agency of Jiading Madison company. In 1873, in order to avoid the manipulation of foreign capital, the Japanese government changed the mining instry to government-owned. It was later sold to Kojiro goto in September 1874. Houteng xiangerlang did not change his loose management attitude, and his debts became more and more. Finally, Fukuzawa Yukichi intervened and asked mitaro to buy Gao coal mine in March 1881. The mine later became Mitsubishi's cash cow at the same time as Jigang mine. Mitaro is very enterprising and actively expands his business scope. In July of that year, the meeting of promoters for the establishment of marine insurance companies was held in Tokyo. This was originally a kind of company set up by the former princes and civil servants to raise funds for Quanlu bonds (bonds issued in 1876 to compensate the salaries of the Chinese, gentry and other hereditary nobles). The general agent of the company was shizawa Rongyi. Seize's calculation is that Mitsubishi will be the company's biggest customer and must be wooed. He took the initiative to negotiate with mitaro. Mitaro had already felt the urgency of the marine insurance instry. Therefore, of the 600000 yen capital of Tokyo Marine Insurance Company, 110000 came from mitaro. Mitaro became the largest shareholder, but turned the marine insurance company into a company that he could control< In 1881, mitaro iwazaki founded Meiji Life Insurance Company, the first life insurance company in Japan. In addition, in order to better compete with the P.O. steamship company in the UK, mitaro, with the full support of his younger brother mitaro, started the Tokyo Osaka documentary finance business. In April 1880, Mitsubishi exchange, with a capital investment of 1 million yen, officially opened. Since then, mitaro has established Mitsubishi Bank on the basis of these companies
because the government has banned Mitsubishi from engaging in other businesses outside the shipping instry, mitaro has tried every means to set up and operate some promising companies in the name of subsidiary businesses of the shipping instry, which has laid the foundation for Mitsubishi to move towards enterprise alliance and "land kingdom" in various aspects. After the death of mitaro, mitaro's successors, in line with the spirit of Iwasaki, made Mitsubishi move step by step towards a large, organized and modernized enterprise alliance. Mitarao's first successor was his brother mitarao. After returning from studying in the United States, mitsuke immediately joined the Mitsubishi chamber of Commerce as the vice president to assist Mitsuro. In 1874, mitsuke married his eldest daughter, Zaomiao. In Mitsubishi's leadership, only mitarao has stayed abroad. Therefore, only mitarao can plan the company's strategy and strategy in a new way of thinking. Mitarao attaches great importance to him. When mitsuke became president, the Mitsubishi chamber of Commerce was in an extreme predicament. As mentioned earlier, mitsuke boldly decided to merge his shipping company (the main body of Mitsubishi chamber of Commerce) with the joint company to establish Japan Post shipping company, and skillfully transferred the control of the new company from the other party to the hands of Mitsubishi first generation
because the main body of Mitsubishi, namely the shipping company, has been separated, mitsuzuki is preparing to transform "Mitsubishi of the sea" into "Mitsubishi of the land" on the basis of the coal mining instry, copper mining instry and shipbuilding instry of the former subsidiary Mitsubishi. He changed the name of the original Mitsubishi company to Mitsubishi society. At the same time, because the address of the original company had been transferred to Japan Post shipping company, mizuke also moved the headquarters of the new company to hamamachi, Lingan island near yutanakawa, and then applied to the official for business registration again
mizuke made a rule for the new company Mitsubishi: the company's staff's advance and retreat and business execution, regardless of the size of the matter, are all decided by the president, and employees are not allowed to make their own decisions. This completely inherited the concept of "one enterprise" and the organization of "President dictatorship" in the "company regulations" formulated by mitaro. However, in the actual operation, mitsuke's practice is different from that of his brother mitaro. He is better at listening to the opinions and suggestions of his subordinates than mitaro. He is not so arbitrary as mitaro
the Gao coal mine purchased in the mitarao era is the pillar of Mitsubishi society. In 1889, mitsuke bought Xinru coal mine and LiuTian coal mine, then operated Zhufeng coal mine, and applied the new technology of coal mining and transportation to his coal mine business. In addition to coal mining, mitsuke is also committed to the operation of metal mining. He bought mining instries such as weiquze, Shengye, zou, Qifeng and miangu, and laid tunnels and rails for them. He used Balton water wheel, Hamilton mill, water jacket smelting furnace and other facilities. It is precisely because he boldly promoted various technological innovations and improved proctivity. Finally, the coal and copper mining instry will become the largest source of income for Mitsubishi in mizuke era
Mi Zhizhu was not satisfied. He used the income from mining to invest in shipbuilding. In 1884, the Japanese government rented the Nagasaki shipyard, which had been in deficit, to Mitsubishi. At that time, the Meiji government, which was partial to Mitsubishi (Mitsubishi's rival), rented Nagasaki shipyard to Mitsubishi, not to help Mitsubishi, but to send a burden to Mitsubishi to weaken the competitiveness between Mitsubishi and Mitsubishi< In June 1884, Mitsubishi decided to lease Nagasaki shipyard. Three years later, mitsuke applied to the government to stop the lease and buy the shipyard directly. He hoped to take shipbuilding instry as the core business of revitalizing Mitsubishi society
the Meiji government quickly approved the application of Mizuki, because the Meiji government has invested 1.13 million yen in Nagasaki shipyard, and there is no sign of turning from loss to profit. Now, Mitsubishi is willing to buy it for 450000 yen. Why not? Mizhu was not impulsive to buy the shipyard either. He skillfully negotiated with the government to obtain the transfer right of the shipyard by paying 459000 yen in five years, and then applied for the return of the shipyard with 10% interest per year in cash, that is, 910170 yen per year. In this way, Mitsubishi can find a big bargain. Mizuki made Nagasaki shipyard "the largest shipyard in the East". Kobe shipyard was opened in 1905. At that time, it was said that mitsuke "mastered the Japanese postal and shipping company with his right hand, set up a shipyard with his left hand, and absorbed the capital of the shipping instry. The skill is really amazing."
in addition to the mining and shipbuilding instries, the banking instry has also been the focus of mizuke. After the merger of Mitsubishi's shipping company and joint company, the Japanese government changed its previous policy towards Mitsubishi and allowed it to develop in the banking instry. At that time, the banks were all known as national banks. In fact, they were purely private banks, but they did not have the right to issue silver coins. Later, because of the change of conditions, the national bank can obtain huge benefits. As a result, a total of 151 banks sprang up to issue banknotes, causing great confusion. At that time, the 119th and 49th banks were on the verge of bankruptcy, so they asked for help. As the investors of the two banks were founded by a group of old samurai, mizuke, who was born in a declining Samurai family, was said to have deep sympathy for this and had a "chivalrous heart" to save people, so he took over the business. Of course, although he is bold, he is not careless. He predicted that the prospect of the banking instry is very good, and calculated the careful plan after taking over, and then began to take action. He took the commodities deposited in Mitsubishi Tokyo warehouse company as guarantee to carry out "commodity guarantee finance", which ensured the bank's profit
mitsuke later appointed his prudent and capable cousin, Liangping FengChuan, as the chairman of the bank. Not only was he very active in the financial circles, but most of the famous Japanese politicians at that time were his friends. At the same time, he also insisted on the policy of helping others, and dared to seek development cautiously in the face of difficulties and dangers. Therefore, even after 1895, the Bank of Mitsubishi was more stable than other banks and got rid of the trouble quickly
mining, shipbuilding and banking are the three pillars of Mitsubishi's revitalization. On this basis, mitsuzuki has continuously expanded its business to real estate, comprehensive business, railway, electric machinery, heavy instry, paper making, glass, beer, etc
in Marunouchi, in front of the imperial residence in Tokyo, Japan, there are many buildings of Mitsubishi society. The place used to be a training ground full of weeds. The Japanese government sold it to Mitsubishi in 1889. The land of 135000 square meters sold for 1.5 million yuan, so each square meter is worth about 11 yuan and 10 cents. At that time, the highest land price was Qu Ting, which was only 2.34 yuan per ping. Because the price is exorbitant and the land is sold in bulk, no one will pay attention to this land. However, when he was young, mitsuke, who had traveled abroad and seen many beautiful metropolises, had his own plans in mind. He bought the land quickly. Many people are either surprised or sneer at the decision of mitsuzuki: "what's the use of buying such a large piece of land?" Mi Zhizhu just gave a faint smile to these people, or casually replied: "no purpose, just want to grow bamboo and raise tigers." Having said that, he was not idle. Mitsuzuki started to build a modern office building in this area called "the origin of Mitsubishi". He abandoned the traditional wooden houses in Japan and replaced them with stone, brick and other western building materials. In terms of the folk customs at that time, it was a pioneering work for the first time. Later, the office street was named "one London". The beautiful red bricks used in the building not only attract people from Tokyo, but also visitors from all over the world. In addition, mizuke also invested in the new land of Haipu in Ji Bay of Gangshan, the forest planting of ganyeyinfan and the farmland of Niigata. He also partnered with others to buy a large plain in the Iwate mountain area, and named it after several people. Mizuke's attention to land became the foundation for the formation of Mitsubishi real estate. Mizuke is also interested in investing in railways. Most of the railways in Japan today were laid by civilians in the Meiji era. In addition to the Japanese railway developed in mitarao's time (today's northeast line in Japan), mitarato also invested in the construction of Shanyang Railway (Shanyang line) and Kyushu Railway (Kagoshima line and Nagasaki line). The railway instry can not only transport coal mines, but also be the main consumers of coal mines
mizuke pays special attention to improving the technology made in Japan. Under the guidance and support of mizuke, Nagasaki shipyard has made full efforts to manufacture the first turbine made in Japan. Due to the appearance of steam turbine made by Nagasaki shipyard, Mitsubishi internal combustion engine manufacturing instry and Mitsubishi Electric Instry soon separated from shipbuilding instry, and graally formed Mitsubishi Heavy Instry< As early as 1889, mizuke was optimistic about the development of paper instry. He first sponsored the Kobe paper mill company set up by the Washoe brothers, and later bought that company, which is the origin of Mitsubishi paper instry. Mizuke sent his third son, junmi, to London to study applied chemistry. After returning home, mizuke founded a glass instry,
on cryptokitties, you can buy virtual cats. By 17:00 Beijing time on December 6, 2017, the cheapest kitten had reached 0.037eth. Equivalent to 110 yuan per piece
then the kittens have some opinions about the generation. For example, Gen 12 indicates that it is the 12th generation, while Gen 20 indicates that it is the 20th generation. Generally speaking, the smaller the algebra, the more valuable it is. And you can make your kittens slap each other. For example, a Gen 1 kitten and a Gen 1 kitten will give birth to a Gen 2 kitten
you can sell your kittens and their offspring for money
but what if you don't have two kittens? If you only buy one kitten, you can use your kitten to have fun with other people's high-quality kittens. The fee also depends on the kittens (to be honest, this mechanism is very evil, similar to... Borrowing chickens to have children?) The quality of the proct. If your kitten is of high quality, you can also use your kitten to mate other people's kittens, and then you get Ethereum income
but kittens also have special fertility rates
every time a kitten gives birth to one generation, it will have a certain cooling time, and it can't regenerate kittens within the cooling time,
the cooling time is divided into several grades
fast: 1 minute
swift: 2 – 5 minutes
snappy: 10 – 30 minutes
brisk: 1 – 2 minutes
plodding: 4 – 8 minutes
slow: 16 – 24 minutes
sluggi Sh (lazy kitten): 2 – 4 days
catatonic (nervous kitten): 1 week
so the price of your cat also depends on its birth time
and generally speaking, the larger the algebra is, the higher the gen value is, and the slower their growth rate is
but I want to make complaints about it because CryptoKitties is too hot! Ethereum network has a little bit of a crash, the official recommended that every time you buy a cat, the minimum handling charge is 21000. 400000 fuel = 0.01eth. However, it is irritating that I raised the procere to 1.6 million fuel, which is 0.04, and Ethereum still failed. 0.04 Ethereum. That's more than 120 yuan. It's too dark.