3

From what I understand, there are 3 types of storage:

  • RAM > Available to other contracts, but costs EOS to use
  • Transaction data / logs > Not available to contracts, but also no ongoing cost, and could be indexed for display by a dApp
  • EOS Storage (future) > Large data files stored on IPFS

In regards to the transaction data, is there a size limit on it? For example, could you store full blog post text in it like Steem?

1 Answer 1

5

From the documentation, only CPU limitations are specified:

Transaction Limitations

Every transaction must execute in 30ms or less. If a transaction contains several actions, and the sum of these actions is greater than 30ms, the entire transaction will fail. In situations without concurrency requirements for their actions this can be circumvented by including the CPU consuming actions in separate transactions.

From the eosio.token code, there is a size limit on the memo field:

eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" );

However, other than these, I don't think there's a default limit on transactions in terms of size. On my testnet, I created a contract with an action that takes a std::string and prints it, and I managed to pass more than 30,000 chars, the only limit being transaction time. Example:

$ cleos push action your_contract your_action '["'$(printf 'a%.0s' {1..30000})'"]' -p your_contract

This is stored in [transaction_id]['transcations']['trx']['transaction']['actions'][0]['data']['param_name'] in the log.

could you store full blog post text in it?

So, I guess as long as you have enough EOS staked for net bandwidth and you can find BPs with fast CPUs that can execute your transaction under 30,000us, depending on the size of the blog post, yes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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