Skip to content

feat(op-interop-filter): add core logic and unit tests [2/4]#9

Open
opsuperchain wants to merge 6 commits intofeat/interop-filter-skeletonfrom
feat/interop-filter-logic
Open

feat(op-interop-filter): add core logic and unit tests [2/4]#9
opsuperchain wants to merge 6 commits intofeat/interop-filter-skeletonfrom
feat/interop-filter-logic

Conversation

@opsuperchain
Copy link
Copy Markdown
Collaborator

Summary

This is PR 2 of 4 for the op-interop-filter service.

This PR adds the full implementation:

  • Backend: ChainIngester management, failsafe handling, CheckAccessList validation
  • ChainIngester: Block polling, LogsDB management, backfill, reorg detection
  • Unit tests: Tests for failsafe, ready state, unknown chain handling
  • Dashboard tool: TUI for viewing filter and spammer metrics
  • Spammer tool: Validation testing with real chain data
  • Overnight test script: Multi-chain testing automation

The filter is now fully functional and can be used with op-geth for transaction filtering.

Stack

This PR is part of a stacked PR series:

  • [1/4] Skeleton & flags
  • [2/4] Core logic and unit tests ← this PR
  • [3/4] Sysgo integration and preset
  • [4/4] Sysgo e2e tests

Test plan

  • go build ./op-interop-filter/...
  • go test ./op-interop-filter/...
  • Manual testing with ./scripts/run-overnight.sh

🤖 Generated with Claude Code

@opsuperchain opsuperchain force-pushed the feat/interop-filter-logic branch from 6f6b9ec to 60b0a5f Compare November 27, 2025 00:51
@opsuperchain opsuperchain force-pushed the feat/interop-filter-skeleton branch 4 times, most recently from aafc0e1 to 473d52e Compare November 27, 2025 05:26
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>
@opsuperchain opsuperchain force-pushed the feat/interop-filter-skeleton branch from 473d52e to 381bb87 Compare November 27, 2025 05:31
opsuperchain and others added 4 commits November 27, 2025 05:58
…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>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This PR adds the full implementation of op-interop-filter:

- Backend with ChainIngester management, failsafe handling, and CheckAccessList
- ChainIngester for block polling, LogsDB management, backfill, and reorg detection
- Unit tests for Backend (failsafe, ready state, unknown chain handling)
- Dashboard tool for viewing filter and spammer metrics
- Spammer tool for validation testing with real chain data
- Overnight test script for multi-chain testing

The filter is now fully functional and can be used with op-geth for
transaction filtering.

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Query chain ID from RPC instead of expecting L2RPC struct
- Add chain-specific metrics: reorg, ready, backfill progress
- Add LogsDB metrics: first block, blocks sealed, logs added, entries

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

Co-Authored-By: Claude <noreply@anthropic.com>
@opsuperchain opsuperchain force-pushed the feat/interop-filter-logic branch from 60b0a5f to 7f93ad9 Compare November 27, 2025 06:24
- Fix unused procName variable (ineffassign)
- Fix unchecked error returns (errcheck)
- Fix goimports formatting
- Handle "skipped data" errors in spammer (retry instead of fail)
- Add --rpc.enable-admin to overnight script
- Update --l2-rpcs format to use StringSliceFlag

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

Co-Authored-By: Claude <noreply@anthropic.com>
@opsuperchain opsuperchain force-pushed the feat/interop-filter-skeleton branch 5 times, most recently from 6cc4e24 to c2be9c5 Compare December 2, 2025 16:41
karlfloersch pushed a commit that referenced this pull request Mar 5, 2026
…thereum-optimism#19272)

* contracts: implement audit code fixes and add tests

Add onlyDelegateCall enforcement to upgradeSuperchain, upgrade, and
migrate functions (#17). Include msg.sender in deploy salt to prevent
cross-caller CREATE2 collisions (#17). Add duplicate instruction key
detection in upgrade validation (#9). Validate startingRespectedGameType
against enabled game configs (#10). Add code-existence check in
loadBytes (#18). Add setUp guard to VerifyOPCM.runSingle (#4). Remove
unused _findChar function (#5). Pass real AddressManager in migrator
proxy deploy args (#11). Add tests covering all audit fix behaviors.

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

* contracts: regenerate semver-lock.json for OPContractsManagerV2

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

* contracts: bump OPContractsManagerV2 version to 7.0.10

Semver-diff requires a patch version bump when bytecode changes.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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