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

Clean up SSZ multiproofs spec: unused function #2715

Closed
wants to merge 1 commit into from

Conversation

ralexstokes
Copy link
Member

@ralexstokes ralexstokes commented Nov 7, 2021

The function concat_generalized_indices is not currently used anywhere in this repo (and by extension the helper get_power_of_two_floor) and a quick search only yields reference from the past PR: #1323

We could use this functionality in the future, but currently don't as we don't need any receipt consumption logic in the consensus protocol as it stands today or in the near term.

Given that this code will be in the git history in the event we do need it, I'd suggest removing it for now so that the spec is "lighter" and that implementers of multiproofs don't bother implementing an unnecessary function (if they do what I just did and just mechanically implement the spec from the markdown file line by line ;) )

@djrtwo
Copy link
Contributor

djrtwo commented Nov 8, 2021

What are the chances we need this in light client R&D?

@protolambda
Copy link
Contributor

Concatenation is an important thing for constructing nested path. E.g. with a container of 5 fields, and access to field index 4, with 7 fields and access to field index 5, you get: 0b1_100 ++ 0b1_101 = 0b1_100_101. There's no other function in the spec which defines how this works otherwise.

@djrtwo
Copy link
Contributor

djrtwo commented Nov 9, 2021

yeah, similar feeling. Although it's not used in the spec, it's good to be defined for others

@ralexstokes ralexstokes deleted the ralexstokes-patch-1 branch November 13, 2021 15:04
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