asdafsdfasfasasdf
Transactions, which change the state of the EVM, need to be broadcast to the whole network. Any node can broadcast a request for a transaction to be executed on the EVM; after this happens, a validator will execute the transaction and propagate the resulting state change to the rest of the network.
Transactions require a fee and must be included in a validated block. To make this overview simpler we'll cover gas fees and validation elsewhere.
A submitted transaction includes the following information:
from– the address of the sender, that will be signing the transaction. This will be an externally-owned account as contract accounts cannot send transactions.recipient– the receiving address (if an externally-owned account, the transaction will transfer value. If a contract account, the transaction will execute the contract code)signature– the identifier of the sender. This is generated when the sender's private key signs the transaction and confirms the sender has authorized this transactionnonce- a sequentially incrementing counter which indicates the transaction number from the accountvalue– amount of ETH to transfer from sender to recipient (denominated in WEI, where 1ETH equals 1e+18wei)input data– optional field to include arbitrary datagasLimit– the maximum amount of gas units that can be consumed by the transaction. The EVM specifies the units of gas required by each computational stepmaxPriorityFeePerGas- the maximum price of the consumed gas to be included as a tip to the validatormaxFeePerGas- the maximum fee per unit of gas willing to be paid for the transaction (inclusive ofbaseFeePerGasandmaxPriorityFeePerGas)
Gas is a reference to the computation required to process the transaction by a validator. Users have to pay a fee for this computation. The gasLimit, and maxPriorityFeePerGas determine the maximum transaction fee paid to the validator. More on Gas.
The transaction object will look a little like this:
2 from: "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
3 to: "0xac03bb73b6a9e108530aff4df5077c2b3d481e5a",
4 gasLimit: "21000",
5 maxFeePerGas: "300",
6 maxPriorityFeePerGas: "10",
7 nonce: "0",
8 value: "10000000000"
9}
10
Show all
Copy
But a transaction object needs to be signed using the sender's private key. This proves that the transaction could only have come from the sender and was not sent fraudulently.
An Ethereum client like Geth will handle this signing process.
