Skip to content

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

Merged
mkalinin merged 5 commits intodevelopfrom
feature/incremental-packed
Apr 23, 2019
Merged

Implement incremental packed list (basic type list/vector) hashing#122
mkalinin merged 5 commits intodevelopfrom
feature/incremental-packed

Conversation

@Nashatyrev
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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