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

Implement incremental packed list (basic type list/vector) hashing #122

Merged
merged 5 commits into from
Apr 23, 2019

Conversation

Nashatyrev
Copy link
Contributor

This is the completion of PR #115
Also addresses one item of the issue #120

No special tricks comparing to non-packed lists except the support for serializing subLists were added

Copy link
Contributor

@mkalinin mkalinin left a comment

Choose a reason for hiding this comment

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

LGTM! There is a couple of cosmetic fixes might worth to be done.

private MerkleTrie updatePackedTrie(
SSZListType type,
Object value,
BiFunction<Integer, Object, MerkleTrie> childVisitor,
Copy link
Contributor

Choose a reason for hiding this comment

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

It appears that childVisitor is not used.

int typeSize = basicListType.getElementType().getSize();
int valsPerChunk = bytesPerChunk / typeSize;
if (valsPerChunk * typeSize != bytesPerChunk) {
throw new UnsupportedOperationException("");
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add some message here.

Copy link
Member

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM

@mkalinin mkalinin merged commit da3bec1 into develop Apr 23, 2019
@mkalinin mkalinin deleted the feature/incremental-packed branch July 16, 2019 11:35
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