Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-program: Introduce basic infrastructure for fault proof program #5297

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Mar 30, 2023

Description

Sets up the basic infrastructure for the fault proof program.

  • Build, test & lint added to Makefile
  • Tests and linting are run in CI
  • Program parses CLI arguments and supports configuring logging and the rollup network
  • Currently just prints the rollup network config and exits.

Tests

Modified the pattern we use for program init a bit so that we can write unit tests for CLI args. It introduces a little more complexity in the main.go file, but in return we can actually test the CLI args and there's a clear programmatic API to start the program given just a log and config instance.

Invariants

For changes to critical code paths, please list and describe the invariants or key security properties of your new or changed code.

Fixes https://linear.app/optimism/issue/CLI-3738/fault-proof-program-infrastructure

@ajsutton ajsutton requested a review from a team as a code owner March 30, 2023 10:17
@ajsutton ajsutton requested a review from zhwrd March 30, 2023 10:17
@changeset-bot
Copy link

changeset-bot bot commented Mar 30, 2023

⚠️ No Changeset found

Latest commit: 0cbb5ab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Mar 30, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 0cbb5ab
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/6427567a1067470008b4ce5b

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Merging #5297 (31e2553) into develop (0ac4814) will increase coverage by 0.44%.
The diff coverage is 82.95%.

❗ Current head 31e2553 differs from pull request most recent head 27e814e. Consider uploading reports for the commit 27e814e to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5297      +/-   ##
===========================================
+ Coverage    39.90%   40.34%   +0.44%     
===========================================
  Files          382      385       +3     
  Lines        24376    24464      +88     
  Branches       838      838              
===========================================
+ Hits          9727     9871     +144     
+ Misses       13916    13853      -63     
- Partials       733      740       +7     
Flag Coverage Δ
bedrock-go-tests 36.73% <82.95%> (+0.56%) ⬆️
common-ts-tests 26.82% <ø> (ø)
contracts-bedrock-tests 51.32% <ø> (ø)
contracts-tests 98.86% <ø> (ø)
core-utils-tests 60.41% <ø> (ø)
dtl-tests 47.15% <ø> (ø)
fault-detector-tests 33.88% <ø> (ø)
sdk-tests 38.86% <ø> (ø)

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

Impacted Files Coverage Δ
op-program/cmd/main.go 71.15% <71.15%> (ø)
op-program/config/config.go 100.00% <100.00%> (ø)
op-program/flags/flags.go 100.00% <100.00%> (ø)

... and 6 files with indirect coverage changes

Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice project setup! op-program is good for now, we can rename it later if desired. op-node is still op-node though, that name stuck 😅

Just a nit about license year + reviewers configuration

op-program/LICENSE Outdated Show resolved Hide resolved
.github/CODEOWNERS Show resolved Hide resolved
op-program/README.md Outdated Show resolved Hide resolved
op-program/cmd/main.go Show resolved Hide resolved
Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. CI just looks flaky right now

@trianglesphere
Copy link
Contributor

@ajsutton needs a rebase to fix CI

@mergify mergify bot merged commit f68fe55 into develop Mar 31, 2023
@mergify mergify bot deleted the aj/op-program branch March 31, 2023 22:14
@mergify
Copy link
Contributor

mergify bot commented Mar 31, 2023

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented Mar 31, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify mergify bot removed the on-merge-train label Mar 31, 2023
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.

3 participants