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

Berlin support #40

Merged
merged 42 commits into from
Aug 21, 2021
Merged

Berlin support #40

merged 42 commits into from
Aug 21, 2021

Conversation

joshuajbouw
Copy link
Contributor

@joshuajbouw joshuajbouw commented Jul 6, 2021

This PR adds both EIP-2929 and EIP-2930 into the EVM.

This is a key PR as it brings the necessary changes to get Berlin hard fork working with the EVM. Since this is a critical update, a discussion and review will be very welcomed. Do note that we will also be updating evm-tests as well to ensure full compatibility with Ethereum VM.

  • EIP-2929
  • EIP-2930

Others related to Berlin, EIP-2565 and EIP-2718, should be done on libraries implementing this change.

@joshuajbouw joshuajbouw marked this pull request as draft July 6, 2021 11:44
@joshuajbouw joshuajbouw marked this pull request as ready for review July 14, 2021 15:56
@sorpaas
Copy link
Member

sorpaas commented Jul 26, 2021

Can you merge master and do rustfmt again? Thank you!

gasometer/src/lib.rs Outdated Show resolved Hide resolved
gasometer/src/lib.rs Outdated Show resolved Hide resolved

/// Stack-based executor.
pub struct StackExecutor<'config, S> {
pub struct StackExecutor<'config, S: StackState<'config>, P: Precompiles<S>> {
Copy link
Member

Choose a reason for hiding this comment

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

What's the rationale for this change? One of the drawback of this is that it'll be potentially difficult for users to get a single type for StackExecutor suitable for different configurations of precompiles. Same reason why Config is not a generic parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That might've been an overzealous mistake there. I'll double check.

gasometer/src/lib.rs Outdated Show resolved Hide resolved
core/src/utils.rs Outdated Show resolved Hide resolved
src/executor/stack/mod.rs Outdated Show resolved Hide resolved
@joshuajbouw
Copy link
Contributor Author

joshuajbouw commented Aug 9, 2021

Hold on, getting issues with into_keys when integrating this due to it being bleeding edge API.

Updated our nightly and we are getting benefits of reduced compile size and speed. So, going to keep it in.

@joshuajbouw joshuajbouw mentioned this pull request Aug 19, 2021
9 tasks
impl<'config, S: StackState<'config>> StackExecutor<'config, S> {
/// Create a new stack-based executor.
pub fn new(state: S, config: &'config Config) -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

Can we add this function back?

Copy link
Member

@sorpaas sorpaas left a comment

Choose a reason for hiding this comment

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

LGTM mostly, but it would be great to add StackExecutor::new back.

@sorpaas sorpaas merged commit 22fe78a into rust-ethereum:master Aug 21, 2021
@mrLSD mrLSD deleted the berlin-support branch December 6, 2023 19:46
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.

3 participants