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

op-bindings: separate bindings into new module to resolve dependency cycle #446

Closed protolambda closed 2 years ago

protolambda commented 2 years ago

Separate the contract bindings into a new go module.

This fixes a cyclic dependency where op-node would import bindings from op-proposer, while op-proposer imports types from op-node.

This also simplifies the build system nicely: there's one place and one makefile to use when contracts change.

Edit: also did some go mod tidying: the geth version we pull in with the replace is v1.10.17+ already, but the require was still on 1.10.16

Since the bindings are all generated code I did not include this new module in the coverage reporting CI. (And we don't use all of the bindings anyway)

codecov-commenter commented 2 years ago

Codecov Report

Merging #446 (60166e6) into main (8cbaf02) will decrease coverage by 0.30%. The diff coverage is n/a.

:exclamation: Current head 60166e6 differs from pull request most recent head 82b5107. Consider uploading reports for the commit 82b5107 to get more accurate results

@@            Coverage Diff             @@
##             main     #446      +/-   ##
==========================================
- Coverage   52.59%   52.28%   -0.31%     
==========================================
  Files          70       70              
  Lines        7855     7855              
==========================================
- Hits         4131     4107      -24     
- Misses       3176     3197      +21     
- Partials      548      551       +3     
Flag Coverage Δ
unittests 52.28% <ø> (-0.31%) :arrow_down:

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

Impacted Files Coverage Δ
op-bindings/deposit/deposit_feed_raw.go 11.40% <ø> (ø)
op-bindings/l1block/l1_block_info_raw.go 28.27% <ø> (ø)
op-bindings/l2oo/l2_output_oracle.go 8.60% <ø> (ø)
op-bindings/withdrawer/withdrawer_raw.go 4.18% <ø> (ø)
op-e2e/setup.go 72.88% <ø> (ø)
op-node/withdrawals/utils.go 59.23% <ø> (ø)
op-proposer/drivers/l2output/driver.go 65.19% <ø> (ø)
op-node/testlog/testlog.go 58.46% <0.00%> (-18.47%) :arrow_down:
op-node/node/api.go 59.25% <0.00%> (-4.45%) :arrow_down:
op-proposer/service.go 90.78% <0.00%> (-3.95%) :arrow_down:
... and 5 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 8cbaf02...82b5107. Read the comment docs.