-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Don't send back empty proofs if light request fails #12372
Don't send back empty proofs if light request fails #12372
Conversation
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.
Change looks good (til I learn that oneof is not required).
I am wondering a bit about versioning, but will probably leave it like this.
Would need to be mentioned in release note as potentially breaking through.
As far as I know, only smoldot sends these requests at the moment, and I'm ok with my own change. |
What about the EDIT: Changes tries were deprecated, so I guess the |
bot merge |
At the moment, if the node receives a so-called "light client request" (asking for a storage proof or a call proof), and this request cannot be served, we send back a message indicating that everything is ok, except that it contains an empty proof.
The reason why a request cannot be served is typically that the block has been pruned.
This PR modifies the protocol so that we send back a message without any proof instead.
To do an analogy, right now we more or less send back
Some(Vec::new())
, while this PR modifies this to send backNone
.This makes it clearer from the point of view of the request sender that something bad has happened.