Ethereum private chain configuration log
solve the problem in an all-round way
1. Miracle Moore's Linux kernel has been deeply optimized for more than 200 times to avoid the problem that some hardware failures will directly lead to system crash
2. In view of the situation that many mining software in the market can't connect to the mining pool after restart, miracle Moore perfectly solves the problem by using the function of resetting the image after each restart of the mining machine
3. After testing, the average computing power error and delay share of miracle Moore system in each mine pool are not more than 1.5%, which significantly improves the mining revenue of users
4. After numerous experiments, miracle Moore development team has obtained the optimized VBIOS overclocking setting of graphics card. Compared with the traditional overclocking method, it can further improve the computing power of graphics card by 5% and rece the power consumption by 15%!
Hello, according to my experience, 1. First set up the rack, then fix the graphics card, and then plug the CPU and fan, memory, SSD hard disk into the slot of the motherboard, and connect the power supply and motherboard power supply
I hope my suggestions can help you, thank you
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
make: * * [geth] error 1
there is no such directory, or the directory has insufficient permissions
first, you need to create a "Genesis" JSON configuration file, which describes some parameters of the genesis block. The following is the content of the file:
{
& quot; coinbase": & quot;& quot;,< br />" config": {< br />" homesteadBlock": 5
},
" difficulty": & quot; 0x20000",< br />" extraData": & quot; 0x",< br />" gasLimit": & quot; 0x2FEFD8",< br />" mixhash": & quot;& quot;,< br />" nonce": & quot; 0x0",< br />" parentHash": & quot; 000000000000000000000000",< br />" timestamp": & quot; 0x00",< br />" alloc": {< br />"& quot;:< br />{
" balance":& quot;& quot;
}
}
} 1234567891011213141516171819
the above code into a text file and name it genesis.json
Genesis!:
in order not to conflict with the data of the main chain, it is recommended to establish your own private chain data folder. On my computer, I built an ethdbspace as the Ethereum experimental work area on disk e, and created a privchain folder as the data storage folder of my first private chain
here, in order to facilitate management, I put genesis.json under the ethdbspace folder
open the windows command line
type the following command
geth -- dataDir & quot; E:\ EthDBSpace\ PrivChain" init " E:\ EthDBSpace\ genesis.json" 1
– the dataDir option is used to specify the data directory of our private chain. On my computer, it's E: &; EthDBSpace\ Privchain
init is the genesis command, followed by our Genesis configuration file path
after clicking enter, the execution result is as follows
at this time, genesis is complete
create an account:
in order to do experiments on the private chain, we also need to create our own account on the private chain
windows command line, type
geth -- dataDir & quot; E:\ EthDBSpace\ PrivChain" Console1
we have successfully created the world, so when we enter the client for the second time, we do not need to specify the genesis.json file path again, but directly – dataDir to indicate the private link data path
the console command is used to open the command line of geth
after clicking enter, the client will be initialized for a while. After the command prompt appears, it means that you have entered the geth console
type
personal. Newaccount (& #) in the geth command line; Your Password') 1
the personal.newaccount function is used to create an account, in which the parameter is the account password.
after clicking enter, the account creation address will be listed in green below the command, that is, the public key of the account.
we can check the account balance first, In the geth command line, type:
My = eth. Accounts [0]
eth. Getbalance (my) 12
My = eth. Accounts [0]. The purpose of this sentence is to assign the account address we just created to my variable. This can simplify the subsequent account address input. Among them, eth.accounts records the addresses of all accounts on this machine. Since we created an account for the first time, there is only one account on the computer at present. So here we use eth. Accounts [0] to extract the first account address. The eth.getbalance function is used to obtain the account balance, and the parameters are filled in the account address. The my variable here records the address of the first account
I hope my answer can help you
new currencies are usually solved through open market operations. In other words, the central bank makes its own money flow out by buying Treasury bonds (issued by the Ministry of Finance), so that the money flows to commercial banks, and commercial banks make money circulate in the society through lending
first of all, understand currency: today's commonly referred to as currency is the paper money in our pocket. It is a medium and tool to facilitate the exchange and circulation of goods under the commodity economy. It has no value in itself and is issued and forced to circulate by the national bank. When you go shopping in China with us dollars, the shop owner will treat us dollars as a piece of waste paper, because US dollars must be converted into RMB through the central bank to be used in China
currencies of different countries cannot be circulated in different countries. Now, with the global economic integration, there are certain economic exchanges between countries. In order to solve the trade and currency problems between different countries, two concepts of foreign exchange and foreign exchange reserve are involved
as we all know, a country's wealth is not measured by the amount of its currency issued or owned, but by the amount of its commodities, which are the material needs of people's life, rather than money, that is, a country's proction capacity and gross domestic proct
trade between countries can be divided into export and import as follows:
in the case of export, if US dollar is used as foreign currency, that is to say, Chinese multinational enterprises sell their procts in the United States in exchange for the currency of other countries. For Chinese people, foreign currency is not allowed to circulate in the Chinese market, Therefore, in the Chinese market, foreign currency is equivalent to a pile of waste paper. Therefore, it is useless for Chinese export enterprises to sell foreign currency to the national bank to exchange it for RMB, and the state holds foreign currency. People's wealth is ultimately reflected in their material enjoyment, and money is only an intermediary and tool for material exchange, Our domestic enterprises give the goods they proce to the United States, while the United States only gives us foreign currency (bonds), thus forming a debt relationship: that is, China is the creditor, foreign countries (the United States) are the debtor, and foreign exchange (US dollars) is the debt relationship certificate
for the import situation, foreign currency reserves will not be affected. For example, if foreign businessmen sell foreign goods at home to earn RMB, the central bank will take the foreign exchange reserves (US dollars) to buy back RMB from foreign investors (because this part of RMB is circulating at home and is not counted as foreign exchange reserves), It may also be that foreign businessmen take RMB to their own country to exchange for their own currency, which also forms their own foreign exchange reserves (whether the actual process is like the above, I don't know, it's not studying economy, it's just speculation). Buy back is actually a hedging process (the real sense of hedging seems to be that the central bank takes foreign exchange to buy overseas). It can also be understood as follows: foreign goods are regarded as the goods proced by the central bank and sold in the domestic market. In this way, part of the foreign exchange reserve is returned to the people through the central bank, and the debt is also paid
generally, the amount of money in circulation of a country corresponds to the amount of goods proced by the country Material wealth corresponds to the amount of money)
Chinese enterprises export goods, which can be seen as: China proces too many domestic goods (that is, the corresponding currency is not enough),
domestic enterprises get foreign markets for commodity sales and exchange through the form of export, and can exchange domestic goods for foreign goods, but because of the existence of foreign currency, In fact, these foreign currencies are equivalent to the debts of foreign consumers to China's export enterprises, and these debts are uniformly assigned to the name of the national bank. This has become the country's foreign exchange reserves. The more foreign exchange reserves, the more money the state will lend. Lending is equivalent to issuing money. If a country releases too much money, it needs to issue a large amount of money, which may cause inflation (there are not enough goods, but a lot of currency in circulation). At this time, the country purchases goods from overseas through the international market, and consumes foreign goods in exchange for goods, so as to achieve the goal of stabilizing and balancing the economy. It can also be understood from another perspective that the central bank releases a large amount of money to exchange for foreign exchange reserves. The increase of this kind of money is not caused by the "invisible hand" of the market rules, but by the Central Bank of the government. If we zoom in, the increase of money will actually be inflation, and the money on the hands of the people will be devalued, The devalued part is occupied by the central bank free of charge. Therefore, it can be understood as: foreign exchange reserves are liabilities of the central bank, not assets, because it is exchanged by the central bank from the people's hands with RMB, then the people will want to cash this asset one day
as China's foreign exchange currency is mainly US dollar, once the US economy fluctuates and leads to the depreciation of US dollar, China's foreign exchange reserves will have the risk of devaluation. The devaluation of foreign exchange reserves is also the loss of China's assets< In a word, foreign exchange reserve is a kind of debt relationship between the people and other countries (reserves are not national assets, but the money of the working people), and the people, as one of the creditor's rights, transfer the creditor's rights to the National Central Bank and hang them in the name of the central bank
foreign exchange reserve refers to the foreign convertible currency held by a country's monetary authority and can be used for external payment, which acts as an international reserve asset. The amount of foreign exchange reserve mainly depends on the status of import and export, the scale of foreign debt and the actual use of foreign capital. Foreign exchange reserves are used for trade with other countries
in order to increase foreign exchange, we need to issue RMB to buy, and the supply of RMB will increase, which may cause monetary expansion in the domestic market. A certain amount of foreign exchange reserve is an important means for a country to adjust its economy and realize the economic balance at home and abroad. When there is a deficit in the balance of payments (more imports, the domestic market full of foreign goods, causing domestic monetary tightening), the use of foreign exchange reserves can promote the balance of payments; When the domestic macro-economy is unbalanced and the total demand is greater than the total supply (the consumption demand increases and the goods are not enough), we can use foreign exchange to organize imports, so as to adjust the relationship between the total supply and the total demand and promote the macro-economy balance
at the same time, when the exchange rate fluctuates, we can use the foreign exchange reserves to intervene the exchange rate and make it stable
the performance of foreign exchange reserves is to hold a kind of financial claims expressed in foreign currency, not put into domestic proction. This leads to the problem of opportunity cost, that is, if the monetary authorities do not hold reserves, they can use these reserve assets to import goods and services, increase the real resources of proction, and thus increase employment and national income, while holding reserves gives up such benefits
the increase of foreign exchange reserves should expand the money supply. If the foreign exchange reserves are too large, it will increase the pressure of inflation and increase the difficulty of monetary policy
holding too much foreign exchange reserves may also cause losses e to the depreciation of foreign exchange rate
because foreign currency can not circulate in the domestic market, the central bank not only releases a certain amount of money (through export and foreign capital) in China, but also reserves a certain amount of foreign exchange on behalf of the country. At this time, RMB is used in China, while foreign exchange itself is independent of the domestic economic operation, and is used by the central bank to maintain and increase value in the international financial market.