gossamer icon indicating copy to clipboard operation
gossamer copied to clipboard

Unrestricted Loop When Building Blocks (GSR-19)

Open danforbes opened this issue 3 years ago • 0 comments

There is a loop when building BABE blocks that is unrestricted. While the slot has not finished, the builder will continue to poll the transactionState for new transactions. This is done in a loop without sleeps in between. The result is an excessive use of resources and constant grabbing and releasing of the transaction queue lock.

One solution is to add a small sleep when txn == nil to avoid continued, excessive polling of the transactionState.

danforbes avatar Mar 21 '22 19:03 danforbes