2

I know that deferred transactions can just be dropped by the nodes if they are too far in the future, but I wonder what the maximum delay for a deferred transaction is in practice on the mainnet.

I saw someone mentioning a max-deferred-transaction-time in the node's config.ini, but the default config does not mention this parameter. Is there a default value? What configuration do most nodes have on the mainnet?

0

According to EOS-Mainnet's genesis.json file:

{
  "initial_timestamp": "2018-06-08T08:08:08.888",
  "initial_key": "EOS7EarnUhcyYqmdnPon8rm7mBCTnBoot6o7fE2WzjvEX2TdggbL3",
  "initial_configuration": {
    "max_block_net_usage": 1048576,
    "target_block_net_usage_pct": 1000,
    "max_transaction_net_usage": 524288,
    "base_per_transaction_net_usage": 12,
    "net_usage_leeway": 500,
    "context_free_discount_net_usage_num": 20,
    "context_free_discount_net_usage_den": 100,
    "max_block_cpu_usage": 200000,
    "target_block_cpu_usage_pct": 1000,
    "max_transaction_cpu_usage": 150000,
    "min_transaction_cpu_usage": 100,
    "max_transaction_lifetime": 3600,
    "deferred_trx_expiration_window": 600, // LOOK HERE
    "max_transaction_delay": 3888000,
    "max_inline_action_size": 4096,
    "max_inline_action_depth": 4,
    "max_authority_depth": 6
  }
}

But as far as I know there are no guarantees about deferred transactions either way.

  • So, can't we use sleep in the cpp code to execute a particular action after given time? Just a thought. – Rajat Chaudhary Aug 6 '18 at 12:24
  • if a transaction takes more than 200ms it won't be included in the blockchain though, so sleep won't work if it delays the transaction too much – confused00 Aug 6 '18 at 12:41
  • 1
    I am finding difficulty in cancelling the deferred transaction. Can you please point me in a right direction? I am going through eos source code where I found the apply_context.cpp file in which the function is defined but I am unable to use that function in my contract. – Rajat Chaudhary Aug 6 '18 at 13:09
  • there's a cancel_deferred() function in eosio but i'd suggest you ask a new question if you run into any problems, as this is not related to OP's question and it's bad practice to talk off-topic in comments – confused00 Aug 6 '18 at 13:11
  • What's the difference between deferred_trx_expiration_window and max_transaction_delay? – cmichel - LearnEOS.one Oct 4 '18 at 17:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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