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

Client: Refactor Engine API #3291

Merged
merged 20 commits into from
Feb 21, 2024
Merged

Client: Refactor Engine API #3291

merged 20 commits into from
Feb 21, 2024

Conversation

holgerd77
Copy link
Member

@holgerd77 holgerd77 commented Feb 21, 2024

The Engine API has grown like crazy over the last months and years and our single engine.ts file doesn't hold all the code any more.

This is a much needed basic structural refactoring, putting things into its own files, adding (some) additional code docs and generally making the overloaded engine.ts file leaner and better readable again.

Still WIP, will push some additional clean-ups, likely ready for review at the end of the day though.

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: 81 lines in your changes are missing coverage. Please review.

Comparison is base (9994875) 87.93% compared to head (eea0ceb) 86.90%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.34% <ø> (ø)
blockchain 91.61% <ø> (ø)
client 84.67% <89.27%> (?)
common 98.25% <ø> (ø)
devp2p 82.12% <ø> (ø)
ethash ∅ <ø> (∅)
evm 74.33% <ø> (ø)
genesis 99.98% <ø> (ø)
rlp ∅ <ø> (?)
statemanager 77.02% <ø> (ø)
trie 89.25% <ø> (-0.04%) ⬇️
tx 95.45% <ø> (ø)
util 89.13% <ø> (ø)
vm 80.20% <ø> (ø)
wallet 88.35% <ø> (ø)

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

Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm

@holgerd77 holgerd77 merged commit e1221c9 into master Feb 21, 2024
46 checks passed
@holgerd77 holgerd77 deleted the refactor-engine-api branch February 21, 2024 16:20
@@ -0,0 +1,159 @@
import { Block } from '@ethereumjs/block'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we rename this file to something like blockchainHelpers or something? generic seems to communicate to me that this is something to with type generics (aka something like function<T>(arg1, arg2))

@@ -0,0 +1,14 @@
import { bytesToHex } from '@ethereumjs/util'
Copy link
Contributor

Choose a reason for hiding this comment

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

Any objection to including under getPayload.ts since it and the getPayload methods are logically connected and this doesn't have many lines of code to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants