¿Qué son los recibos de transacciones de Ethereum y para qué se utilizan?

He visto menciones en algunos lugares que bloquean los recibos de transacciones de tiendas, pero realmente no he visto una explicación de qué son y por qué existen.

Respuestas (1)

Relación entre Transaction Trie y Receipts Trie proporciona un buen resumen:

Los recibos de transacción registran el resultado de la transacción

Aquí está la estructura de un recibo de transacción

blockHash: String, 32 Bytes - hash of the block where this transaction was in.
blockNumber: Number - block number where this transaction was in.
transactionHash: String, 32 Bytes - hash of the transaction.
transactionIndex: Number - integer of the transactions index position in the block.
from: String, 20 Bytes - address of the sender.
to: String, 20 Bytes - address of the receiver. null when its a contract creation transaction.
cumulativeGasUsed: Number - The total amount of gas used when this transaction was executed in the block.
gasUsed: Number - The amount of gas used by this specific transaction alone.
status: String - '0x0' indicates transaction failure , '0x1' indicates transaction succeeded.
contractAddress: String - 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
logs: Array - Array of log objects, which this transaction generated.

Echa un vistazo a las dos últimas propiedades. Un uso simple de un recibo es averiguar un nuevo contrato contractAddress. Un uso más avanzado para un recibo es probar la existencia de registros en la cadena de bloques.

El estado indica si la transacción tuvo éxito o no (es decir, se quedó sin gasolina)