sui icon indicating copy to clipboard operation
sui copied to clipboard

[move][sui-adapter][sui-framework] Remove object versioning from the Move layer

Open tnowacki opened this issue 2 years ago • 0 comments

  • Removed version from object::Info
  • Renamed object::Info to object::UID
  • The version of objects is now tracked on the Rust side in MoveObject

Blocked by #3618

More background:

  • We were going to add a child_count alongside the version in VersionedID in Move, this motivated the object::Info renaming
  • After attempting to do child_count, we realized that neither version nor child count can be exposed in Move due to cases where they are inaccurate during the transaction. So we are moving them into the Rust layer in order to reduce the gas cost of Move transactions and to reduce the complexity for Move devs
  • However, when unwrapping wrapped objects, to either delete them or transfer them, you need to know the previous version. Before removing the version from Move, we can essentially just double increment the version. But after it is moved into the Rust layer, we don’t know the version in the Move data after unwrapping. So we will grab the last version from the parent_sync for these unwrapped objects.

tnowacki avatar Jul 29 '22 22:07 tnowacki