namada icon indicating copy to clipboard operation
namada copied to clipboard

Block allocator improvements

Open sug0 opened this issue 1 year ago • 4 comments

  • [ ] 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.~~

sug0 avatar May 15 '24 09:05 sug0

For the first point, can't we check this when trying to admit a tx to the mempool?

batconjurer avatar May 16 '24 08:05 batconjurer

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.

batconjurer avatar May 16 '24 08:05 batconjurer

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.

sug0 avatar May 16 '24 09:05 sug0

For the first point, can't we check this when trying to admit a tx to the mempool?

yeah I think so

sug0 avatar May 16 '24 09:05 sug0