Devnet-0.29.0 Release Notes - Major Breaking Changes

Highlights

  • [Major breaking change] - SuiAddress and ObjectID are now 32 bytes long instead of 20 bytes (in hex, the len increases from 40 to 64). If your software interacts with any ObjectID and SuiAddress, you must update it to use updated addresses and redeploy it. (#8542)
  • [Major breaking change] - Modules sui::digest, sui::safe, sui::typed_id, sui::immutable_external_resource, sui::locked_coin, sui::epoch_time_lock
  • [Breaking change] - entry function sui::coin::burn_ removed (sui::coin::burn is now entry)
  • [Major breaking change] - SuiAddress is now calculated as the first 32 bytes of the Blake2b hash of flag || pubkey instead of the SHA3_256 hash. (#9262)
  • Move smart contracts can now access the blockchain timestamp. To access the timestamp, your smart contract should read a shared object, Clock, at the address 0x6 and use Clock::timestamp_ms(&Clock) to read the timestamp. You should always reference the Clock object with ObjectArg::SharedObject::mutable set to false. See usage in https://github.com/MystenLabs/sui/blob/main/doc/in-progress/time.md
  • Move smart contracts can now also access the coarse epoch start timestamp (updated every 24 hours) without referencing the Clock object. To do so, call TxContext::epoch_timestamp. The current epoch number is also available via TxContext::epoch.
  • This release integrates the Sui Object Display into Sui Full node. The new Object Query API supports the Sui Object Display Standard. The main document explaining the feature and the reasons behind it is here: https://forums.sui.io/t/nft-object-display-proposal-accepted/4872 and the examples of Display use are now located in the Sui by Example book: Object Display - Sui Move by Example. Effective with this release, Sui Explorer and Sui Wallet support the Sui Object Display Standard. NFTs that use a previous implementation might not render as expected.
  • [Minor breaking change] - Removed bulletproofs and elliptic_curve from the Sui Framework. Remove bulletproofs and EC operations from Move by benr-ml · Pull Request #8660 · MystenLabs/sui · GitHub
  • [Breaking change] - ecdsa_k1::ecrecover and ecdsa_k1::secp256k1_verify now require you to input the raw message instead of a hashed message. You must also include the u8 that represents the hash function. See #7773) for more details.
  • Adds an RPC method routing for backward compatibility support #8334
  • [API breaking change] - This release replaces SuiCertifiedTransaction with SuiTransaction in SuiTransactionResponse. This is because validators can no longer guarantee to return a transaction certificate. This release also unifies SuiTransactionResponse and SuiExecuteTransactionResponse to simplify the API. See #8369 for more information.
  • [API breaking change] - Updated the structure for dynamic field names to make it easier to use in sui_getDynamicFieldObject. For more details, see #7318
  • [Transaction Format breaking change] - Added a new expiration field to TransactionData to allow for users to specify a time that a transaction should expire, meaning it is no longer eligible to sign and execute by validators. In this release, the only supported value for the expiration field is epoch`. If not provided, no expiration is set for the associated transaction.
  • [API breaking change] - This release removes the request_switch_delegation function from the Transaction Builder API. It also removes the pending_delegation_switches field from the validator set type in the Sui SDK. #8435
  • [Minor breaking change] - This release modifies the format for ConsensusCommitPrologue transactions. This is a system-generated transaction that updates timestamp on the Clock object, allowing Sui Move smart contracts to read up-to-date timestamps from the blockchain.
  • [Major breaking change] - This release replaces the sui_getValidators and sui_getSuiSystemState functions with a new sui_getLatestSuiSystemState function. The new function returns a flattened type that contains all information from the latest SuiSystemState object on-chain with type SuiSystemStateSummary. It also contains a vector of type SuiValidatorSummary that summarizes information from each validator, including: metadata, staking pool, and other data. The release also adds a p2p_address to each validator’s metadata. The value for the field is the address the validator used for p2p activities, such as state sync.
  • [API breaking change] As part of the effort to reduce the size of Sui Full node synchronization payload, this release removes events from TransactionEffect. The events are still included in the SuiTransactionResponse returned by sui_getTransaction and sui_submitTransaction endpoints. #7822
  • [Major breaking change] - Programmable Transaction Blocks is a new construct that replaces both batch transactions and normal transactions (with the exception of special system transactions). Programmable Transaction blocks allow for a series of transactions to be chained and executed atomically, where the results of one transaction can be used as input for the following transactions. For more information, see [Programmable Transaction blocks with the TS SDK](Sui Programmable Transaction with the TS SDK | Sui Docs).
  • [Breaking change] - Changes to Gas Budget to use SUI rather than gas units. This removes the concept of gas units from any user-related API operations. This does not change the format of TransactionData (u64). This is not a breaking change in the sense that the current format no longer works, but rather requires you to reconsider how you use gas budgets.
  • [Breaking change] - Changes to gas metering logic within the VM. This removes the per-bytecode costs, and instead replaces it with a tiered costing schedule based on the number of instructions executed, bytes allocated on the stack, and maximal stack height. Metering for native functions is defined as before on a per-native basis. This is not a breaking change in the sense that current format will no longer work, but may require you to reconsider your gas budgets for certain transactions.
  • [Breaking change] - Currently, transactions require a single coin to pay for gas. This sometimes results in users needing to make separate transactions (such as PaySui) to merge coins before completing a transaction, which can also increase the cost of the transaction.
    This release changes the field in TransactionData from gas_payment: ObjectRef to gas_payment: Vec<ObjectRef>, where ObjectRef is a non-empty vector of owned SUI objects. This combines all of the coins into a single coin, using the ObjectID of the first coin in the vector.
  • [API breaking change] - The StakedSui object now includes the ID of the staking pool, pool_id. ****For more information, see #8371
  • [Major breaking change] The sui_getObject endpoint now takes an additional configuration parameter of type SuiObjectDataOptions to control which fields the endpoint retrieves. By default, the endpoint retrieves only object references unless the client request explicitly specifies other data, such as type, owner, or bcs. To learn more, see (#8817)
  • [Major API breaking change] The previous sui_getObjectsOwnedByAddress has been renamed to sui_getOwnedObjects. In addition the response has been standardized across the object related APIs to return SuiObjectResponse which has changed from its original implementation to instead have a data field and an error field. To learn more see #9668.
  • [Major breaking change] - The ID leak verifier that governs usage of UIDs in Sui Move code has been rewritten and flipped. New objects must now get “fresh” UIDs created in the function where the object is made, but when the object’s struct destroyed, the UID can be stored as if the object was wrapped (but without it’s contents). In contrast, the previous rules stated that the UID could come from anywhere, but must have been destroyed when the object was unpacked. We have made this change to make using dynamic fields a bit more ergonomic, so you do not always need a Bag or Table if you want to retain access to dynamic fields after unpacking an object into its constituent fields. See #8026 for details and a migration example.
  • [Major breaking change] - This release changes the serialization format of Sui object types. Sui now uses a more compact serialization format for common types such as Coin, Coin, and StakedSui, reducing object size by up to 40%. This lowers storage gas costs for objects of these types. This doesn’t effect clients using JSON-RPC API read functions, but clients that read raw Sui objects directly need to understand the new type encoding. Note that the encoding of Sui Move structs remains unchanged. See #9055 for more details.
  • [Major API breaking changes] - GetTransaction API refactoring
    • [RPC] sui_getTransaction and sui_multiGetTransaction now take in an additional optional parameter called options that specifies which fields to retrieve (such as transaction, effects, events, etc). By default, these operations return only the transaction digest.
    • [TS SDK] Renamed provider.getTransactionWithEffects to provider.getTransactionResponse. The new method takes in an additional parameter, SuiTransactionResponseOptions, to configure which fields to retrieve (such as transaction, effects, events, etc). By default, this method returns only the transaction digest.For more information, see #8888.
  • [Major API breaking changes] sui_executeTransaction refactoring
    • Removed sui_executeTransactionSerializedSig and sui_submitTransaction operations.
    • The sui_executeTransaction operation now takes a vector of signatures instead of a single signature to support Sponsored Transactions.To learn more, see #9068.
  • [Minor breaking change] - Removed Randomness from the Sui Framework and the sui_tblsSignRandomnessObject JSON RPC. #8977
  • [RPC API breaking change] - Various changes in JSON-RPC governance API
    • updated sui_getDelegatedStakes to the new staking flow
    • grouped all StakedSui by staking pool to reduce duplicate validator info in the response
    • improve ValidatorMetadata json response to make it more human readable, which affects getSuiSystemState as well.
    • make SuiSystemState json response camelCased
    • added --epoch-duration-ms option to sui genesis for configuring localnet epoch duration

For more information, see #8848

  • [Minor breaking change] - This changes genesis snapshot since the generation for a PoP changed. It also removes Move APIs bls12381::bls12381_min_sig_verify_with_domain, validator::verify_proof_of_possession because now all validate PoP is now done in validator::validate_metadata
  • New validator committee and metadata management functionalities are introduced, including entry functions for signing up as a validator candidate, and for rotating the various metadata of validators. Also staking support is added for validator candidates and inactive validators. For more information, see #8839, #8768 and #8708.
  • [API breaking change] - This release removes locked coin staking functionality, and changes the layout of the StakedSui object to remove the locking period field. For more information, see #9046.
  • [API breaking change] Delegation functions have all been renamed to use the word “stake” instead. See #9059.
  • [Breaking change] - This release introduces several limits on transactions and transaction executions. Many of these limits are subject to change prior to Sui Mainnet. To view a list of limits in release .28, see the source code.
  • The Groth16 ZKP verifier in Move is updated such that it now allows verification of proofs created over the BN254 elliptic curve construction. The API for the existing Groth16 verifier over BLS12-381 has changed. See #9196.
  • [API breaking change] A valid signature must be committed to the Blake2b hash of the message before passing to any signing APIs. If a signature is created elsewhere, please ensure the transaction data is hashed first. See #9561
  • [Breaking change] sui-framework Move package has been separated into two packages: sui-framework and sui-system. sui-system contains modules that were previously in the governance folder and sui-framework contains everything else. The path of the packages within the sui repo have changed as well. See #9618
  • [Breaking change] validator_address field has been removed from StakedSui objects. This way pool_id becomes the only unique identifier for a staking pool.
  • [Major Breaking Change] The sui::transfer functions of transfer, share_object, and freeze_object have been split into public and private variants. In the past, Sui had a custom verifier rule that ensured a transferred object was either defined in the current module or the object had the store type ability. This behavior was a bit hidden and not amenable to future Move type system improvements.
    To make the behavior more explicit, the normal functions transfer, share_object, and freeze_object can now only be used in the object’s module. To use sui::transfer functions outside of the object’s module, you must use the new public_ variants, i.e. public_transfer, public_share_object, and public_freeze_object.
    To migrate, use sui::transfer::public_* when interacting with objects outside of their module. And when inside their module, use the non-public_ variants. See #9498

Full Changelog: Commits · MystenLabs/sui · GitHub

15 Likes

yes thanks i was wondering why my sui wallet address changes thanks for informing sir

5 Likes

very hard to know but i wil try!

1 Like

:blush: :flushed: I am very happy to be participating in this project. I hope this project will gain more popularity in the future.

1 Like