Skip to content

Commit

Permalink
Update sui-move-diffs.md (MystenLabs#873)
Browse files Browse the repository at this point in the history
* Update sui-move-diffs.md

Replace fastnft GitHub path with sui to ID.move

* Update sui-move-diffs.md

Removing TODO
  • Loading branch information
Clay-Mysten authored Mar 17, 2022
1 parent 1d00ddb commit 4ba58a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions doc/src/learn/sui-move-diffs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ In core Move, global storage is part of the programming model and can be accesse

But on-chain storage is expensive and limited (not optimized for storage and indexing). Current blockchains cannot scale to handle storage-heavy applications such as marketplaces and social apps.

TODO: Review/edit the impetus above and include similar reasoning for each item below.

So there is no global storage in Sui Move. None of the global storage-related operations are allowed in Sui Move. (We have a bytecode verifier for this to detect violations.) Instead, storage happens exclusively within Sui. When we publish a module, the newly published module is stored in Sui storage, instead of Move storage. Similarly, newly created objects are stored in Sui storage. _This also means that when we need to read an object in Move, we cannot rely on global storage operations but instead Sui must explicitly pass all objects that need to be accessed into Move._

## Addresses represent Object IDs

In Move, there is a special _address_ type. This type is used to represent account addresses in core Move. Core Move needs to know the address of an account when dealing with the global storage. The _address_ type is 16 bytes, which is sufficient for the core Move security model.

In Sui, since we don’t support global storage in Move, we don’t need the _address_ type to represent user accounts. Instead, we use the _address_ type to represent the Object ID. Refer to the [ID.move](https://github.com/MystenLabs/fastnft/blob/main/sui_programmability/framework/sources/ID.move) file in Sui framework for an understanding of address use.
In Sui, since we don’t support global storage in Move, we don’t need the _address_ type to represent user accounts. Instead, we use the _address_ type to represent the Object ID. Refer to the [ID.move](https://github.com/MystenLabs/sui/blob/main/sui_programmability/framework/sources/ID.move) file in Sui framework for an understanding of address use.

## Object with key ability, globally unique IDs

Expand Down

0 comments on commit 4ba58a2

Please sign in to comment.