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

Zero pad from calldata #1605

Merged
merged 9 commits into from Oct 23, 2019

Commits on Oct 1, 2019

  1. Rewrite zero padder with calldatacopy

    The semantics of calldatacopy is that copying data from past-the-end
    writes zero bytes to memory. So we can avoid the loop, making the code
    more gas-efficient and easier to reason about.
    charles-cooper committed Oct 1, 2019
    Copy the full SHA
    74aa685 View commit details
    Browse the repository at this point in the history
  2. remove zero_pad_i

    (no longer needed with calldatacopy zeroer)
    charles-cooper committed Oct 1, 2019
    Copy the full SHA
    a7d5a19 View commit details
    Browse the repository at this point in the history
  3. Fix maxlen passed to zero_pad in pack_args_by_32

    maxlen was confusingly named. maxlen referred to the static size of the
    entire packed log. instead, the maxlen of the current item should be
    passed to zero_pad.
    charles-cooper committed Oct 1, 2019
    Copy the full SHA
    ff3c3a3 View commit details
    Browse the repository at this point in the history
  4. Remove maxlen from zero_pad

    It's a red herring. byte arrays should always be padded to the runtime
    length and not maxlen.
    charles-cooper committed Oct 1, 2019
    Copy the full SHA
    cce01a4 View commit details
    Browse the repository at this point in the history
  5. Remove maxlen > 0 check from zero_pad

    Callers should make this optimization
    charles-cooper committed Oct 1, 2019
    Copy the full SHA
    d17e184 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    9d1741e View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    082467e View commit details
    Browse the repository at this point in the history
  8. fix lint

    charles-cooper committed Oct 1, 2019
    Copy the full SHA
    1971b22 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    9daf153 View commit details
    Browse the repository at this point in the history