1

In Bitcoin, the data that you want to keep in the blockchain resides in the transactions so it is important to keep the transaction ID. Is it the same in Ethereum? Or is the data saved in smart contracts?

I need to know because I want to understand how a client can connect to Ethereum in order to privately verify a performed operation. For example, the customer must be able to verify that there is a reservation within the smart contract.

1 Answer 1

1

All of the data for an Ethereum transaction is stored in the block it was mined in. This means that a contract's data is also stored in the block.

The transaction ID is needed in order to look up the specific transaction data in that block.

In your case, a client can connect to the blockchain and search a block with the transaction ID. They will then be able to find all the relevant data for that transaction.

If the client does not care about data at a specific time, they can query the smart contract (on chain) at the latest block and ask for the data without needing a transaction ID.

2
  • Is the transaction ID the hash of the transaction?
    – Mario Roma
    Jan 12, 2021 at 23:11
  • It is a hash of the transaction data. You can see more here. Jan 13, 2021 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.