For the Shimmer network, a set of protocol parameters was chosen.
And I think most values like Min PoW Score
, Below Max Depth
or VByte Cost
where chosen with good reason and/or simulations done beforehand.
However, the maximum length for metadata fields (and subsequently also the maximum message length) got me thinking. Currently metadata fields can hold at most 8192 bytes. Even with JSON objects, this can be reached rather fast, especially if we use to to actually represent a mutable state, e.g. controlled through a committee via an alias account. If we take a big step into the future and look at L1SCs, these fields are definitely not big enough.
The benefits of larger fields are pretty clear. If you want to store bigger amounts of data, you do not need to implement some sort of paging to load everything. This also reduces the overall disk storage (and such dust deposit) required, since we only need to store data like type, token amount and unlock conditions once. In addition, this should also lower node resources for fetching, since one large read is faster than multiple, spread out, reads.
There are a few minor cons. First of all, we’d need to change the data type to (uint32)ByteArray to allow >65.535 bytes in a metadata field, which would increase storage for all metadata by two bytes. Also I see a potential network (D)DoS on single nodes by requesting/submitting these large messages, since mana would only pay for the traffic inside the network itself, not when entering/pulling data from it via a node.
Do you see any additional risks on the protocol side?