-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[objects] authority can return object layout to client in ObjectInfoR… #433
[objects] authority can return object layout to client in ObjectInfoR… #433
Conversation
Note: this PR is passing the layout from authority to client, but still not using the layout inside the client. For this, what I'm imagining is:
Let me know if this sounds reasonable. |
Still prefer just sticking to Option3 and not burdening the Authorities with UX tasks, but in any case, I can get on the urgent step so we can unblock Geniteam |
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.
Might be easier to review after after merge conflicts resolved
…equest More progress on interpreting object bytes inside the client. - Modify the authority's ObjectInfoRequest to allow the client to (optionally) request the `MoveStructLayout` for an object in a variety of formats - Modify the authority's ObjectInfoResponse to return the layout if requested - Implement the appropriate traits in the authority to allow computing the layout from its local DB Note: three approaches to this were discussed in MystenLabs/sui#397 and there was a general consensus that the third one (ask clients to store packages + use this to compute a layout locally) was preferred. However, after looking into this a bit, I concluded that this will be a major change to the client, which is not great because we need to start piping out JSON objects into the client service API's ASAP to unblock Geniteam (ideally today!). In addition to the prioritization, I think approach (3) doesn't help a client who wants to get a structured view of an object that is not owned by them. Asking such a user to download every module related that object just to look at it + go through the dance of computing a layout from these modules doesn't seem great. Thus, I think exposing a way to ask an authority for the layout is reasonable even if we also implement approach (3).
f0ed90e
to
f79cd73
Compare
I would push back both against characterizing returning the layout as a burden and as needed only for UX.
So far, we have been insulated from this because the client harcodes the layout of the one object type we do anything with: the gas object. But we can't hardcode the layouts for user-defined object types that aren't present in genesis. |
Makes sense |
Thanks for the quick review!! |
…equest
More progress on interpreting object bytes inside the client.
ObjectInfoRequest
to allow the client to (optionally) request theMoveStructLayout
for an object in a variety of formatsObjectInfoResponse
to return the layout if requestedNote: three approaches to this were discussed in #397 and there was a general consensus that the third one (ask clients to store packages + use this to compute a layout locally) was preferred. However, after looking into this a bit, I concluded that this will be a major change to the client, which is not great because we need to start piping out JSON objects into the client service API's ASAP to unblock Geniteam (ideally today!).
In addition to the prioritization, I think approach (3) doesn't help a client who wants to get a structured view of an object that is not owned by them. Asking such a user to download every module related that object just to look at it + go through the dance of computing a layout from these modules doesn't seem great. Thus, I think exposing a way to ask an authority for the layout is reasonable even if we also implement approach (3).