[go: up one dir, main page]

Rollup node: fix RPC /global/monitor_finalized_blocks

What

This change fixes an issue in the /global/monitor_finalized_blocks streaming RPC endpoint of the rollup node.

Why

The RPC was not functioning correctly when the rollup node was started with the --l1-finalized-blocks option. This was caused by a logic error where the system would attempt to notify about a new finalized block before the block itself was saved. As a result, the notification was never sent, and the stream remained empty.

How

The fix is straightforward. The order of operations in the process_unseen_head function in src/lib_smart_rollup_node/rollup_node_daemon.ml has been corrected. The call to Node_context.save_l2_block is now performed before the logic that sets the block as finalized and triggers the notification. This ensures that the block is present in the context before any notification is triggered, resolving the issue.

Merge request reports

Loading