Create a data structure replacing `ReentrantCollectionView<C, AccountOwner, PendingBlobsView<C>>`
This structure has multiple issues:
- The
PendingBlobsViewhas aMapViewfor theBlobIdas if differentAccountOwnercan have the sameBlobIdand separation is important. Actually, yes, in principle they can, but no repetition does not hurt, since if two users create the same blob, no problem occurs. - It is very inefficient if one wants to access a blob if one does not know the owner of the blob created. See the code in
maybe_get_required_blobsabout this.
I don't understand the description of the first issue.
We have a structure by AccountOwner, which makes the access to data slow. Why can't we have a
MapView<C, BlobId, BlobContent>
We need to limit the amount of pending blobs we keep in the chain state view. If we have a limit for all chain owners, then a malicious owner can keep the other owners from making successful proposals by spamming the validators with unnecessary blobs.
So instead we impose a limit per owner.
But you're right, there's no reason why we shouldn't still store the actual blobs separately. We just need to do the bookkeeping about which blob belongs to which owners' proposals.