joystream
joystream copied to clipboard
The trouble with events
This issue is meant as a long term placeholder for this issue, as I anticipate it will be with us in one form or another for the foreseeable future.
Start here
- https://substrate.stackexchange.com/questions/4126/why-are-events-stored
- https://substrate.stackexchange.com/questions/4296/large-event-payloads-unsafe
So certainly having large event payloads, in particular when combined with big blocks, is not advisable. Problem is not solvable by dropping System module behavior, as that breaks lots of assumptions in downstream tooling, hence only remaining solution is to only have small fixed length event parameters, as initiated here: https://github.com/Joystream/joystream/issues/4135
We have such large events all over the runtime, most clearly in the remark extrinsics, but lots of other one off cases also. Some are easy to miss, because they are just unrestricted Vec<u8>
fields inside an input parameter type, such as GiftMembershipParameters
in MembershipGifted
.