0

I've searched for a while, but only found a simpler version of an answer. I saw where a transaction's addresses and value field would be recorded, but I'm not clear on what else might be. If I send a transaction to invoke a contract, providing the contract address and a contract function input, what is actually recorded? Is it just the hash of the transaction? Is it all of the actual arguments in the transaction? If I wanted to record multiple pieces of user data, could I just gang them up (as an array) and provide that as a contract function input? Is there any maximum length/size for this? I saw a post where one could view this as a cheap form of long term storage by using logs and events in the contract body that did a Print or console call instead of assigning to explicit contract state. Or, should I create a hash of the data I want to record, save the data and its hash myself in a local database, and just pass this data hash as a single contract function input? Thanks for any clarification/guidance.

0

In short, everything is recorded, and everything has an associated cost.

https://programtheblockchain.com/posts/2017/12/29/how-ethereum-transactions-work/ might be helpful reading for you.

  • Thanks, but this didn't really clear things up. My main question is what is recorded, the transaction details or its hash. – gkd720 Jan 19 '18 at 22:34
  • The full transaction is recorded. (It kind of has to be... otherwise how could nodes validate the transaction?) – user19510 Jan 19 '18 at 22:35
  • Hmmm, I guess I kind of suspected that. But if the whole transaction is recorded, does it cost more if the contract invoking transaction contains more data? Anyway, that gives me better direction, so I'll mark it answered. Thanks. – gkd720 Jan 20 '18 at 2:23
  • @smarx Can you include the main point from the link in your answer? Link only answer are not very useful if the site is down or the site disappears. – Ismael Jan 20 '18 at 3:18

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.