The shift from 10,000 to 500 is prompted by a discovery on Rococo. When a parachain placed a batch call for approximately 5,000 orders in a single block, coupled with Rococo's abundance of on-demand cores at the time, block import times slowed significantly, as evident in the reported issue. To address this temporarily, we're restricting the total number of orders by adjusting the configuration through configuration.setOnDemandMaxQueueSize
to a smaller value, and for the initial launch, 500 is a safe limit. Once a more permanent solution is in place, the maximum orders can be revisited.
Note that the OnDemandQueue stores orders made on the relay chain which have yet to be assigned a core. The maximum size represented by onDemandMaxQueueSize
is the absolute maximum that this storage entry can be. It is further bounded via an optimal price controller, which is currently set to try and maintain 0-25% of the max capacity without increasing the price of an order.