Skip to content

op-proposer: Support multiple supervisor endpoints#14401

Merged
ajsutton merged 3 commits intodevelopfrom
aj/multi-supervisor
Feb 21, 2025
Merged

op-proposer: Support multiple supervisor endpoints#14401
ajsutton merged 3 commits intodevelopfrom
aj/multi-supervisor

Conversation

@ajsutton
Copy link
Copy Markdown
Contributor

Description

Adds support for multiple supervisor endpoints to op-proposer. The selection algorithm is quite basic:
For SyncStatus, the supervisor with the lowest MinSyncedL1 is used, ignoring any that are offline. This ensures that the wait for sync option waits for all source nodes to be in sync. The sync status response is also used to select the block proposals are taken from, so this ensures that even if a different source node is used to retrieve the proposal, it will still be a finalized block even if the node is slightly behind.

For retrieving proposals, the nodes are simply tried in turn.

The main downside of this approach is that if one of the source nodes is lagging well behind, it will cause proposals to be more stale, but it is safer if nodes are going offline temporarily. With other approaches the sync status may come from one node and the proposal from another, causing it to return data that is later reorged even if the sync status (from a different node) indicated the data was finalized. Making SyncStatus return the lowest value avoids this risk as all nodes have reached the required safety level for the data requested for the proposal.

Builds on #14400

Tests

Added unit tests.

Metadata

Fixes #13909

@ajsutton ajsutton requested review from a team as code owners February 18, 2025 00:22
@ajsutton ajsutton requested review from sebastianst and removed request for a team February 18, 2025 00:22
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 77.14286% with 16 lines in your changes missing coverage. Please review.

Project coverage is 41.84%. Comparing base (d2c1ac3) to head (cb197c5).
Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
op-proposer/proposer/service.go 0.00% 10 Missing ⚠️
op-proposer/proposer/source/source_supervisor.go 91.22% 4 Missing and 1 partial ⚠️
op-proposer/proposer/config.go 66.66% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (d2c1ac3) and HEAD (cb197c5). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (d2c1ac3) HEAD (cb197c5)
cannon-go-tests-32 2 0
cannon-go-tests-64 2 0
2 1
contracts-bedrock-tests 2 0
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #14401       +/-   ##
============================================
- Coverage    77.23%   41.84%   -35.40%     
============================================
  Files          178      847      +669     
  Lines        10667    77902    +67235     
============================================
+ Hits          8239    32598    +24359     
- Misses        2247    42439    +40192     
- Partials       181     2865     +2684     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
op-proposer/flags/flags.go 62.50% <ø> (ø)
op-proposer/proposer/config.go 24.56% <66.66%> (ø)
op-proposer/proposer/source/source_supervisor.go 90.76% <91.22%> (ø)
op-proposer/proposer/service.go 0.00% <0.00%> (ø)

... and 1013 files with indirect coverage changes

@ajsutton ajsutton force-pushed the aj/proposer-supervisor branch from 92192ca to 4abf4c0 Compare February 19, 2025 02:54
@ajsutton ajsutton requested a review from a team as a code owner February 19, 2025 02:54
@ajsutton ajsutton requested review from protolambda and removed request for a team February 19, 2025 02:54
@ajsutton ajsutton force-pushed the aj/multi-supervisor branch from 9c9b6cb to d857cd1 Compare February 19, 2025 03:09
Base automatically changed from aj/proposer-supervisor to develop February 19, 2025 03:13
@ajsutton ajsutton force-pushed the aj/multi-supervisor branch from d857cd1 to 7795db4 Compare February 19, 2025 21:03
@ajsutton ajsutton enabled auto-merge February 21, 2025 03:04
@ajsutton ajsutton added this pull request to the merge queue Feb 21, 2025
Merged via the queue into develop with commit da3be71 Feb 21, 2025
46 checks passed
@ajsutton ajsutton deleted the aj/multi-supervisor branch February 21, 2025 03:18
Rjected pushed a commit to paradigmxyz/optimism that referenced this pull request Feb 25, 2025
…#14401)

* op-proposer: Support multiple supervisor endpoints.

* op-proposer: Use a string slice flag.

* op-proposer: Rename supervisor rpc flag to be plural.
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.

op-proposer: Update op-proposer to propose superroots when the game type is set to the interop game type.

2 participants