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

evm/vm: reintroduce evm interface #2869

Merged
merged 10 commits into from
Jul 11, 2023
Merged

evm/vm: reintroduce evm interface #2869

merged 10 commits into from
Jul 11, 2023

Conversation

jochem-brouwer
Copy link
Member

Addresses #2867

Will await an approval that this is OK before continuing.

Should we also introduce to use this interface in client?

@holgerd77
Copy link
Member

holgerd77 commented Jul 10, 2023

So, just to give some feedback here: for me this looks pretty healthy, generally make things a lot more transparent to see at one unifed place what is actually exposed by the EVM (and used). And e.g. the journal then is used anyhow - being it implicit or named/stated in the interface - that's just how things are implemented right now and we just also do not want to change any more at this point (right?).

So, tldr;: I would be a fan of adding this here.

@jochem-brouwer
Copy link
Member Author

So, just to give some feedback here: for me this looks pretty healthy, generally make things a lot more transparent to see at one unifed place what is actually exposed by the EVM (and used). And e.g. the journal then is used anyhow - being it implicit or named/stated in the interface - that's just how things are implemented right now and we just also do not want to change any more at this point (right?).

So, tldr;: I would be a fan of adding this here.

Ok, I wanted to just get this approval in order to continue, thanks 😄

Will finish today!

@holgerd77
Copy link
Member

Updated this via UI

@holgerd77
Copy link
Member

Client tests failing here.

@jochem-brouwer
Copy link
Member Author

Re-triggered CI. If client miner tests fail, this seems to be a race condition, I had this on another PR which @gabrocheleau re-triggered and then it passed.

@@ -20,6 +20,7 @@ import type {
} from './types.js'
import type { BlockchainInterface } from '@ethereumjs/blockchain'
import type { EVMStateManagerInterface } from '@ethereumjs/common'
import type { EVMInterface } from '@ethereumjs/evm/dist/cjs/types.js'
Copy link
Member

Choose a reason for hiding this comment

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

These imports are still a total no-go for merging, I guess that's obvious?

Copy link
Member Author

Choose a reason for hiding this comment

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

Huh, how did this get introduced? 🤔 I think VSCode auto-imported this

Copy link
Member Author

Choose a reason for hiding this comment

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

Nvm see my new comment on the PR, PR was not yet ready to be reviewed (sorry for marking it as ready-to-review)

@jochem-brouwer
Copy link
Member Author

When I got the approval I saw this comment on this PR (see first message):

Will await an approval that this is OK before continuing.

I was a bit confused why I had this comment, but now if I review my own PR I see many TODOs. This is also why this PR looks dirty (CC @holgerd77 )

@jochem-brouwer jochem-brouwer requested a review from holgerd77 July 10, 2023 13:18
@jochem-brouwer
Copy link
Member Author

Have changed a method name (reportAccessList -> startReportingAccessList) in EVM journal interface since the name was misleading (not super related to this PR but this is an improvement IMO)

Copy link
Contributor

@gabrocheleau gabrocheleau 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, left 2 comments.

packages/vm/src/vm.ts Show resolved Hide resolved
packages/evm/src/types.ts Show resolved Hide resolved
@holgerd77
Copy link
Member

Have updated this via UI

@holgerd77 holgerd77 merged commit 0ccc16b into master Jul 11, 2023
@holgerd77 holgerd77 deleted the reintroduce-evm-interface branch July 11, 2023 07:54
@holgerd77
Copy link
Member

Maybe just to throw in the ring: do we want to keep this interface on EVM or also move to Common?

Side note: in case we move to Common I would be a fan of a slightly different structure there and do folder "interfaces/" and then have a dedicated named file for every major interface. This just scales better and is more transparent and very well worth to have an own directory for this, these interfaces now play a very central role in our monoprepo and can very well get a visible place.

@jochem-brouwer
Copy link
Member Author

I indeed thought of moving this to Common and I think regarding cleani-ness this is great 😄

@holgerd77
Copy link
Member

Ok, can you maybe tackle directly today or tomorrow? Would you also be ok with this slightly adopted folder structure (and could you integrate as well)? So I would then name the files after the packages for simplicity: so e.g. interfaces/evm.ts.

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