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

Update fastssz #6760

Merged
merged 80 commits into from
Aug 24, 2020
Merged

Update fastssz #6760

merged 80 commits into from
Aug 24, 2020

Conversation

prestonvanloon
Copy link
Member

What type of PR is this?

Other

What does this PR do? Why is it needed?

This PR updates fastssz to include the generated HashTreeRoot methods. ferranbt/fastssz#8

This PR also changes all possible usages of ssz.HashTreeRoot to use the generated method.

Which issues(s) does this PR fix?

N/A

Other notes for review

This should have a non-trivial performance improvement with HTR methods, except for BeaconState which does not use the generated HTR.

rauljordan
rauljordan previously approved these changes Jul 29, 2020
@prestonvanloon
Copy link
Member Author

Looks like this is blocked by #6761 for go builds.

rauljordan
rauljordan previously approved these changes Jul 29, 2020
@codecov
Copy link

codecov bot commented Aug 22, 2020

Codecov Report

Merging #6760 into master will decrease coverage by 0.02%.
The diff coverage is 78.18%.

@@            Coverage Diff             @@
##           master    #6760      +/-   ##
==========================================
- Coverage   62.40%   62.37%   -0.03%     
==========================================
  Files         408      406       -2     
  Lines       32543    31597     -946     
==========================================
- Hits        20308    19710     -598     
+ Misses       9413     9098     -315     
+ Partials     2822     2789      -33     

Comment on lines +6 to +9
#build:remote-cache --spawn_strategy=standalone
#build:remote-cache --strategy=Javac=standalone
#build:remote-cache --strategy=Closure=standalone
#build:remote-cache --strategy=Genrule=standalone
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these stay commented?

Copy link
Member Author

@prestonvanloon prestonvanloon Aug 23, 2020

Choose a reason for hiding this comment

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

yep! Otherwise fssz generation fails for some reason...

if err != nil {
s := testutil.NewBeaconState()
if err := s.SetSlot(slot); err != nil {
panic(err)
Copy link
Member

Choose a reason for hiding this comment

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

instead of panicking here maybe we can pass in the testing.T to this method.

return signingData(func() ([32]byte, error) {
if v, ok := object.(fssz.HashRoot); ok {
return v.HashTreeRoot()
}
Copy link
Member

Choose a reason for hiding this comment

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

you can remove the below 2 cases, its covered by fastssz

terencechain
terencechain previously approved these changes Aug 23, 2020
Copy link
Member

@nisdas nisdas left a comment

Choose a reason for hiding this comment

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

lgtm

@prylabs-bulldozer prylabs-bulldozer bot merged commit 78a25f9 into master Aug 24, 2020
terencechain added a commit that referenced this pull request Aug 24, 2020
prylabs-bulldozer bot pushed a commit that referenced this pull request Aug 24, 2020
* Revert "Update fastssz (#6760)"

This reverts commit 78a25f9.
* Merge refs/heads/master into revert-6760-update-fssz
@farazdagi farazdagi deleted the update-fssz branch August 25, 2020 15:47
@prestonvanloon prestonvanloon mentioned this pull request Aug 27, 2020
2 tasks
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.

5 participants