forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[data model] rendering Move object contents as JSON
- Upgrade Move version to import diem/move@1e5e36c. This also required some unrelated (but minor) updates in adapter.rs - Use the new Move logic to add object.rs utility functions for (1) getting the type layout of a Move object, and (2) converting Move/FastX objects to JSON (which can be done once you have a type layout) Note: this PR does not yet yet these utility functions via authority or client service API's, since that would require a fairly large refactoring. There are a few different approaches we could use here: - Expose a new authority API for getting a `MoveStructLayout` given a `StructTag`. The client service can then use this to turn an `Object` into JSON locally, and expose its own API that does this. This is probably the path of least resistance, but it may require the client service to either store the `MoveTypeLayout` for all of its objects or frequently query the authority API to get layouts. - Expose a new authority API for getting an `Object` in JSON instead of as a Rust `Object`. This is maybe a bit more convenient for the client service and other consumers of the authority API, but more work for the authority + perhaps muddies the waters around which API's it wants to use. - Keep the authority API's as-is, but ask the client service to store (or repeatedly query for) all the Move packages relevant to its object types + their transitive dependencies. This would allow the client serive to comput its own `MoveStructLayout`. This is also a reasonable approach, and we'll eventually need it if we want to do local execution (since the VM will also need these packages).
- Loading branch information
1 parent
663b6ba
commit 1bc609d
Showing
10 changed files
with
150 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters