You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is purely security/performance related. Although it may make emitting events less expensive as it may be less expensive to validate them? But that's unclear.
Currently, events are emitted as CBOR objects. Unfortunately, this makes it hard to accurately charge gas for parsing.
Proposal:
Emit three buffers:
entries
: An array of[(flags: u64, codec: u64, key_len: u32, value_len: u32), ...]
(packed). I.e., 24 bytes per event.keys
: A buffer of all keys, concatenated.values
: A buffer of all values, concatenated.The FVM will:
entries.len() / 24
(or return an error if not a multiple of 24).keys
, and the length ofvalues
.Importantly, this means the FVM can accurately charge gas before parsing anything.
The text was updated successfully, but these errors were encountered: