-
Notifications
You must be signed in to change notification settings - Fork 174
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
clarify the consensus version headers #470
Conversation
To me this rephrasing is still ambiguous. maybe we can have a more extensive description in if we give up with local description we could avoid duplication and reference the header like
WDYT? |
It seems that the issue is that the value in the header isn't the enum as specified by
This also means that if in fulu we have further changes to some, but not all, of these objects then we can continue to provide the correct version information for each independently in the API. |
I like the approach of explicitly specifying the possibles values. |
@mcdee your answer is the proof of that there is still confusion here Do we want to "leak" the underlying object versioning in the api or do we want to uniformly deal with the consensus fork and let clients map fork->object-schema? this applies on both requests and responses. |
Agree that there's still some ambiguity in the changes proposed by this PR. The table in |
How do clients determine the what consensus version to set for block and state apis currently? As for Lodestar, we look at the slot of the data, calculate the epoch ( If we wanna go with container version instead I think we should rename the header to reflect that. |
I thought about that, but I think we can still make the case that data structure versioning is based on consensus versioning (we only change those on new forks) so we could leave the same name. |
I'm not sure as at today we've got any object that returns a consensus version other than the current milestone that the slot of the object... Eg. if i select a block from capella, the eth-consensus-version is saying 'capella'. I'm not sure it's a great idea to have the concept that we return phase0 for attestations now in deneb for an attestation created on a deneb slot... I don't see the value? Every single client needs to be able to interpret this consistently and i think making a complicated decoding like this is going to not make anyones life any easier at all... Do we do this anywhere currently? The whole point of eth-consensus-version was to give a starting point if we're encoding with SSZ to let the decoder understand the state of play for the milestone to decode the SSZ for... |
So IMO we should:
|
a8f8119
to
206b13c
Compare
206b13c
to
a3a6744
Compare
This is already clear since the
I pushed a commit with some rephrasing: The active consensus to which ... belongs |
I just really think we're overthinking all of this. but as long as we're not suggesting that an attestation produced in a deneb slot comes out with Eth-consensus-version of phase0 as earlier suggested, then im not completely against changing it. Just be aware that with so many different languages and backgrounds, unless we start using formal notation this will remain ambiguous to some people. |
Its one of those things that is obvious for everyone here, but can be seen as confusing for someone coming into this fresh. I think that we're okay with the wording as proposed in this PR... ...except a couple of the headers have ", if using SSZ encoding." in their description. I believe that this is being sent, or at least should be sent, for the response regardless of the encoding. If this is the case, we should remove this bit as we're making a change anyway. |
Current rephrasing looks good! Just added another comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My last comments could be controversial and even partially incorrect.
So this is good enough for me to merge.
The
Eth-Consensus-Version
header usage is ambiguous and could be misinterpreted. It shouldn't be tied up to the data schema but rather to the consensus version/fork the data belongs to.For example since EIP7549, there are 2 possible attestations schemas only:
Attestation
(phase0) andElectra.Attestation
(electra) but that doesn't mean that theEth-Consensus-Version
can only bephase0
orelectra
but rather any value according to when the attestation is submitted or retrieved (Example: adeneb
attestation will have anAttestation
schema anddeneb
as value in theEth-Consensus-Version
).When it come to the block related APIs, the problem is less concerning because there is schema per fork and hence any value could be used.