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: relax check for statically sized calldata #3090

Merged

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Sep 12, 2022

a37bbbc (#2911) introduced per-method calldatasize checks. however, for the case where calldata is statically sized (in the ABI sense), this check is too strict, since users might want to append extra bytes to the calldata and manipulate msg.data directly for some application-level reasons.

What I did

How I did it

change "eq" to "ge"

How to verify it

see the tests

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

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

a37bbbc introduced per-method calldatasize checks. however, for the
case where calldata is statically sized (in the ABI sense), this check
is too strict, since users might want to append extra bytes to the
calldata and manipulate msg.data directly for some application-level
reasons.
@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2022

Codecov Report

Merging #3090 (d840b4b) into master (be2b7f4) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3090      +/-   ##
==========================================
- Coverage   88.34%   88.29%   -0.06%     
==========================================
  Files          98       98              
  Lines       11021    11019       -2     
  Branches     2605     2604       -1     
==========================================
- Hits         9737     9729       -8     
- Misses        833      840       +7     
+ Partials      451      450       -1     
Impacted Files Coverage Δ
.../codegen/function_definitions/external_function.py 100.00% <100.00%> (ø)
vyper/builtin_functions/functions.py 90.00% <0.00%> (-0.50%) ⬇️

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

@charles-cooper charles-cooper enabled auto-merge (squash) September 12, 2022 21:38
@charles-cooper charles-cooper merged commit 593c88f into vyperlang:master Sep 12, 2022
@banteg
Copy link

banteg commented Sep 27, 2022

made this contract to track when etherscan fixes their bug https://goerli.etherscan.io/address/0xa55c7877dff09f6ef55c583c9f43ff3d27dcc547#readContract
Screen Shot 2022-09-27 at 15 31 19

after the fix, these calls should read 73d4a13a and 4

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.

4 participants