Skip to content

Conversation

@refcell
Copy link
Contributor

@refcell refcell commented Jan 11, 2024

Description

Introduces a minimal reproducible absolute prestate build using a custom dockerfile with explicit versioned dependencies.

  • golang 1.21.3
  • alpine 3.18

This dockerfile can be run using the added top-level makefile target reproducible-prestate.

The cannon docs in cannon/README.md are updated to use this target to generate the absolute prestate and op-program binary passed into cannon.

This PR does NOT add the reproducible absolute prestate build to ci, which still uses the make cannon-prestate makefile target.

Metadata

Fixes https://github.com/ethereum-optimism/client-pod/issues/442

@refcell refcell requested a review from a team as a code owner January 11, 2024 21:07
@refcell refcell requested a review from Inphi January 11, 2024 21:07
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 11, 2024

Walkthrough

The project has undergone significant updates to enhance reproducibility and verification processes. Changes include the introduction of Docker with buildkit for generating reproducible builds, a multi-stage Dockerfile for the Go application, adjustments to the CI workflow to include prestate validation, and Makefile targets for building and verifying the op-program and its MIPS architecture binary. This streamlines the build process and ensures the integrity of the build outputs.

Changes

File(s) Summary of Changes
cannon/README.md Updated usage instructions to require Docker with buildkit for generating reproducible prestate; removed old MIPS binary transformation command; added instructions for running the cannon emulator with example inputs.
op-program/Dockerfile.repro Introduced a multi-stage build process for the Go application, incorporating dependency caching and cross-compilation for various architectures.
.circleci/config.yml Added a validate-absolute-prestate job to the CI workflow for prestate validation.
op-program/Makefile Added targets for creating a reproducible Docker image and validating the MIPS architecture binary of the op-program.
op-program/README.md Documented the new process for generating and verifying the absolute prestate using Docker and Makefile targets.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@refcell
Copy link
Contributor Author

refcell commented Jan 11, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@refcell refcell self-assigned this Jan 11, 2024
@refcell refcell added C-feature Category: features A-cannon Area: cannon A-op-program Area: op-program labels Jan 11, 2024
@refcell
Copy link
Contributor Author

refcell commented Jan 11, 2024

#8885 should be updated to use this method for CI

@codecov
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9095458) 34.70% compared to head (0f580da) 63.48%.
Report is 3 commits behind head on develop.

❗ Current head 0f580da differs from pull request most recent head 0affacb. Consider uploading reports for the commit 0affacb to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #8957       +/-   ##
============================================
+ Coverage    34.70%   63.48%   +28.78%     
============================================
  Files          165       16      -149     
  Lines         7123     1427     -5696     
  Branches      1208        0     -1208     
============================================
- Hits          2472      906     -1566     
+ Misses        4499      475     -4024     
+ Partials       152       46      -106     
Flag Coverage Δ
cannon-go-tests 63.48% <ø> (ø)
chain-mon-tests ?
common-ts-tests ?
contracts-bedrock-tests ?
contracts-ts-tests ?
core-utils-tests ?
sdk-next-tests ?
sdk-tests ?

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

see 149 files with indirect coverage changes

@refcell refcell requested a review from a team as a code owner January 11, 2024 22:49
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

Looks good and works well. I'd just simplify the doc changes to minimise the risk of it getting out of sync.

@refcell refcell requested a review from ajsutton January 12, 2024 02:19
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

@refcell refcell added this pull request to the merge queue Jan 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 12, 2024
@refcell refcell added this pull request to the merge queue Jan 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 12, 2024
@refcell refcell added this pull request to the merge queue Jan 12, 2024
Merged via the queue into develop with commit c7bd8fa Jan 12, 2024
@refcell refcell deleted the refcell/single-reproducible-docker-containr branch January 12, 2024 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cannon Area: cannon A-op-program Area: op-program C-feature Category: features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants