Skip to content

Leftover debug diagnostics in bridge/peg.rs perform extra storage reads #389

Open

Description

@SDL-A1

From the external review of #374. Verified here.

crates/execution/src/bridge/peg.rs from ~5116, inside the None arm of the
waiting-for-signatures lookup:

// Temporary diagnostics for the #272,850 pipeline debug: show how
// far the peg-out pipeline progressed when the lookup misses.

followed by several extra Bridge storage reads (bridge_load_bytes plus
deserialisation of the release queue and the pegouts-waiting-for-confirmations
set) that exist only to build a log line.

The comment says "temporary" and names a specific debugging session, so this is
leftover scaffolding rather than intended behaviour.

Impact

Small but not zero: the reads run on a Bridge path, each one touches trie
storage, and they execute whenever the lookup misses — not only when the log
level would emit them.

What would settle it

Delete the block. If the diagnostics are worth keeping, gate them behind a
tracing::enabled! check so the reads do not happen when the log is off.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions