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

fix: add back global calldatasize check #3463

Merged
merged 4 commits into from
May 28, 2023

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented May 25, 2023

What I did

prevent a performance regression for sending eth to contracts with a payable default function by (mostly) reverting the changes introduced in #3408 and #3104.

How I did it

How to verify it

Commit message

prevent a performance regression for sending eth to contracts with a
payable default function by (mostly) reverting the changes introduced in
9ecb97b4b6f and 02339dfda0. the `skip_nonpayable_check=False` for the
default function is introduced to address GHSA-vxmm-cwh2-q762 (which
02339dfda0 inadvertently fixed, and a test for which was added in
903727006c).

Description for the changelog

Cute Animal Picture

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

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2023

Codecov Report

Merging #3463 (4a0af7d) into master (070b0cf) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3463      +/-   ##
==========================================
- Coverage   89.30%   89.30%   -0.01%     
==========================================
  Files          84       84              
  Lines       10794    10790       -4     
  Branches     2462     2461       -1     
==========================================
- Hits         9640     9636       -4     
  Misses        756      756              
  Partials      398      398              
Impacted Files Coverage Δ
.../codegen/function_definitions/external_function.py 100.00% <ø> (ø)
vyper/codegen/module.py 97.64% <100.00%> (+0.02%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@charles-cooper charles-cooper requested a review from fubuloubu May 25, 2023 20:53
@charles-cooper charles-cooper marked this pull request as ready for review May 25, 2023 20:53
@charles-cooper charles-cooper changed the title fix: add back global calldatasize check for contracts with default fn fix: add back global calldatasize check May 26, 2023
@charles-cooper
Copy link
Member Author

after this PR, gas to call https://github.com/curvefi/tricrypto-ng/blob/e6a5b4ca049d83fa01dcd4cb852686410daec0f2/contracts/main/CurveTricryptoOptimizedWETH.vy (41 methods) __default__() goes from 1840 gas to 54 gas

before:
Screenshot from 2023-05-26 11-21-03

after:
Screenshot from 2023-05-26 11-20-34

@charles-cooper charles-cooper merged commit 33c2471 into vyperlang:master May 28, 2023
@charles-cooper charles-cooper deleted the fix/default-gas branch May 28, 2023 14:33
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