Skip to content

`is_producing()` replaced with transaction status flags

Andrzej Lisak requested to merge abw_producing_replacement into develop

Also contains fix for remaining bug with "Accepting..." not enough RC and some smaller fixes. See commit by commit for more details.

Since I can't find related issue for above problem, here is how it worked incorrectly:

When transaction was first validated by the node (is_producing() == true) it was put inside list of pending transactions. Since is_producing() == false all the time other than during first validation, once transaction became pending there was no way for it to be dropped due to lack of RC. It meant that even when node was producing block, it would silently accept transactions that did not have RC. When block with such transactions reached other nodes, they treated it as a 2nd layer problem and generated "Accepting..." warnings. After the change block producer skips such transactions (but they remain pending, waiting to be potentially included in some later block or until expiration). How can validated transaction X not have enough RC? There can be couple of reasons:

  • some other transaction Y with the same payer was included in block that came after X became pending, eating RC mana
  • new step of power down was performed after X became pending, reducing vests and therefore RC mana
  • payer of X had his incoming delegations taken away reducing his RC mana

and probably most common cause

  • cost of resources increased in the meantime, either as a result of more total vests or because the same resources that X uses became "more popular"

Merge request reports