1

I am trying to understand all the properties of the transaction object. On the developers site (https://developers.eos.io/eosio-nodeos/docs/communication-model) they provide the below transaction object:

{ "expiration": "2018-04-01T15:20:44", "region": 0, "ref_block_num": 42580, "ref_block_prefix": 3987474256, "net_usage_words": 21, "kcpu_usage": 1000, "delay_sec": 0, "context_free_actions": [], "actions": [{ "account": "eosio.token", "name": "issue", "authorization": [{ "actor": "eosio", "permission": "active" } ], "data": "00000000007015d640420f000000000004454f5300000000046d656d6f" } ], "signatures": [ "" ], "context_free_data": [] }

My questions are 1) what context_free_actions is? 2)where are the scope and recipients fields that dan pointed out in this https://steemit.com/eos/@dan/eos-developer-s-log-stardate-201707-9 article? Scope was used so as a block can produced parallel? 3)How this achieved without the scope property?

1 Answer 1

0
  1. Context free actions don't depend on (can't read or modify) the state of the blockchain and can therefore be executed in parallel.
  2. Receivers are notified and can "discard" a transaction if they deploy a custom dispatcher (see eosio::on_notify())
  3. Scope is already implemented in the state, each table has a scope - but it's not used for multi-threading yet.
5
  • about the receivers statement. How does the node for which account to run the apply() method if its not in the trx?
    – stan14
    Commented Oct 3, 2019 at 13:20
  • The trx-example you provided above is the scheme of a typical "issue"-transaction and while issuing a token there are no additional accounts and therefore no receivers involved. To notify a receiver you would add require_recipient(receiver) to your smart contract.
    – cmadh
    Commented Oct 3, 2019 at 21:45
  • Ok so an additional field would be added to the trx object in that case.How this field would called? recipients or receivers? thank you
    – stan14
    Commented Oct 3, 2019 at 22:44
  • you don't neccessary need to add it to the transaction. If you for example automatically send rewards to holders of a specific token every night and just call a single action for that which does the rest for hundrets of accounts, depending on your implementation you don't have to add the receipients to the action-parameters. All you need is to call require_receipient([valid_eos_account_name]) from within your contract.
    – cmadh
    Commented Oct 3, 2019 at 22:59
  • I know the implementation side, I am programming eos smart contracts for like 1 year before now. I am just asking for a paper I am writing about Eos and so as to clarify the fields :)
    – stan14
    Commented Oct 4, 2019 at 1:01

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.