sui
sui copied to clipboard
[move][sui-adapter][sui-framework] Remove object versioning from the Move layer
- 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 inVersionedID
in Move, this motivated theobject::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 theparent_sync
for these unwrapped objects.