Function compute_private_event_commitment
pub fn compute_private_event_commitment<Event>(event: Event, randomness: Field) -> Field
where
Event: EventInterface,
Event: Serialize
pub fn compute_private_event_commitment<Event>(event: Event, randomness: Field) -> Field
where
Event: EventInterface,
Event: Serialize
A private event's commitment is used to validate that an event was indeed emitted.
It requires a
randomnessvalue that must be produced alongside the event in order to perform said validation. This random value prevents attacks in which someone guesses plausible events (e.g. 'Alice transfers to Bob an amount of 10'), since they will not be able to test for existence of their guessed events without brute-forcing the entireFieldspace by guessingrandomnessvalues.