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 termination condition in zero_pad #1611

Merged
merged 4 commits into from Sep 24, 2019

Conversation

@charles-cooper
Copy link
Collaborator

charles-cooper commented Sep 10, 2019

What I did

Fix #1599, #1610

How I did it

See mentioned issues for discussion

How to verify it

Description for the changelog

Fix zero padding conditions in ABI encoder

Cute Animal Picture

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

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.
bytearrays are padded to ceil32(runtime_len), not ceil32(maxlen).
@charles-cooper charles-cooper changed the title WIP Fix termination condition in zero_pad Fix termination condition in zero_pad Sep 16, 2019
@daejunpark

This comment has been minimized.

Copy link
Contributor

daejunpark commented Sep 17, 2019

This fixes the issues that I reported, and will unblock the deposit contract verification.

@djrtwo djrtwo requested a review from davesque Sep 17, 2019
@jacqueswww

This comment has been minimized.

Copy link
Collaborator

jacqueswww commented Sep 24, 2019

LGTM, @charles-cooper anyway that we could've picked this up in a test?

@charles-cooper

This comment has been minimized.

Copy link
Collaborator Author

charles-cooper commented Sep 24, 2019

@jacqueswww yeah maybe, I think if there was data in the next cell whose first byte (BE) was nonzero then it would have been corrupted.

@charles-cooper charles-cooper merged commit 32ce6c9 into ethereum:master Sep 24, 2019
3 checks passed
3 checks passed
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: py36-core Your tests passed on CircleCI!
Details
ci/circleci: py37-core Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.