Block Building is not just knapsack!

I believe that these three heuristics are very correlated and if possible, running all three in parallel and selecting the one with the best result is better or equal than any single one on its own.

Suppose r_i is the remaining gas to fill the block after the ith transaction, a heuristic less correlated with the three above and I believe better would be r_i * f/g. Intuitively, if there is a lot of space left to fill the block, the heuristic with the highest fee weighs more; if the block is almost full, the heuristic with the lowest gas has more weight.

1 Like