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

raise warning when EIP-170 contract size limit is exceeded #2208

Merged

Conversation

lr4d
Copy link
Contributor

@lr4d lr4d commented Oct 25, 2020

What I did

Fixes #2150

Still to-do according to #2150 (comment):

The warning should also give suggestions about how to fix the problem (reducing interactions in the constructor, reducing state variables, breaking apart contracts, etc.)

I'm not too familiar with the internals yet, so would appreciate suggestions on the suggestions to be provided.

How I did it

How to verify it

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov-io
Copy link

codecov-io commented Oct 25, 2020

Codecov Report

Merging #2208 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2208      +/-   ##
==========================================
+ Coverage   85.31%   85.36%   +0.04%     
==========================================
  Files          83       84       +1     
  Lines        8525     8533       +8     
  Branches     2063     2064       +1     
==========================================
+ Hits         7273     7284      +11     
+ Misses        745      743       -2     
+ Partials      507      506       -1     
Impacted Files Coverage Δ
vyper/compiler/output.py 100.00% <100.00%> (ø)
vyper/warnings.py 100.00% <100.00%> (ø)
vyper/functions/functions.py 89.81% <0.00%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c660fd0...b178353. Read the comment docs.

tests/compiler/test_bytecode.py Outdated Show resolved Hide resolved
vyper/compiler/output.py Outdated Show resolved Hide resolved
vyper/warnings.py Show resolved Hide resolved
vyper/compiler/output.py Outdated Show resolved Hide resolved
@lr4d lr4d force-pushed the raise_warning_on_contract_size_exceeded branch from 1e3a5ec to bef27bd Compare October 26, 2020 15:46
Copy link
Contributor

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

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

Thanks! 🚀

Copy link
Member

@fubuloubu fubuloubu 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! Some minor nits

vyper/compiler/output.py Outdated Show resolved Hide resolved
vyper/compiler/output.py Outdated Show resolved Hide resolved
vyper/warnings.py Outdated Show resolved Hide resolved
@lr4d lr4d force-pushed the raise_warning_on_contract_size_exceeded branch from bef27bd to b178353 Compare October 27, 2020 16:01
@fubuloubu fubuloubu merged commit e4b72e2 into vyperlang:master Oct 27, 2020
@lr4d lr4d deleted the raise_warning_on_contract_size_exceeded branch October 27, 2020 17:43
@lr4d
Copy link
Contributor Author

lr4d commented Oct 28, 2020

btw you will also want to close #1850, which is a duplicate of #2150

@fubuloubu
Copy link
Member

@lr4d thanks for seeing that!

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.

Add a warning when exceeding the EIP-170 Contract Size Limit
4 participants