Releases: MystenLabs/sui
Releases · MystenLabs/sui
devnet-0.32.0
Highlights
- [New Feature] Adding the DeepBook package to the Sui Framework. This will allow Sui programmers to begin building on top of DeepBook.
- [New Feature] This release adds a new secondary index for
getBalances/Coins
family endpoints to improve query efficiency. To serve the data correctly, the full node must be wiped the DB and re-sync from Genesis to re-populate the index. We are working on snapshot restoration for secondary indices to help with this process. - [New Feature] This release adds two names service-related RPC methods:
resolveNameSpaceAddress
andresolveNameServiceNames
. TheresolveNameSpaceAddress
method takes in a nameString
and returns the mappedSuiAddress
. TheresolveNameServiceNames
method takes aSuiAddress
and returns aPage
of names. It currently returns only a primary name in this release. - [Update] New cost table for computation gas charges will be enabled in protocol version 5. Transactions may see larger computation charges due to this change.
Full log
devnet-0.31.0
HighLights
- [JSONRPC Major Breaking Change] - We have replaced all uint64 and uint128 numbers with BigInt in all jsonrpc responses to preserve precision. This is a major breaking change, please update TS-SDK and Rust SDK to the latest version. #10129
- [Major Breaking Change] This release introduces some changes to how Sui calculates gas charges. For details see Gas Changes
- [New Feature] You can now upgrade Move packages using the Sui Client CLI command
sui client upgrade
. Read how to use it in our docs. - [Minor breaking change] - The format of proofs used by module
sui::ecvrf
were modified (see related crypto code in MystenLabs/fastcrypto#542, #10332). - [Minor breaking change] - The display field of
SuiObjectData
was replaced by aSuiDisplayFieldResponse
that has data and an error field to return the best effort rendition of display. (see related code in #10321) - [Minor breaking change] - syntax and semantic changes of
getOwnedObjects
- The syntax change simplifies the type of
cursor
argument fromOption<CheckpointedObjectID>
toOption<ObjectID>
, which also simplifies the type ofnextCursor
in the returnedObjectPage
the same way. - The semantic change is that
getOwnedObjects
now returns all latest object changes, including objects changes that are not yet included in a checkpoint. As a result, iteratingObjectPage
s viagetOwnedObjects
might return object data from “objects snapshot” across different checkpoints. This is especially notable for addresses with many, and constantly changing, objects. If you still want to read owned objects from “objects snapshot” at certain checkpoints like the latest checkpoint, useQueryObjects
with a checkpoint query instead. (See related code in #10275)
- The syntax change simplifies the type of
- [Performance improvement] - Offloading jsonrpc request to Tokio blocking thread to prevent slow request from blocking other requests #10438
Full log
https://github.com/MystenLabs/sui/commits/devnet-0.31.0
https://github.com/MystenLabs/sui/commits/devnet-0.30.0
devnet-0.29.0
Highlights
- [Major breaking change] -
SuiAddress
andObjectID
are now 32 bytes long instead of 20 bytes (in hex, the len increases from 40 to 64). If your software interacts with anyObjectID
andSuiAddress
, 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 nowentry
) - [Major breaking change] -
SuiAddress
is now calculated as the first 32 bytes of the Blake2b hash offlag || 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 address0x6
and useClock::timestamp_ms(&Clock)
to read the timestamp. You should always reference theClock
object withObjectArg::SharedObject::mutable
set tofalse
. 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, callTxContext::epoch_timestamp
. The current epoch number is also available viaTxContext::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: https://examples.sui.io/basics/display.html. 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
andelliptic_curve
from the Sui Framework. https://github.com/MystenLabs/sui/pull/8660/files - [Breaking change] -
ecdsa_k1::ecrecover
andecdsa_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
withSuiTransaction
inSuiTransactionResponse
. This is because validators can no longer guarantee to return a transaction certificate. This release also unifiesSuiTransactionResponse
andSuiExecuteTransactionResponse
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 toTransactionData
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 theexpiration 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 thepending_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 theClock
object, allowing Sui Move smart contracts to read up-to-date timestamps from the blockchain. - [Major breaking change] - This release replaces the
sui_getValidators
andsui_getSuiSystemState
functions with a newsui_getLatestSuiSystemState
function. The new function returns a flattened type that contains all information from the latest SuiSystemState object on-chain with typeSuiSystemStateSummary
. It also contains a vector of typeSuiValidatorSummary
that summarizes information from each validator, including: metadata, staking pool, and other data. The release also adds ap2p_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 theSuiTransactionResponse
returned bysui_getTransaction
andsui_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](https://docs.sui.io/build/prog-trans-ts-sdk).
- [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 inTransactionData
fromgas_payment: ObjectRef
togas_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 theObjectID
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 typeSuiObjectDataOptions
to control which fields the endpoint retrieves. By default, the endpoint retrieves only object references unless the client request explicitly specifies other data, such astype
,owner
, orbcs
. To learn more, see (#8817) - [Major API breaking change] The previous
sui_getObjectsOwnedByAddress
has been renamed tosui_getOwnedObjects
. In addition the response has been standardized across the object related APIs to returnSuiObjectResponse
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
UID
s in Sui Move code has been rewritten and flipped. New objects must now get “fresh”UID
s created in the function where the object is made, but when the object’s struct destroyed, theUID
can be stored as if the object was wrapped (but without it's contents). In contrast, the previous rules stated that theUID
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 aBag
orTable
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_getT...
devnet-0.27.0
Highlights
- Sui now accepts weighted multi-scheme Multisig signatures. [enum GenericSignature] replaces all [enum Signature] for user signature verification logic. The [Sui Keytool](https://docs.sui.io/devnet/build/json-rpc#sign-a-transaction-using-the-sui-keytool) command supports 1) Generating Multisig addresses 2) Combining a single signature into a Multisig.
- [Sponsored Transaction](#8273)
- Breaking Change - You can now use a different account than the account used for a transaction to pay gas fees for a transaction.
TransactionData
now containsGasData
to consolidate gas-related info, includinggas_owner
. Whengas_owner
is different from the transaction sender, the transaction is a Sponsored Transaction.SenderSignedData
now contains a list of user signatures. A Sponsored transaction must include both the sender’s and the sponsor’s signatures. Duplicated or third-party signatures are not valid. The order of signatures does not matter.- No
Sui
transactions, such asPaySui
,PayAllSui
,TransferSui
can be sponsored transactions because they involve transferring thegas
object. - The Transaction execution APIs now take a list of signatures.
- Breaking Change - You can now use a different account than the account used for a transaction to pay gas fees for a transaction.
- RPC Data Structure changes
TransactionEffects
now contain anexecuted_epoch
field that indicates which epoch this transaction was executed in.TransactionEffects
now contain anunwrapped_then_deleted
field that containsObjectRefs
that are deleted from the wrapped state. These objects are no longer accounted for within thedeleted
field.TransactionResponse
, the response when you call theget_transaction
RPC interface, now contains acheckpoint
field that indicates which checkpoint includes the transaction.
- Bugfix for Source Verification on Publish which was incorrectly suggested that dependencies on-chain differed from dependencies built from source (move-language/move#904)
Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-0.27.0
devnet-0.26.0
HIghlights
- Sui Move now limits the number of object IDs you can create
object::new()
, deleteobject::delete(*)
, or transfertransfer::transfer(*)
to2048
per transaction that involves Move calls. For more information, see: #8170 - #8189 changes the layout of
CommitteeInfo
,CheckpointSummary
, andSuiSystemState
. This change requires all Full nodes to upgrade to this release, v0.26.0. App builders must also rebuild using the most recent version of the Sui SDK. - #7991 adds a new mutable field to SharedObjectRefs. The mutable flag controls whether transaction acquires shared lock for write or for read. Transactions that take immutable SharedObjectRefs can execute in parallel resulting in a lower contention on the shared object and lower finality time for transaction.
Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-0.26.0
devnet-0.25.0
Highlights
- A valid Secp256k1 signature now uses a non-recoverable (64 bytes) instead of a recoverable (65 bytes). Sui SDKs now sign transactions with the new 64 bytes signature with Sui release v0.25.0. If you create a Secp256k1 signature outside of Sui, remove the recovery ID to create a 64-byte signature. For more information, see: #7423
- Restored verification of test code when you run unit tests locally (
sui move test
). - The
--verify-dependencies
flag was removed fromsui client publish
command. Dependency verification is now the default behavior effective with Sui release 0.24. You can disable dependency verification with the--skip-dependency-verification
flag, see #7633. - Breaking change -
SuiExecuteTransactionResponse
is now astruct
and not anenum
. See #7468 for more information. - The Digest display formats are standardized to base58. This includes the following:
ObjectDigest
,TransactionDigest
,TransactionEffectsDigest
,CheckpointDigest
,CheckpointContentsDigest
- There is now a 256 limit on the number of events that a Move transaction emits. The limit is defined in
crates/sui-protocol-constants/src/lib.rs::MAX_NUM_EVENT_EMIT
. For more information, see #7804. - TypeScript
- Added support for calling a Move function with the
option
parameter. For more information, see #8058. - Breaking change - Renamed the
getDelegatedStakes
operation togetDelegatedStake
. For more information, see #8058. - Breaking change - Removed the
getObjectsOwneByObject
operation. Instead, usegetDynamicFields
. For more information, see #8138.
- Added support for calling a Move function with the
Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-0.25.0
devnet-0.24.0
Highlights
- The
sui client publish
command in the Sui Client CLI now verifies dependencies by default. This release deprecates the--verify-dependencies
flag, which is set for removal in the next major release. You can use the--skip-dependency-verification
flag to skip dependency verification. See #7632 for more information. - In Move Call transactions, you no longer need to specify their package parameter as an
ObjectRef
(ID, version, digest). Instead, specify just itsObjectID
. See #7597 for more information. - [Breaking changes] The two
devInspect
APIs are now merged into a single API. The new API allows for general transaction payloads, but does not require a gas coin (or other gas parameters). See #7372 for more information. - Bugfixes:
- TypeScript:
- Allow passing PureArg types directly in Move call #7765.
- Modify gas selection logic to take gas price into account #7916. Previously the gas selection algorithm selected coins with amount greater than the gas budget (gas price was always one). There is now a variable gas price, so the threshold is
gas budget * gas price
.
Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-0.24.0
devnet-0.23.0
Highlights
- Reconfiguration, stake delegation, voting power, and staking rewards are active! Most of these have worked since v0.22.0, but we did not advertise this functionality. Here are the basics:
- Epoch changes occur every ~2.5 hours
- At each epoch change, pending staking and un-staking actions take effect, staking rewards are distributed, and validator voting power is recomputed. All stake-related
entry
functions live in the sui_system module, and the Sui wallet also supports staking and un-staking. - By convention, total validator voting power is always 10,000, and the quorum threshold is always 6,667. This means that individual voting powers can easily be interpreted as percentages (e.g., voting power 500 = 0.5%).
- Validator voting power is proportional to the stake, with one exception: voting power of individual voting power is capped at 1,000 (i.e., 10%) if possible. This will always be the case in a realistic Sui system, but in the 4-validator devnet we will clearly need at least one validator over the cap :).
- We introduced several new libraries for testing Move code:
- test_utils, which has helpful functions for asserting equality (you’ll see both values when the assertion fails!) and debug printing: (example:
test_utils::print(b”we here”)
) - test_random, which exposes a seeded pseudorandom number generator for creating test values of various types. This makes it easier to exercise a variety of different test inputs, or even write a mini-fuzzer(#7574) (we have some ideas on first-class fuzzing support in Move tests—stay tuned :)).
- test_utils, which has helpful functions for asserting equality (you’ll see both values when the assertion fails!) and debug printing: (example:
- Checkpoints now have a unix timestamp in the CheckpointSummary. This can be accessed along with other checkpoint fields via sui_getCheckpointSummary
- Epoch have epoch start unix time stamp, also accessible in Move smart contracts via the following function. This is an important step toward the long-awaited feature of fine-grained time access in Move, which is coming soon!
- New flag (
--with-unpublished-dependencies
) forsui client publish
andsui move build
to simplify set-up after wipes by enabling packages to be published even if they have unpublished dependencies, by bundling the modules in those dependencies into the package. #7426 - Add methods for the CoinRead endpoints #7507
- Fix websocket default port for DevNet #7637
Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-0.23.0
devnet-0.22.0
Highlights
- Events are now emitted during staking operations and epoch changes. #7342 #7228
- Added dynamic field support to Sui CLI, users can now use
sui client dynamic-field <object id>
to view dynamic fields of an object. #7151 - A bug fix to allow optional move input via SuiJson. #7118
- Added an additional parameter to configure the epoch for dev-inspect. Expect more changes to this API endpoint. #7209
- Introduce Publisher module which acts as a proof of publishing. #7196
- Added toast messages/notifications for wallet. Sdk-ts fix FaucetResponse type. #7272
- Wallet adapters now notify dapps when wallet disconnects. #7258
- Added validator types,
getDelegatedStake
, andgetValidators
.#7389 - Enable staking and unstaking on the wallet. #7403
Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-0.22.0
devnet-0.21.0
Highlights
sui_executeTransaction
now requires the client to be responsible to serializeflag || signature || pubkey
in one field and submit in thesignature
field. See #7185 for details.- Wallet keystore now only stores
flag || privkey
instead offlag || privkey || pubkey
. See #6989 for details. - Added
sui::vec_map::key
function to return a vec map’s keys in avector
. #7051 - Allow entry functions and module initializers to accept a
&TxContext
instead of&mut TxContext
if they only need to read from the context. #7043 WalletKit
moved into a core, framework-agnostic package. #6950- Objects that were created but never existed in storage (started off wrapped, and then deleted) no longer show up in the effects of the transaction that deleted them. #7174
std::vector::insert<Element>(&mut vector<T>, Element, u64)
added to the Move standard library.std::debug::print<T>(&T)
now has special-casing for printing ofstd:::ascii::string
.
Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-0.21.0