Skip to content

Commit 46728f9

Browse files
kjcamannjhunsaker
authored andcommitted
[event] explicitly clear flow info that doesn't apply
Poorly written clients might try to unconditionally read these for event types they don't apply to, so always clear them. For an explanation of what these are, see: > https://docs.monad.xyz/execution-events/event-ring#flow-tags-the-content_ext-fields-in-execution-event-rings
1 parent e884cab commit 46728f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

category/execution/ethereum/event/exec_event_recorder.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ inline void ExecutionEventRecorder::record_block_marker_event(
290290
monad_event_recorder_reserve(&exec_recorder_, 0, &seqno, &payload_buf);
291291
event->event_type = std::to_underlying(event_type);
292292
event->content_ext[MONAD_FLOW_BLOCK_SEQNO] = cur_block_start_seqno_;
293+
event->content_ext[MONAD_FLOW_TXN_ID] = 0;
294+
event->content_ext[MONAD_FLOW_ACCOUNT_INDEX] = 0;
293295
monad_event_recorder_commit(event, seqno);
294296
}
295297

@@ -303,6 +305,7 @@ inline void ExecutionEventRecorder::record_txn_marker_event(
303305
event->event_type = std::to_underlying(event_type);
304306
event->content_ext[MONAD_FLOW_BLOCK_SEQNO] = cur_block_start_seqno_;
305307
event->content_ext[MONAD_FLOW_TXN_ID] = txn_num + 1;
308+
event->content_ext[MONAD_FLOW_ACCOUNT_INDEX] = 0;
306309
monad_event_recorder_commit(event, seqno);
307310
}
308311

0 commit comments

Comments
 (0)