Skip to content

op-supervisor: dependency-set config#12450

Merged
axelKingsley merged 3 commits intodevelopfrom
interop-dependency-set
Oct 15, 2024
Merged

op-supervisor: dependency-set config#12450
axelKingsley merged 3 commits intodevelopfrom
interop-dependency-set

Conversation

@protolambda
Copy link
Contributor

Description

Depends on #12427

Introduces depset package:

  • DependencySetSource: to define how the below configuration can be sourced.
  • DependenySet: to define what chain can execute and initiate at what time.
  • StaticConfigDependencySet: to define the set as a static map of chains.
  • JsonDependencySetLoader: to define the set as the above static map, loaded from a json file.

We may introduce more dynamic dependency sets, but this is sufficient for testing / devnets for now.

The idea is that a set could sync in the background, and return errors on timestamp queries that it hasn't synced yet.

The op-supervisor CLI flags have been extended with a --dependency-set to point to a JSON file that the set can then be loaded from.

Tests

  • Unit test of the json loading
  • Above unit test also checks if the dependency set checks work
  • Updated supervisor CLI tests
  • Static dependency set is used in the e2e tests

Additional context

In a follow-up we should add dependency-set chain-ID iteration or something, so we can initialize the right services, before a chain-monitor is known.

@protolambda protolambda requested review from a team as code owners October 14, 2024 21:07
@semgrep-app
Copy link
Contributor

semgrep-app bot commented Oct 14, 2024

Semgrep found 3 sol-style-require-reason findings:

require() must include a reason string

Ignore this finding from sol-style-require-reason.

Semgrep found 2 golang_fmt_errorf_no_params findings:

No fmt.Errorf invocations without fmt arguments allowed

Ignore this finding from golang_fmt_errorf_no_params.

@protolambda protolambda added this to the Interop: Devnet 1 milestone Oct 14, 2024
@semgrep-app
Copy link
Contributor

semgrep-app bot commented Oct 15, 2024

Semgrep found 15 err-todo findings:

TODO in error handling code

Ignore this finding from err-todo.

@protolambda protolambda force-pushed the interop-dependency-set branch from 962730f to e7fb182 Compare October 15, 2024 19:41
Base automatically changed from interop-cleanup to develop October 15, 2024 22:53
@axelKingsley
Copy link
Contributor

This code was reviewed synchronously with @axelKingsley , @tyler-smith and @protolambda

@axelKingsley axelKingsley added this pull request to the merge queue Oct 15, 2024
Merged via the queue into develop with commit 59ba5f3 Oct 15, 2024
@axelKingsley axelKingsley deleted the interop-dependency-set branch October 15, 2024 23:33
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* op-supervisor: cleanup, refactor to take local-safe info from op-node

* op-supervisor: dependency-set config

---------

Co-authored-by: axelKingsley <axel.kingsley@gmail.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.

2 participants