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: Extract block processing logic from engine api #5350

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Apr 5, 2023

Description

Make the block processing logic easier to follow and reusable by extracting it from the engine api. Besides its current usage to create blocks in the engine api it will be used to import blocks in the oracle based engine backend. Only real difference between creating and importing blocks is that when importing you commit the changes to the DB and a couple of extra verifications that the output roots all match.

Tests

Mostly covered by existing tests since this is just rearranging existing functionality but added a couple around verifying the gas limit wasn't changed too much.

Metadata

@ajsutton ajsutton requested a review from a team as a code owner April 5, 2023 05:50
@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2023

⚠️ No Changeset found

Latest commit: 08f7670

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 Apr 5, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 08f7670
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/642debdf3f96c50008ea9e9a

@ajsutton ajsutton force-pushed the aj/extract-block-processor branch 2 times, most recently from f1e835b to 4d6c60b Compare April 5, 2023 07:37
@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #5350 (08f7670) into develop (18747f1) will decrease coverage by 3.46%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5350      +/-   ##
===========================================
- Coverage    38.67%   35.21%   -3.46%     
===========================================
  Files          339      239     -100     
  Lines        25376    21836    -3540     
  Branches       659        0     -659     
===========================================
- Hits          9814     7690    -2124     
+ Misses       14818    13400    -1418     
- Partials       744      746       +2     
Flag Coverage Δ
bedrock-go-tests 35.21% <0.00%> (-0.27%) ⬇️
common-ts-tests ?
contracts-tests ?
core-utils-tests ?
dtl-tests ?
fault-detector-tests ?
sdk-tests ?

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

Impacted Files Coverage Δ
op-program/l2/engineapi/block_processor.go 0.00% <0.00%> (ø)
op-program/l2/engineapi/l2_engine_api.go 0.00% <0.00%> (ø)
...p-program/l2/engineapi/test/l2_engine_api_tests.go 0.00% <0.00%> (ø)

... and 103 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 refactor. One nit about RemainingBlockGas()

op-program/l2/engineapi/l2_engine_api.go Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Apr 5, 2023

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

@ajsutton ajsutton merged commit 4a56fb5 into develop Apr 6, 2023
@ajsutton ajsutton deleted the aj/extract-block-processor branch April 6, 2023 00:19
@mergify mergify bot removed the on-merge-train label Apr 6, 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.

2 participants