Skip to content

Conversation

@phrwlk
Copy link

@phrwlk phrwlk commented Dec 29, 2025

Motivation

The L1->L2 messages monitor widget was calling get_pending_l1_messages once per row when computing L1ToL2MessageStatus::for_tx, both for existing items and for each new log. This resulted in many redundant eth_call requests to the CommonBridge contract on every tick. The watcher code already uses a snapshot pattern instead, fetching the pending L1 transaction hashes once and reusing them for contains checks.

Description

This change aligns the widget with that pattern by fetching pending hashes once per tick in on_tick and passing a slice into for_tx_with_pending, refresh_items and process_logs, preserving semantics while significantly reducing RPC load.

@phrwlk phrwlk changed the title fix: cache pending L1 messages in L1->L2 monitor widget fix(l2): cache pending L1 messages in L1->L2 monitor widget Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant