{ expiration: '2018-05-09T10:21:48',
    region: 0,
    ref_block_num: 1055,
    ref_block_prefix: 4035814219,
    max_net_usage_words: 0,
    max_kcpu_usage: 0,
    delay_sec: 0,

What is expiration, region, ref_block_num, ref_block_prefix, max_net_usage_words, max_kcpu_usage and delay_sec?

I assumed expiration was just the date at which the transaction would just become rejected if it had not been confirmed yet, but the date generated when I do eos.transfer(params) is actually 1 or 2 hours before the current time.


4 Answers 4


expiration -> after this time the transaction can never be included in a block.

ref_block_num / ref_block_prefix -> this transaction can only in blockchains where the highest block_num%0xff has a blockid that contains ref_block_prefix. Stated another way, this says the transaction can only be included in forks that build off of the reference block.

Taken together the transaction is only valid for the specified period of time and can be declared invalid if it isn't included in a block by the time the last irreversible block time is equal to the expiration.

EOSIO uses this information to prevent replay attacks on transactions.

delay_sec will cause the transaction to be executed a specified number of seconds after being included in a block. During this time the user can cancel it. Some permissions and contracts require a minimum delay period for security purposes.

netusage and cpu usage limit how much a block producer can bill the signers for the transaction, set to 0 to allow the producers to subjectively determine your resource usage.

  • expiration - the time at which a transaction expires
  • ref_block_num - specifies a block num in the last 2^16 blocks.
  • ref_block_prefix - specifies the lower 32 bits of the blockid at get_ref_blocknum

  • max_net_usage_words - upper limit on total network bandwidth (in 8 byte words) billed for this transaction

  • max_cpu_usage_ms - upper limit on the total CPU time billed for this transaction

  • delay_sec - number of seconds to delay this transaction for during which it may be canceled.

How to get ref_block_num:

  * @return the absolute block number given the relative ref_block_num
  block_num_type get_ref_blocknum( block_num_type head_blocknum )const {
     return ((head_blocknum/0xffff)*0xffff) + head_blocknum%0xffff;

Source: https://github.com/EOSIO/eos/blob/e87d245da0e458edc66139c3ca59f71861bcc1dd/libraries/chain/include/eosio/chain/transaction.hpp#L31

More on difference between ref_block_num & ref_block_prefix: Difference between ref_block_num and ref_block_prefix and how to retrieve it?


How to GET


I have method get info chain

getInfo: function(){
            var $vm = this;
            return axios
                  .then( function(response){
                      $vm.info = response.data

BUT it return not have


Response Data:

{ server_version: '0acef24b',
  head_block_num: 26019924,
  last_irreversible_block_num: 26019605,
  head_block_time: '2018-11-09T10:24:19.500',
  head_block_producer: 'eoslaomaocom',
  virtual_block_cpu_limit: 49100543,
  virtual_block_net_limit: 1048576000,
  block_cpu_limit: 194971,
  block_net_limit: 1047496,
  server_version_string: 'v1.3.0' }

but the date generated when I do eos.transfer(params) is actually 1 or 2 hours before the current time.

Take a look on that:


expiration - This is based on the head block time from the blockchain. Be careful to suffix a Z if required (as with Firefox and JavaScript) to ensure this date string is interpreted as Zulu time. Example: new Date(new Date(info.head_block_time + 'Z').getTime() + expireInSeconds * 1000).toISOString().split('.')[0]

// Zulu (short for "Zulu time") is used in the military and in navigation generally as a term for Universal Coordinated Time (UCT)

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.