Skip to content

op-interop-filter: Service skeleton with flags and metrics#18456

Merged
karlfloersch merged 6 commits intodevelopfrom
karlfloersch/interop-filter-base
Dec 11, 2025
Merged

op-interop-filter: Service skeleton with flags and metrics#18456
karlfloersch merged 6 commits intodevelopfrom
karlfloersch/interop-filter-base

Conversation

@karlfloersch
Copy link
Copy Markdown
Contributor


Description

Adds the op-interop-filter service skeleton:

  1. CLI flags with StringSliceFlag for --l2-rpcs (chain ID queried from RPC)
  2. Service lifecycle (start/stop) following op-service patterns
  3. RPC server with supervisor namespace for checkAccessList
  4. Metrics with doc subcommand for documentation
  5. Stub backend (actual logic in follow-up PR)

This service validates interop executing messages for op-geth/op-reth transaction filtering. Any reorg triggers failsafe which disables all interop transactions.

Tests

Unit tests will be added in the follow-up logic PR. This skeleton PR focuses on service structure.

@wiz-inc-a178a98b5d
Copy link
Copy Markdown

wiz-inc-a178a98b5d Bot commented Dec 1, 2025

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 Low
SAST Finding SAST Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@karlfloersch karlfloersch marked this pull request as ready for review December 1, 2025 19:18
@karlfloersch karlfloersch requested review from a team and pauldowman December 1, 2025 19:18
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.01%. Comparing base (c2ffd4f) to head (3507551).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #18456      +/-   ##
===========================================
+ Coverage    75.31%   76.01%   +0.70%     
===========================================
  Files          187      132      -55     
  Lines        11199     7168    -4031     
===========================================
- Hits          8434     5449    -2985     
+ Misses        2621     1719     -902     
+ Partials       144        0     -144     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 76.01% <ø> (-4.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 64 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcw109550 pcw109550 removed the request for review from pauldowman December 2, 2025 12:57
Comment thread op-interop-filter/.gitignore Outdated
Comment thread op-interop-filter/cmd/main.go Outdated
Comment thread op-interop-filter/README.md
Comment thread op-interop-filter/filter/frontend.go Outdated
Comment thread op-interop-filter/filter/frontend.go Outdated
Comment thread op-interop-filter/filter/frontend.go
Comment thread op-interop-filter/filter/service.go
@karlfloersch karlfloersch force-pushed the karlfloersch/interop-filter-base branch from 9e5619b to c602e80 Compare December 2, 2025 17:56
Comment thread op-interop-filter/filter/service.go
Comment thread op-interop-filter/filter/service.go
@karlfloersch karlfloersch force-pushed the karlfloersch/interop-filter-base branch from e1df86c to b13c52b Compare December 9, 2025 03:05
opsuperchain and others added 6 commits December 11, 2025 10:04
* feat(op-interop-filter): add service skeleton

Add op-interop-filter service scaffolding:

**Core structure:**
- flags/flags.go: CLI flag definitions with L2 RPC parsing
- flags/flags_test.go: Unit tests for flag parsing
- filter/config.go: Configuration struct and parsing
- filter/service.go: Service lifecycle management
- filter/frontend.go: RPC handlers (supervisor and admin)
- filter/backend.go: Stub backend (returns ErrUninitialized)
- metrics/metrics.go: Prometheus metrics interface and implementation
- cmd/main.go: Application entry point

**Build infrastructure:**
- justfile and Makefile for building
- docker-bake.hcl target
- Dockerfile builder and target stages
- Dockerfile.dockerignore allowlist entry

The service compiles and starts but CheckAccessList returns
ErrUninitialized until the actual implementation is added.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(op-interop-filter): align with op-faucet and op-interop-mon patterns

- Change --l2-rpcs to StringSliceFlag (query chain ID from RPC)
- Remove custom ParseL2RPCs parsing and tests
- Add doc subcommand for metrics documentation
- Add Document() method to metrics
- Fix NewMetrics() to take procName parameter
- Remove Required: true from flag (use CheckRequired only)
- Use "message" key in log.Crit for consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(op-interop-filter): use v0.0.0 version to match other services

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: opsuperchain <opsuperchain@slop.bot>
Co-authored-by: Claude <noreply@anthropic.com>
…fix JWT auth

* op-interop-filter: Address PR review comments

- Remove comment from .gitignore
- Remove 'op-geth' from app description to be client-agnostic
- Simplify CheckAccessList error handling to match op-supervisor
- Update SetFailsafeEnabled to indicate pending implementation
- Add JWT secret flag and wire up authentication for admin RPC

* op-interop-filter: Add Rewind admin RPC stub

Adds Rewind method to AdminFrontend as a stub for future implementation.
This will allow operators to recover from reorg-induced stuck states
via manual intervention.
- Fix ObtainJWTSecret to always generate if file is empty (use true)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add validation in Config.Check() to ensure a JWT secret path is
configured when the admin RPC is enabled. This prevents exposing
admin functionality without proper authentication.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@karlfloersch karlfloersch force-pushed the karlfloersch/interop-filter-base branch from f96a0ac to 42201a2 Compare December 11, 2025 15:04
@karlfloersch karlfloersch added this pull request to the merge queue Dec 11, 2025
Merged via the queue into develop with commit 8b6bcfa Dec 11, 2025
84 of 86 checks passed
@karlfloersch karlfloersch deleted the karlfloersch/interop-filter-base branch December 11, 2025 15:39
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.

3 participants