Position: Home page » Ethereum » Linux Ethereum

Linux Ethereum

Publish: 2021-05-09 19:25:58
1.

How to use the Linux system mining, to use the service of the HA Yu miner, only need two steps, you can mine on the Linux system

  1. open the website, input the mobile phone number, select how many CPUs you want to use for mining, the default is to use 50% of the CPU for mining, click to generate your exclusive command and

    1. in two steps, you can mine on Linux system, the money you dig only needs to go to the website of hayu miner, enter your mobile phone number to withdraw< br />

2. Now we are all concerned about Ethereum. How to trade Ethereum? I think we all want to know something, so let's make it up here to introce a lot of content about how to trade ether currency? The most intuitive explanation of Ethereum's transaction is the message and signed packet sent from an external account to another account on the blockchain<

contains the following contents:
sender's signature
receiving address
number of transferred digital currency, etc.
transactions on Ethereum need to pay fees, which is different from bitcoin. Ethereum has fixed this link, so this indirect understanding is a security error of Ethereum, It can prevent a large number of meaningless transactions and ensure a certain degree of security. In particular, the creation, execution and call of smart contracts need to consume costs, so it can also ensure the stability of the whole system and prevent some meaningless malicious behaviors on the chain
transaction handling fee
the core of Ethereum is EVM, Ethereum virtual machine, so the bytecode executed in EVM has to pay for it. That is, we often see the concepts of gas, gas limit and gas price
gas: literally, it means gasoline. Ethereum needs gas to run just like everyday cars. Gas is the basic unit for calculating consumption in a transaction. There is a list to intuitively see the gas consumption of operation in Ethereum:
the specific content of gas consumption of operation
the default cost of step 1 execution cycle
stop0 termination is free
suicide0 is the internal data storage space of the smart contract account. When the contract account calls the suicide() method, the value will be set to null<
sha320 encrypts and decrypts
sload20 obtains
sstore100 in the fixed memory and inputs it into the fixed memory
balance 20 account balance
create100 creates a contract
call20 initializes a read-only call
additional cost paid for memory expansion
consumption of each byte of data or code in txdata5 transaction process
transaction 500 transaction At present, the cost of contract creation 53000 homestead is adjusted from 21000 to 53000
so some companies or indivials feel that blockchain technology is disintermediated and does not need a central server. This development mode is relatively cheap, but in fact, the development of blockchain is not cheaper than those of traditional software development before
gas price: literally, it's like going to a gas station, what's the price of gasoline today. A gas price is the unit price, so your transaction cost = gas * gas price, and then you pay in ether. Of course, you think I don't want to pay fees. You can set gas price to 0, but the choice is in the hands of miners, and miners have the right to choose to accept transactions and charge fees. The simplest way to think about it is very difficult for a miner to accept a transaction with a very low price. In addition, the default gas price of Ethereum is 1wei
gas limit: literally, it is the limitation of gas. Limitation is necessary. Without limitation, there will be no constraint. This gas limit has two meanings. First of all, for a single transaction, this indicates how much gas the initiator of the transaction is willing to pay at most. The initiator of the transaction needs to set it when initiating the transaction. There is also a gas limit for blocks. A single block also has a gas limit
suppose several scenarios to illustrate the use of gas:
if the user sets the gas limit, then in the transaction process, if your actual consumed gas is used
if the user sets the gas limit, then in the transaction process, if your actual consumed gas is used & gt; Gas limit, then the miner must find that your gas is insufficient, and the transaction cannot be executed. After that, the transaction will be rolled back to the state before execution. At this time, the miner will charge gas price * gas limit
the gas limit of the block. There is a gas upper limit in the block, and different gas limits specified by the user will appear in the received transactions. Then the miners will choose according to the gas limit of the block limit and "reasonably" choose the packaged transaction
specific transaction
the transaction on Ethereum can be a simple transfer of Ethernet currency, and it can also be a code message of smart contract. List a table to see the specific content of the transaction:
code content
from the address of the transaction initiator, cannot be empty, and the source is not unreasonable
to the address of the transaction receiver (this can be empty, which means the creation of a contract)
value the number of Ethernet coins transferred
data field. When this field exists, it means that a transaction is a transaction that creates or invokes a smart contract.
gas limit literally means the limit of gas. The limit is necessary. If there is no limit, there will be no constraint. This gas limit has two meanings. First of all, for a single transaction, this indicates how much gas the initiator of the transaction is willing to pay at most. The initiator of the transaction needs to set it when initiating the transaction. There is also a gas limit for blocks. A single block also has a gas limit
gas price a gas price is the unit price, then your transaction cost = gas * gas price, and then you pay in ether. The default gas price of Ethereum is 1wei
nonce is used to distinguish the identity of the transaction issued by the user
hash transaction ID is a hash value generated from the above information, which is the three parts of
R, s and V transaction signature. The private key of the transaction initiator generates the hash signature
there are three types of transactions
transfer: simple and clear transfer of Ethernet currency on Ethereum, similar to bitcoin, a transfers a certain amount of Ethernet currency to B. This kind of transaction includes: the number of initiator, receiver and value of the transaction, and others like gas limit, hash and nonce will be generated by default. So you will see a piece of code:
Web3. Eth. Sendtransaction ({from: & quot; Address of transaction originator;, To: "address of transaction receiver", value: quantity})
smart contract creation: to create a smart contract is to deploy the smart contract to the blockchain, then to is an empty field at this time. The data field is the code to initialize the contract. So you can see the code:
Web3. Eth. Sendtransaction ({from: & quot; Address of transaction originator;, data: " contract binary code"});
smart contract execution: if the contract is created and deployed on the blockchain, the execution will add the to field to the address where the smart contract is to be executed, and then the data field will be used to specify the transfer of methods and parameters to be called, so you can see the code:
Web3. Eth. Sendtransaction ({from: & quot; Address of transaction originator;, To: "address of contract executor", data: "transfer of called methods and parameters"})
the above are roughly the types of transactions
transaction confirmation
like bitcoin, Ethereum transaction can only be confirmed after subsequent block confirmation and node synchronization. The simple understanding is to dig out more blocks and confirm the transaction after verification. Ethereum often has congestion, so sometimes it needs to wait for confirmation
transfer and contract transaction flow
first, transaction initiator a initiates a transfer transaction, Then the sending format is as follows:
code details
from the address of the transaction initiator
to the address of the transaction receiver
value the number of Ethernet coins transferred
the amount of gasgas
the unit price of gas pricegas
data the message sent to the receiver
nonce transaction number
node verification: a node in Ethereum network will receive the message sent by A, Then check whether the message format is valid, and calculate the gas limit. At this time, go back to verify a's Ethereum balance. If the balance is insufficient, an error will be returned and will not be processed. Once the message sent by a passes the verification of the node, the node will put the transaction into the transaction storage pool. And broadcast to the blockchain network
miner verification: the miner must package when writing to the blockchain. When the miner receives the transaction sent by a, it will package together with other transactions, and the ordinary transfer transaction can be packaged. Then the transaction called by the contract needs to execute the calling contract code on the miner's local EVM, and the gas consumption is checked ring the code execution. Once the gas is consumed, it will be rolled back. If the gas is enough, the extra gas will be returned. And broadcast to the blockchain network
other nodes: repeat the node verification steps, and then the contract will also perform verification on the local EVM. Synchronize the blockchain after verification
first, initiator a initiates a transaction request to create a smart contract. The format is as follows:
code details
address of the transaction initiator
to0
value number of Ethernet coins transferred
quantity of gasgas
unit price of gas pricegas
data contract code
nonce transaction number
node verification:
a node in Ethereum network will receive the message sent by a to check whether the transaction is valid and whether the format is correct, Verify the transaction signature. Calculate gas, determine the address of the originator, and then query the balance of ether currency in account a. If the balance is insufficient, an error will be returned and will not be processed. Once the message sent by a passes the verification of the node, the node will put the transaction into the transaction storage pool. And broadcast to the blockchain network
miner verification:
if the miner packages the transaction, the contract account will be created according to the transaction cost and contract code, and the contract will be deployed in the account space. Here we say the contract address (the address of the smart contract account has the address of the initiator and the random number of the transaction as the input, and then generated by the encryption algorithm). After the transaction is confirmed, the address of the smart contract will be returned to a. And broadcast to the blockchain network
other nodes:
repeat the node verification steps, verify the block, update a's smart contract transaction in the node's memory pool, synchronize the blockchain, and deploy the smart contract in its own local blockchain.
3. Because mining is automatic, there is no need for retail investors to do anything, but once you mine, you are already sharing your idle bandwidth<
popular science principle:
retail side: retail investors pay expensive bandwidth fees, but they usually waste the bandwidth at work and home if they can't use it. But mining can upload this part of bandwidth to the people in need, so retail investors can also get a return
enterprise side: the traffic ore software will intelligently package the collected bandwidth and provide it to video enterprises. Because of this, the flow of ore has the ability to return to retail investors
generally speaking, you can't do nothing. This is because the technology is too intelligent to help you do everything.
4.

