Witness Block Error due to Block Too Old

in #witness-category9 months ago

Most blocks missing are due to "attempting to push a block that is too old"

Untitled.png

This is thrown at: https://github.com/steemit/steem/blob/ff9b801615ba8c347a0c3f534ad06adc551b58e5/libraries/chain/fork_database.cpp#L57

void  fork_database::_push_block(const item_ptr& item)
{
   if( _head ) // make sure the block is within the range that we are caching
   {
      FC_ASSERT( item-&gt;num &gt; std::max<int64_t>( 0, int64_t(_head-&gt;num) - (_max_size) ),
                 "attempting to push a block that is too old",
                 ("item-&gt;num",item-&gt;num)("head",_head-&gt;num)("max_size",_max_size));
   }

   if( _head &amp;&amp; item-&gt;previous_id() != block_id_type() )
   {
      auto&amp; index = _index.get<block_id>();
      auto itr = index.find(item-&gt;previous_id());
      STEEM_ASSERT(itr != index.end(), unlinkable_block_exception, "block does not link to known chain");
      FC_ASSERT(!(*itr)-&gt;invalid);
      item-&gt;prev = *itr;
   }

   _index.insert(item);
   if( !_head || item-&gt;num &gt; _head-&gt;num ) _head = item;
}

That is caused by: when the witness server is to slow to generate a block within 3 seconds - even it managed to generate a block shortly afterwards, it is too late (the block is missed)

How to avoid this? Make sure a good network connection (low latency) is one first thing to check.

Also, make sure the time/clock (NTP) on the server is accurately synchronized.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thank you for reading ^^^^^^^^^^^^^^^

Follow me for topics of Algorithms, Blockchain and Cloud.
I am @justyy - a Steem Witness
https://steemyy.com

My contributions

Delegation Service

  1. Voting Algorithm Updated to Favor those High Delegations!
  • Delegate 1000 to justyy: Link
  • Delegate 5000 to justyy: Link
  • Delegate 10000 to justyy: Link

Support me

If you like my work, please:

  1. Delegate SP: https://steemyy.com/sp-delegate-form/?delegatee=justyy
  2. Vote @justyy as Witness: https://steemyy.com/witness-voting/?witness=justyy&action=approve
  3. Set @justyy as Proxy: https://steemyy.com/witness-voting/?witness=justyy&action=proxy
    Alternatively, you can vote witness or set proxy here: https://steemit.com/~witnesses

-------------</block_id></int64_t>

Sort:  

Hi @justyy. In the image that you have attached, the witness name in the missed block is aldowshuxley. Does that mean that it was that witness who failed to push the block in time?

Coin Marketplace

STEEM 0.41
TRX 0.07
JST 0.052
BTC 43000.91
ETH 3333.34
BNB 494.67
SBD 4.96