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

limit code size EIP170 #350

Merged
merged 2 commits into from
Aug 15, 2018
Merged

limit code size EIP170 #350

merged 2 commits into from
Aug 15, 2018

Conversation

ayrat555
Copy link
Member

@ayrat555 ayrat555 commented Aug 14, 2018

Copy link
Contributor

@germsvel germsvel left a comment

Choose a reason for hiding this comment

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

Small comment, but LGTM otherwise

{:error, {params.state, 0, SubState.empty()}}

# EIP170 https://github.com/ethereum/EIPs/blob/master/EIPS/eip-170.md
byte_size(output) > 24_577 ->
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about extracting this condition to a function that is more self-explanatory?

# in the `cond` block 
eip_170_byte_size?(output) -> 

# then further below
def eip_170_byte_size?(output), do: byte_size(output) > 24_577

# or even better, add docs
@doc """
This is implemented because of EIP170
See more at https://github.com/ethereum/EIPs/blob/master/EIPS/eip-170.md
"""
def eip_170_byte_size?(output), do: byte_size(output) > 24_577

What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, good idea. btw it looks like this change affects previous tests so I'll rewrite it using EVM.Configuration

@ayrat555 ayrat555 mentioned this pull request Aug 15, 2018
4 tasks
@ayrat555 ayrat555 merged commit 25a3db3 into master Aug 15, 2018
@ayrat555 ayrat555 deleted the ab-eip170-code-size-limit branch August 15, 2018 09:02
@ghost ghost removed the status: in progress label Aug 15, 2018
@germsvel germsvel mentioned this pull request Oct 2, 2018
4 tasks
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.

2 participants