Transactions
A Transaction is a transfer of value on the blockchain. In very simple terms, a transaction is when one person gives a designated amount of cryptocurrency they own to another person.
To perform transactions on the blockchain, you need a wallet, a program linked with the blockchain to which only you have access, that keeps track of the crypto you own and allows you to transact with it. Each wallet is protected by a special cryptographic method that uses a unique pair of distinct but connected keys: a private and a public key.
A public key, also known as the address, is a series of letters and numbers that a user must share in order to receive funds. In contrast, a private key must be kept secret, much like your bank card pin number, as it authorizes the spending of any funds received by the associated public key.
A consensus mechanism and a reward system are the crucial features of the blockchain transactions.
- Once a transaction has been agreed between users, it must be confirmed or approved before it can be added to any block on the chain.
- In public blockchains, the decision to add a transaction to the chain is made by consensus. This means that a majority of the "nodes" (or computers on the network) must agree that the transaction is valid. Rewards incentivize people who own computers on the network to validate transactions. This process is called "Proof of Work".
- In Proof of Work, people who own computers on the network must solve complex math problems to add blocks to the chain. Solving problems is called mining, and "miners" are usually rewarded for their work in cryptocurrencies.
- The blockchain network then introduced a “proof of stake” verification consensus protocol. The protocol requires participants to own a stake in the blockchain, typically by owning a portion of the cryptocurrency, in order to gain the ability to select, validate, and verify transactions. This saves a lot of computing power resources as mining is no longer required.
The Transactions representation fields in our database are mentioned below:
Field Name | Description | Mode | Type |
---|---|---|---|
hash | A unique hash for a particular Transaction present in the Blockchain | Required | String |
from_address | Address of the Sender for the Transaction Event | Required | String |
transaction_index | Index position of the transaction in the block | Required | Integer |
nonce | Gas provided by the sender. | Required | Integer |
to_address | Address of the receiver. null when its a contract creation transaction | Nullable | String |
chain_id | Chain on which the transaction is present, eg: Ethereum,Palm,Polygon etc | Nullable | Integer |
value | Value transferred in Wei | Nullable | Integer |
receipt_cumulative_gas_used | The total amount of gas used when this transaction was executed in the block | Nullable | Integer |
receipt_gas_used | The amount of gas used by this specific transaction alone | Nullable | Integer |
receipt_contract_address | The contract address created, if the transaction was a contract creation, otherwise null | Nullable | String |
receipt_root | 32 bytes of post-transaction stateroot (pre Byzantium) | Nullable | String |
receipt_status | Either 1 (success) or 0 (failure) (post Byzantium). | Nullable | Integer |
block_timestamp | Timestamp of the block residing the transaction | Required | timestamp |
block_hash | Hash of the block residing the Transaction | Required | String |
block_number | Block number residing the Transaction | Required | Integer |
gas | Gas provided by the sender. | Nullable | Integer |
gas_price | Gas price provided by the sender in Wei. | Nullable | Integer |
max_fee_per_gas | Total fee that covers both base and priority fees | Nullable | Integer |
max_priority_fee_per_gas | Fee given to miners to incentivize them to mine the transaction | Nullable | Integer |
transaction_type | Type of the Transaction | Required | Integer |
transaction_sub_type | Events in the Transactions refered to as Sub transactions | Nullable | Integer |
receipt_effective_gas_price | Gas provided by the sender. | Nullable | Integer |
input | The data sent along with the transaction. | Nullable | String |