Skip to content

fix: only trigger reorg on actual conflicts, not generic errors#18

Closed
opsuperchain wants to merge 1 commit intokarlfloersch/catchup-refactorfrom
karlfloersch/fix-reorg-trigger
Closed

fix: only trigger reorg on actual conflicts, not generic errors#18
opsuperchain wants to merge 1 commit intokarlfloersch/catchup-refactorfrom
karlfloersch/fix-reorg-trigger

Conversation

@opsuperchain
Copy link
Copy Markdown
Collaborator

Summary

Previously, any backfill error (including RPC failures) would trigger the failsafe reorg callback. This was incorrect because transient errors like network timeouts are not reorgs.

Changes

Reorg detection now only happens on actual conflicts:

  • Parent hash mismatch in ingestBlock (line 536-543)
  • ErrConflict in processBlockLogs (lines 608-610, 620-622)

Generic errors like RPC failures just return the error without triggering failsafe.

Test plan

  • All existing tests pass

🤖 Generated with Claude Code

Previously, any backfill error (including RPC failures) would trigger
the failsafe reorg callback. This was incorrect because transient
errors like network timeouts are not reorgs.

Reorg detection now only happens on actual conflicts:
- Parent hash mismatch in ingestBlock (line 536-543)
- ErrConflict in processBlockLogs (lines 608-610, 620-622)

Generic errors like RPC failures just return the error without
triggering failsafe.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@opsuperchain opsuperchain deleted the branch karlfloersch/catchup-refactor January 8, 2026 20:37
@opsuperchain opsuperchain deleted the karlfloersch/fix-reorg-trigger branch January 8, 2026 20:37
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