-
Notifications
You must be signed in to change notification settings - Fork 996
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
Homogenise types to int64 #36
Conversation
See discussion here #34 (comment)
aw man, I liked our compact int types! |
Do marinate :) Don't you think it's nice to have a definition/optimisation separation of concerns? Designers need simple, clear, homogeneous definitions. Implementers who need the speed can go ahead and optimise. |
Won't it be convenient to make those suffixes reflect real sizes that are used by SSZ encoding? Maybe it doesn't make much sense in usage of What do you think about using |
I agree that
Right. I'm wondering if storing
Seems reasonable. Note that |
I've reverted the committee indices back to |
@JustinDrake regarding storing the shuffling in state. Might we want to be able to serve the |
@JustinDrake wouldn't be |
From an implementation point of view, I believe there's little room to optimize, should the spec spell out a concrete size for an integer that is "too large" without explicitly specifying the range of valid values. Implementations are limited in their optimizations by how other clients are guaranteed to behave, and a more precise integer type limits place practical bounds of what other clients can send. In the situation of loosely specified sizes, implementers are left with two unsavory choices:
From a simplicity point of view, as soon as there is any integer of a different size, it is equivalent to there being many of them - the machinery to support multiple integer sizes must be put in place, regardless. For example, keeping everything as Another point is that the encoding of fields and their constraints / specification are two orthogonal concerns - for example, if the If keeping integers simple for designers in the spec is an explicit goal, an alternative is to simply call them integers, spelling out their valid ranges or minimum constraints on what values they must support, instead of bit sizes. This would have a couple of benefits:
|
To echo @mkalinin, I understand the spec still needs to be concerned about integer sizing when it comes to serialization. If this is the case, it seems confusing to call some variable a @arnetheduck's comments around either supplying exact uint sizes or replacing them with mini-specs also makes sense. |
This seems at least contentious enough to not merge. @JustinDrake Can you bring it up on our next call for discussion if it is something you would still like to integrate? |
Also update binary output due to metadata change.
See discussion here #34 (comment)