Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Metaprotocol replacement of storage pallet #4940

Open bedeho opened 1 year ago

bedeho commented 1 year ago

Background

The storage pallet holds a representation of all data objecst, including what storage providers and distributors are involved with serving it. The entire conceptual apparatur of bags and buckets has been constructed in a way which is extremely sensitive to compute constraints of the on-chain processing. The on-chain storage pallet is the primary cost-driver of publishing on Joystream, mainly through the bloat bonds involved, and having content types with large numbers of data objects may already be very expensive. This pallet is also in general quite complex, and thus would be nice to stop relying on long term.

Proposal

Introduce a pure metaprotocol version of the storage pallet. What we loose is the ability for the runtime to know what different operators are supposed to do, hence it cannot be involved in any sort of proving scheme where nodes are challenged and possibly sanctioned programmatically by the chain. What we gain is

This system can probably be introduced and live in parallel with the storage pallet for a long time, before the actual storage pallet may be deprecated if this is a success, so its not an all or nothing choice. If this is of interest, someone should try to spec out requirements, and pay close attention to how integration with content pallet should work, if that passes some review, a JIP should be proposed under JIP2.