Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QIP-24: Add outputIndex to transaction receipt #24

Open
xuanyan0x7c7 opened this issue Oct 17, 2019 · 0 comments

Comments

@xuanyan0x7c7
Copy link

@xuanyan0x7c7 xuanyan0x7c7 commented Oct 17, 2019

Abstract

In order to encode information about a transaction concerning which it may be useful to form a zero-knowledge proof, or index and search, we encode a receipt of each transaction containing certain information from concerning its execution.

Motivation

Qtum is based on UTXO model and is connected to Ethereum Virtual Machine (EVM) by Account Abstract Layer (AAL). Every Ethereum transaction calls a contract and generates one transaction receipt, but Qtum may call multiple contracts in one transaction and produce multiple receipts.

The following fields are saved in every Ethereum transaction receipt:

  • 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.
  • 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.

We need to add an outputIndex field to distinguish different contract calls in one Qtum transaction.

@xuanyan0x7c7 xuanyan0x7c7 changed the title QIP-24: Add outputIndex in transaction receipt QIP-24: Add outputIndex to transaction receipt Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.