ethereum-optimism / optimistic-specs

Optimistic: Bedrock, is a protocol that strives to be an extremely simple optimistic rollup that maintains 1:1 compatibility with Ethereum
MIT License
167 stars 35 forks source link

Adopt go.work, rename modules to prep for monorepo #441

Closed mslipper closed 2 years ago

mslipper commented 2 years ago

Replaces #414 after following @protolambda's instructions.

trianglesphere commented 2 years ago

Was seeing withdrawals test failing - seems like it was not using an up to date version of our geth client Edit - seems like this got fixed

codecov-commenter commented 2 years ago

Codecov Report

Merging #441 (8c1ee9d) into main (92fccc2) will not change coverage. The diff coverage is 20.00%.

@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   51.50%   51.50%           
=======================================
  Files          70       70           
  Lines        7582     7582           
=======================================
  Hits         3905     3905           
  Misses       3154     3154           
  Partials      523      523           
Flag Coverage Δ
unittests 51.50% <20.00%> (?)

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

Impacted Files Coverage Δ
op-batcher/cmd/main.go 0.00% <0.00%> (ø)
op-batcher/config.go 0.00% <ø> (ø)
op-batcher/db/history_db.go 72.72% <ø> (ø)
op-batcher/flags/flags.go 100.00% <ø> (ø)
op-batcher/sequencer/driver.go 75.00% <ø> (ø)
op-e2e/geth.go 65.07% <ø> (ø)
op-e2e/setup.go 72.88% <ø> (ø)
op-e2e/tracer.go 66.66% <ø> (ø)
op-node/backoff/operation.go 88.88% <ø> (ø)
op-node/backoff/strategies.go 86.36% <ø> (ø)
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 92fccc2...8c1ee9d. Read the comment docs.

protolambda commented 2 years ago

@trianglesphere The way it's supposed to work with go.work is that each go.mod references the other modules in the workspace by version (and we can version them independently), thus essentially we are able to freeze what each module builds with independently. But since it's not in the main branch, and not even in the correct repo yet, we need all those replace statements for Go to resolve where the module is coming from. Once the module can be resolved we can get rid of the replace statements. The go.work will then still bundle them together for cross-module editing, and in dockerfiles we make use of a slimmed down go.work with the modules involved in the docker build. This is one of the reasons why I dislike the feature-branch: it will force us to keep those replace statements around for longer, as the modules can't be resolved nicely.

protolambda commented 2 years ago

And regarding the replace statements: