- Blockchain for Enterprise
- Narayan Prusty
- 340字
- 2021-07-16 17:50:50
What are Ethereum transactions?
A transaction is a data package to transfer ether from an account to another account or contract, invoke methods of a contract, or deploy a new contract. A transaction is using Elliptic Curve Digital Signature Algorithm (ECDSA), which is a digital signature algorithm based on ECC. A transaction contains a signature identifying the sender and proving their intention, the amount of ether to transfer, the maximum number of computational steps the transaction execution is allowed to take (called a gas limit), and the cost the sender of the transaction is willing to pay for each computational step (called the gas price). The product of the gas used and the gas price is called the transaction fees.
In permissioned networks, ether is valueless. In a Quorum network, ether is supplied in the genesis block and is not generated dynamically at runtime. You need to supply ether in the genesis block. You need to provide gas to prevent attacks, such as infinite loops. Ether is not deducted from accounts when transactions are mined.
If the transaction's intention is to invoke a method of a contract, it also contains input data, or if its intention is to deploy a contract, then it can contain the initialization code. To send ether or to execute a contract method, you need to broadcast a transaction to the network. The sender needs to sign the transaction with its private key.