Skip to content

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

Merged
fubuloubu merged 1 commit into
vyperlang:masterfrom
lr4d:raise_warning_on_contract_size_exceeded
Oct 27, 2020
Merged

raise warning when EIP-170 contract size limit is exceeded#2208
fubuloubu merged 1 commit into
vyperlang:masterfrom
lr4d:raise_warning_on_contract_size_exceeded

Conversation

@lr4d

@lr4d lr4d commented Oct 25, 2020

Copy link
Copy Markdown
Contributor

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

codecov-io commented Oct 25, 2020

Copy link
Copy Markdown

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.

Comment thread tests/compiler/test_bytecode.py Outdated
Comment thread vyper/compiler/output.py Outdated
Comment thread vyper/warnings.py
Comment thread vyper/compiler/output.py Outdated
@lr4d lr4d force-pushed the raise_warning_on_contract_size_exceeded branch from 1e3a5ec to bef27bd Compare October 26, 2020 15:46

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! 🚀

@fubuloubu fubuloubu left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread vyper/compiler/output.py Outdated
Comment thread vyper/compiler/output.py Outdated
Comment thread vyper/warnings.py Outdated
@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

lr4d commented Oct 28, 2020

Copy link
Copy Markdown
Contributor Author

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

@fubuloubu

Copy link
Copy Markdown
Contributor

@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