Block allocator improvements
- [ ] Handle txs whose sizes are greater than the bin size reserved for them.
- [x] ~~Arrange to include some types of txs (e.g. validator set update protocol txs) at all times, by making space for them, removing txs from other bins.~~
For the first point, can't we check this when trying to admit a tx to the mempool?
I'm not sure we want to give so much priority to protocol txs. They are designed to have an epoch to be included and we don't want to throttle user txs too much.
hm, we would only give priority to some protocol txs, not all. with the current code, I think they can only take up to half of the available block space anyway. blocks are configured to hold up to 6 MiB of txs at most, and we can have about 100 validators at most; even if we submitted all 100 validator set updates simultaneously, we would not be using 3 MiB of space I think. assuming validators were spamming protocol txs to throttle user txs, out of 100, only 32 can display Byzantine behavior (assuming a uniform voting power), so the damage would be minute. the only problem here would be slashing double votes on protocol txs, which we currently don't.
well, either way it's probably best to simply keep ignoring validator set updates that cannot make it to a block.
For the first point, can't we check this when trying to admit a tx to the mempool?
yeah I think so