You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what you want implemented
Transaction extracted from the mempool should be weighted with the average gas spent for that kind of transaction.
With this weight, the new prioritisation should be ForecastGasSpent*GasPrice.
Transactions should be extracted until Sum(ForecastGasSpent)>=GasLimit
This has no impact on rusk, if actual Gas is greater than the forecast, transactions will not be included the block (as per the current behaviour)
Describe "Why" this is needed
To extract transactions from the mempool, the only criteria currently used is GasLimit*GasPrice.
These leave the stage to two unwanted scenario:
With higher GasLimit the prioritisation of a transfer transaction can be higher than a stake transaction, even if the latter will effectively use more gas
All transactions that fit the BlockSize limit are executed to try to fit into a block (even if there is no reasonable gas left). This highly impact ExecuteStateTransition performance and, therefore, the whole consensus performance
As discussed with @herr-seppia, it might actually make sense to only use the criteria of GasPrice for prioritization, as this would be most beneficial for node rewards. As long as I can add transactions up till the point that the block is full without running out of time adding transactions, prioritization on GasPrice would be most beneficial.
Example:
There are two transactions: Stake consume 10gas, and Transfer consume 1gas.
If I put my transfer with gasPrice=9, It should be prioritized over the stake even if I will pay 9 total instead of 10 total.
If I have 100 gas to fill in a block, I start with 9*1, claiming 9, and still having 99 gas to fill after this transaction.
The most important part is introducing: Sum(ForecastGasSpent)>=GasLimit
Describe what you want implemented
Transaction extracted from the mempool should be weighted with the average gas spent for that kind of transaction.
With this weight, the new prioritisation should be
ForecastGasSpent
*GasPrice
.Transactions should be extracted until Sum(ForecastGasSpent)>=GasLimit
This has no impact on rusk, if actual Gas is greater than the forecast, transactions will not be included the block (as per the current behaviour)
Describe "Why" this is needed
To extract transactions from the mempool, the only criteria currently used is
GasLimit
*GasPrice
.These leave the stage to two unwanted scenario:
Describe alternatives you've considered
N/A
Additional context
See also #1240
The text was updated successfully, but these errors were encountered: