-
Notifications
You must be signed in to change notification settings - Fork 377
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
engine: clarify order of operation for fcu v3 #479
Conversation
Besu has a similar situation. Some aspects of JSON validation happen higher up the RPC stack, well before method-specific checks later on. |
… head Co-authored-by: lightclient <lightclient@protonmail.com> Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
@jflo yeah okay I figured we weren't alone. I'm not sure how to square that fact with the spec. We're technically not conformant and to become fully "conformant" would be any annoying and kinda pointless undertaking. I wonder if we could placate the situation by noting something along the lines of client software may fail earlier during json parsing if the request is malformed without apply the forkchoice state. Or should we just leave it as-is and accept we are not perfectly conformant? |
I'm gonna accept imperfect conformance, because if I squint I think I can see a messy path where we can refactor and not even try to parse the second payload till much later. This is the price we pay for binding the payload build to the fcu selection, and is likely worth it. |
If the JSON passed onto the method call is malformed in UPD: so I can see that there are intermediate cases between the malformed JSON and fully valid |
Haa I think even this would be a bit challenging for us to do, because we don't have a separate V1, V2, V3 for each object. We implement it as one object with optional fields that are added in later versions. So we only check that these optional fields exist later on. I think my pref to resolve this would be to say:
Is there a reason for the second bullet to be a MUST? It feels like the CL will quickly send the next block and fcu it as latest and it's unlikely the client will again build a block and have an error in the payload attributes? |
I think we should ask CL devs how do they handle errors in the case of So MAY is kind of ambiguous in this case. If CL treats the payload attributes error as if the payload was not validated and they have to turn into optimistic mode then this change looks fine and I think we should say explicitly that in the case of the JSON-RPC error response a payload must not be considered as VALID |
Btw, enforcing I think that we can say in the spec that a client MAY NOT apply the |
Re-iterating on this. Curious what are your thoughts on the following behavior:
edit: this behaviour wouldn't break existing CL assumptions |
Thanks for bumping this @mkalinin. I haven't been working on the engine api for a couple weeks and this issues takes a little time to re-load into my mind. Reading your last comment, that behavior makes sense. Although I am having a difficult time understanding what needs to be updated in this PR to match it? Or is this PR okay as-is? Revisiting my original concern in this PR, I think we can modify our behavior so that every field is optional, which will allow us to validate the What do you think? |
Considering that this was not only Geth’s concern but at least Besu’s as well, i’d rather not expect every EL to be capable of doing that. Thus, i’d propose the following:
|
closed in favor of #498 |
I took a stab at making change c) as described by @mkalinin in this comment: #476 (comment)
A few random thoughts I have on this:
payloadAttributes
will cause problems for most clients early on in the method handling (before applying fcu).