It is a kind of optical fiber Ethernet interface card, which transmits signals according to Ethernet communication protocol. It is generally connected with optical fiber Ethernet switch through optical cable

eth0 and eth1 are used to distinguish network card names. They have the same meaning as windows local connection 1 and local connection 2

the subnet card here is not a practical network interface, but it can flash in the system as a collection interface, such as eth0:1, eth1:2

extended data:

linux operating system embeds TCP / IP protocol stack, and protocol software has routing and forwarding function. Routing and forwarding rely on the installation of multiple network cards in the host as routers

when a network card receives a degree packet, the system kernel will query the routing table according to the destination IP address of the degree packet, then send the degree packet to another network card according to the query result, and finally send the degree packet through the network card. The process of host is the core function of router

routing function is realized by modifying Linux kernel parameters. The sysctl command is used to configure and display kernel parameters in the / proc / sys directory

for security reasons, Linux kernel forbids packet routing and forwarding by default. In Linux system, there are two ways to enable forwarding function: temporary and permanent

5. Copy an existing configuration file and change it to eth1, then change it to the IP in it

for example, the existing / etc / sysconfig / network scripts / eth0
can be roughly as follows:

device = eth0
onboot = yes
bootproto = static
iPad Dr = 192.168.1.20
netmask = 255.255.255.0
gateway = 192.168.1.255

an existing configuration file and change it to eth1 iPad If Dr is changed to 192.168.1.21, an eth1 with IP 192.168.1.21 will appear
6. "This is how to learn Linux" is a self-study book focusing on practical Linux system technology. Let's learn it together.
7. CP ifcfg-eth0 ifcfg-eth1
then VI ifcfg-eth1
according to the parameter settings in it, you can

the easiest way is if you have the installation of subset
use subset
8.
READ MORE
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750