Open
Description
Ideally we would strive for zero-copy validation. Validating some DAG-CBOR constraints make this difficult (e.g. checking that integers are minimally encoded, or that CIDs are well formed), but it's definitely better than eagerly allocating whatever struct the user passes.
See an initial stab at an implementation here: ipld/libipld#159. We should probably make it iterative instead of recursive for extra safety; I have ideas.
This is more relevant for M2.2 than it is now, since user events will be emitted through the EVM built-in actor. It may reduce footguns if we start emitting events from other built-in actors prior to M2.2, but we can decide then.