Skip to content

feat(op-interop-filter): POC with full implementation#14

Draft
opsuperchain wants to merge 5 commits intokarlfloersch/interop-filter-basefrom
poc/interop-filter-full
Draft

feat(op-interop-filter): POC with full implementation#14
opsuperchain wants to merge 5 commits intokarlfloersch/interop-filter-basefrom
poc/interop-filter-full

Conversation

@opsuperchain
Copy link
Copy Markdown
Collaborator

Summary

This POC PR consolidates all interop-filter implementation work for easier review:

  • Core Logic: LogsDB-based block ingestion and log validation
  • Admin APIs:
    • admin_getFailsafeEnabled - Query failsafe state
    • admin_setFailsafeEnabled - Manually enable/disable failsafe mode
    • admin_rewind - Truncate LogsDB to recover from reorg-induced stuck states
  • Query API: supervisor_checkAccessList for validating interop executing messages
  • JWT Authentication: Required for admin endpoints when --rpc.enable-admin is used
  • Metrics & Observability: Prometheus metrics for all operations
  • Testing Tools: Spammer and dashboard for overnight testing

Commits

  1. POC with core logic, sysgo integration, and e2e tests
  2. Implement SetFailsafeEnabled admin API
  3. Implement Rewind admin API

Test plan

  • Unit tests pass (go test ./op-interop-filter/...)
  • Build succeeds (go build ./op-interop-filter/...)
  • Manual testing with overnight script
  • Review admin API JWT authentication flow

🤖 Generated with Claude Code

opsuperchain and others added 4 commits December 9, 2025 03:17
…e2e tests

This is a POC branch that combines:
- Base skeleton from karlfloersch/interop-filter-base with JWT validation
- Core logic with LogsDB-based log validation
- Chain ingester with backfill support
- Sysgo integration and presets
- E2e tests

Components:
- ChainIngester: Ingests blocks and logs into LogsDB
- Backend: Coordinates chain ingesters and failsafe state
- QueryFrontend: Exposes supervisor_checkAccessList RPC
- AdminFrontend: Exposes admin_getFailsafeEnabled and Rewind (stub)

Still TODO:
- Implement Rewind (currently stub)
- Implement cross-unsafe calculation
- Implement SetFailsafeEnabled

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

Co-Authored-By: Claude <noreply@anthropic.com>
Adds the ability to manually enable or disable failsafe mode via
the admin RPC. This allows operators to:
- Manually enable failsafe when they detect issues
- Disable failsafe after recovering from a stuck state (e.g., after Rewind)

The state change is logged and reflected in metrics.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Adds the admin_rewind RPC endpoint to allow manual recovery from
reorg-induced stuck states. The implementation:

- Adds Rewind method to ChainIngester that calls LogsDB.Rewind
- Adds Rewind method to Backend that finds the chain and delegates
- Updates AdminFrontend.Rewind to call the backend instead of
  returning an error
- Creates a noopInvalidator to satisfy the reads.Invalidator
  interface required by LogsDB.Rewind

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

Co-Authored-By: Claude <noreply@anthropic.com>
Adds unit tests covering:
- Backend.SetFailsafeEnabled toggle behavior
- Backend.Rewind error handling for unknown chains
- ChainIngester.Rewind error handling when LogsDB is nil
- ChainIngester.Rewind integration test with actual LogsDB

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

Co-Authored-By: Claude <noreply@anthropic.com>
@opsuperchain opsuperchain force-pushed the poc/interop-filter-full branch from 23397ff to 1f191e8 Compare December 9, 2025 03:43
Adds devstack/sysgo integration for the interop filter service:

- Add InteropFilterMatcher type alias to matcher.go
- Add FirstInteropFilter matcher to match/first.go
- Add InteropFilter methods to stack.System and ExtensibleSystem interfaces
- Add interopFilters map and methods to shim/system.go
- Add interopFilter field and hydration to sysgo/orchestrator.go
- Fix sysgo/interop_filter.go to use []string for L2RPCs (matching Config)
- Add DefaultMinimalSystemWithInteropFilter preset

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

Co-Authored-By: Claude <noreply@anthropic.com>
opsuperchain pushed a commit that referenced this pull request Mar 8, 2026
…imism#19281)

* fix(contracts): address audit findings #14, #6, #8, #13, #19

- #14: Reuse existing DelayedWETH from SystemConfig instead of deploying
  a new one in the Migrator, preventing divergence with future upgrades
- #6: Document that hardcoded game type lists in OPCMv2 and Migrator are
  intentional and must be kept in sync when new types are added
- #8: Document that migrate() does not enforce SuperchainConfig version floor
- #13: Document why migration game config validation is deliberately minimal
- #19: Document theoretical risk in AnchorStateRegistry.isGameRegistered
  when ASR proxy is replaced non-atomically

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

* fix(contracts): add cross-reference comment to GameTypes library

Add a notice to the GameTypes library reminding developers to update
the hardcoded game type lists in OPContractsManagerMigrator and
OPContractsManagerV2's _assertValidFullConfig when adding new types.

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

* fix(contracts): bump OPContractsManagerV2 version for rebase

Bump OPContractsManagerV2 from 7.0.9 to 7.0.10 to account for the
comment-only source change (cross-reference note added in prior commit)
that affects the bytecode metadata hash.

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

* fix(contracts): bump OPContractsManagerV2 version to 7.0.11 for semver-diff CI fix

* fix(contracts): apply forge fmt and bump versions for formatting changes

forge fmt changed OPContractsManager, FaultDisputeGame, SuperFaultDisputeGame,
and several other files. Bump patch versions for the contracts with hash changes,
and regenerate semver-lock and snapshots.

- OPContractsManager: 6.0.3 -> 6.0.4
- FaultDisputeGame: 2.4.0 -> 2.4.1
- SuperFaultDisputeGame: 0.7.0 -> 0.7.1

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

---------

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