Trace recorder that validates event types/reasons and applies the diagnostic hook (SPEC 12.1-12.3).
Create a TraceRecorder stamped with the contract version.
Emit a validated trace event, applying the diagnostic hook when present.
Return the collected events as an ExecutionTrace.
Trace recorder that validates event types/reasons and applies the diagnostic hook (SPEC 12.1-12.3).