Skip to content

Releases: MystenLabs/sui

testnet-v1.7.0

09 Aug 01:07
362c5c3
Compare
Choose a tag to compare
testnet-v1.7.0 Pre-release
Pre-release

What's Changed

#12915:
The protocol version is bumped to version 20
Adds the Kiosk Extensions API and a new sui::kiosk_extension module in the Sui Framework.
You can use the API to build custom Kiosk applications to extend the capabilities of the base Kiosk. Beyond simple practices of exposing the &mut UID, the Kiosk Extensions API provides enhanced functionality and guarantees to Kiosk extensions, including:

  1. Isolated storage for each extension that belongs to the extension.
  2. Ability to request permissions to place or lock and place items into a user's kiosk.
  3. Ability to disable/turn off an extension at any time (with owner permissions) while retaining access to its storage.
  4. Ability to remove extensions that don't contain any data.

This update also changes access to the UID:

  1. kiosk::uid_mut is now disabled by default.
  2. kiosk::uid is always available for reads.
  3. kiosk.allow_extensions is set to false by default.

Improved getters:

  1. kiosk::kiosk_owner_cap_for - allows reading the KioskOwnerCap.for field

#13294:
Enables a narwhal_new_leader_election_schedule flag for the new Narwhal leader schedule algorithm, which provides enhanced fault tolerance and sets the bad node stake threshold value. This flag is available for all networks, except Mainnet.

#13112:
When building Move code, new compiler warnings that point to unused function type parameters might appear.

#13267:
The source verification failure warning from package publish and upgrade CLI commands has improved formatting and suggests ways to fix the issue or silence the warning.

#13086:
When building Move code new compiler warnings may appear pointing towards unused struct fields

#13213:
When the order_price and order_quantity are small enough that there is a rounding down of
the balance, a custodian that tries to cancel their limit order leaves a single MIST in their locked_balances.

To resolve this, Sui rounds up to fully remove the locked balance from the account.

#13196:
This PR modifies the CLI keytool as follows:

  • Adds support for json output. Use the --json flag when invoking any keytool command (such as keytool list --json).
  • Changes the default output to the terminal to formatted tables with headers to improve consistency across different commands. Use --json if you need to parse/pipe output data.
  • Removes the following seven commands, which you can replace by calls to the base64 and xxd utilities:
Base64PubKeyToAddress
BytesToBase64
Base64ToBytes
Base64ToHex -> input | base64 -d | xxd -p
BytesToHex
HexToBase64 -> input | xxd -r -p | base64
HexToBytes

#13144:
When building Move code, additional linter warnings related to structs containing fields of type sui::coin::Coin may appear. The goal of this linter is to encourage developers to use fields of type sui::balance::Balance instead as this solution is more space-efficient.

#13090:
With Deepbook, instead of emitting a single event per request to cancel, Sui now emits one large CancelOrders event at the end of the order matching loop, as well as at the end of cancel_all_orders.
This change is motivated by the fact that one can have MoveAborts that occur because there is an emitted event limit on transaction execution. An example error is https://suiexplorer.com/txblock/Ck3g7SJMCVDEgHXHP9jMAU4EDzHQGXkstxqwPiQ2CxgR?network=testnet

MovePrimitiveRuntimeError(MoveLocationOpt(Some(MoveLocation { module: ModuleId { address: 0000000000000000000000000000000000000000000000000000000000000002, name: Identifier("event") }, function: 0, instruction: 0, function_name: Some("emit") }))) in command 0

#13127:
If you used the new linters introduced in PR #12650, you might have seen warnings for the Sui standard library. This update suppresses those warnings.

Full Changelog: https://github.com/MystenLabs/sui/commits/testnet-v1.7.0

devnet-v1.7.0

07 Aug 19:41
362c5c3
Compare
Choose a tag to compare
devnet-v1.7.0 Pre-release
Pre-release

What's Changed

#13294:
Enables a narwhal_new_leader_election_schedule flag for the new Narwhal leader schedule algorithm, which provides enhanced fault tolerance and sets the bad node stake threshold value. This flag is available for all networks, except Mainnet.

#12915:
The protocol version is bumped to version 20
Adds the Kiosk Extensions API and a new sui::kiosk_extension module in the Sui Framework.
You can sue the API to build custom Kiosk applications to extend capabilities of base Kiosk. Beyond simple practices of exposing the &mut UID, the Kiosk Extensions API provides enhanced functionality and guarantees to Kiosk extensions, including:

  1. Isolated storage for each extension that belongs to the extension.
  2. Ability to request permissions to place or lock and place items into a user's kiosk.
  3. Ability to disable / turn off an extension at any time (with owner permissions) while retaining access to its storage.
  4. Ability to remove extensions that don't contain any data.

This update also changes access to the UID:

  1. kiosk::uid_mut is now disabled by default.
  2. kiosk::uid is always available for reads.
  3. kiosk.allow_extensions is set to false by default.

Improved getters:

  1. kiosk::kiosk_owner_cap_for - allows reading the KioskOwnerCap.for field

#13112:
When building Move code, new compiler warnings that point to unused function type parameters might appear.

#13267:
The source verification failure warning from package publish and upgrade CLI commands has improved formatting and suggests ways to fix the issue or silence the warning.

#13086:
When building Move code new compiler warnings may appear pointing towards unused struct fields

#13213:
When the order_price and order_quantity are small enough that there is a rounding down of
the balance, a custodian that tries to cancel their limit order leaves a single MIST in their locked_balances.

To resolve this, Sui rounds up to fully remove the locked balance from the account.

#13196:
This PR modifies the CLI keytool as follows:

  • Adds support for json output. Use the --json flag when invoking any keytool command (such as keytool list --json).
  • Changes the default output to the terminal to formatted tables with headers to improve consistency across different commands. Use --json if you need to parse/pipe output data.
  • Removes the following seven commands, which you can replace by calls to the base64 and xxd utilities:
Base64PubKeyToAddress
BytesToBase64
Base64ToBytes
Base64ToHex -> input | base64 -d | xxd -p
BytesToHex
HexToBase64 -> input | xxd -r -p | base64
HexToBytes

#13144:
When building Move code, additional linter warnings related to structs containing fields of type sui::coin::Coin may appear. The goal of this linter is to encourage developers to use fields of type sui::balance::Balance instead as this solution is more space-efficient.

#13090:
With Deepbook, instead of emitting a single event per request to cancel, Sui now emits one large CancelOrders event at the end of the order matching loop, as well as at the end of cancel_all_orders.
This change is motivated by the fact that one can have MoveAborts that occur because there is an emitted event limit on transaction execution. An example error is https://suiexplorer.com/txblock/Ck3g7SJMCVDEgHXHP9jMAU4EDzHQGXkstxqwPiQ2CxgR?network=testnet

MovePrimitiveRuntimeError(MoveLocationOpt(Some(MoveLocation { module: ModuleId { address: 0000000000000000000000000000000000000000000000000000000000000002, name: Identifier("event") }, function: 0, instruction: 0, function_name: Some("emit") }))) in command 0

#13127:
If you used the new linters introduced in PR #12650, you might have seen warnings for the Sui standard library. This update suppresses those warnings.

Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-v1.7.0

mainnet-v1.6.3

02 Aug 07:01
f4a70c8
Compare
Choose a tag to compare

What's Changed

#13029
When building Move code, additional linter warnings related to implementing a custom transfer/share/freeze functions might appear. These functions are created to enforce a custom transfer/share/freeze policy. If you implement them to work with instances of a type with the store ability results in an unenforceable policy (these type instances can be transferred/shared/frozen using public variants of transfer/share/freeze functions).

#13012
Developers can now selectively suppress linter warnings. Linter warnings now also feature an additional message describing how they can be suppressed. For example, a message could be "This warning can be suppressed with '#[lint_allow(share_owned)]' applied to the 'module' or module member ('const', 'fun', or 'struct')" which would allow suppressing warnings related to potentially attempting to share already owned object to be suppressed with the #[lint_allow(share_owned)] annotation.

#12968
When you run Move unit tests, warnings no longer prevent tests from running. Compilation results print only once for each sui move test command.

#12771
This release adds a new filter, TransactionKindIn, to the queryTransactionBlocks RPC endpoint. The filter accepts a list of TransactionKind and returns a page of transaction blocks that match ANY input TransactionKind. Note that this is now supported only by the indexer, but not supported by Sui Full nodes directly.

#12822
When building Move code, additional linter warnings related to transferring objects to the transaction sender may appear. The goal of this linter is to encourage developers to return object from functions rather than transferring them to the transaction sender in order to increase composability of functions in programmable transaction blocks by allowing callers to directly use the returned object.

Full Changelog: https://github.com/MystenLabs/sui/commits/mainnet-v1.6.3

testnet-v1.6.2

01 Aug 01:20
8459599
Compare
Choose a tag to compare
testnet-v1.6.2 Pre-release
Pre-release

What's Changed

  • #13029
    When building Move code, additional linter warnings related to implementing custom transfer/share/freeze functions might appear. These functions are created to enforce a custom transfer/share/freeze policy. If you implement them to work with instances of a type with the store ability results in an unenforceable policy (these type instances can be transferred/shared/frozen using public variants of transfer/share/freeze functions).

  • #13012
    Developers can now selectively suppress linter warnings. Linter warnings now also feature an additional message describing how they can be suppressed. For example, a message could be "This warning can be suppressed with '#[lint_allow(share_owned)]' applied to the 'module' or module member ('const', 'fun', or 'struct')" which would allow suppressing warnings related to potentially attempting to share already owned object to be suppressed with the '#[lint_allow(share_owned)]' annotation.

  • #12968
    When you run Move unit tests, warnings no longer prevent tests from running. Compilation results print only once for each sui move test command.

  • #12771
    This release adds a new filter, TransactionKindIn, to the queryTransactionBlocks RPC endpoint. The filter accepts a list of TransactionKind and returns a page of transaction blocks that match ANY input TransactionKind. Note that this now supported only by indexer, but not supported by Sui Full nodes directly.

  • #12822
    When building Move code, additional linter warnings related to transferring objects to the transaction sender may appear. The goal of this linter is to encourage developers to return object from functions rather than transferring them to the transaction sender in order to increase composability of functions in programmable transaction blocks by allowing callers to directly use the returned object.

Full Changelog: https://github.com/MystenLabs/sui/commits/testnet-v1.6.2

testnet-v1.6.1

25 Jul 23:42
eac1292
Compare
Choose a tag to compare
testnet-v1.6.1 Pre-release
Pre-release

What's Changed

  • #13146
    Fix a crashing bug in the legacy multi-signature verification code.

Full Changelog: https://github.com/MystenLabs/sui/commits/testnet-v1.6.1

testnet-v1.6.0

25 Jul 03:23
Compare
Choose a tag to compare
testnet-v1.6.0 Pre-release
Pre-release

Highlights

  • #12857
    The protocol version is bumped to 19
    Adds the store ability to the StakedSui object. With the store ability, stake objects can be transferred freely and wrapped in other objects, making it possible to implement liquid staking derivatives. To make staking more atomically composable with other on-chain actions, we also added a new PTB-friendly staking function request_add_stake_non_entry that stakes SUI tokens with a given validator and returns the StakedSui object as the return value. Public getters are added for active validators' addresses and the pool token exchange rate of each validator's staking pool. These additions allow developers to better interact with the staking module in their contract. These changes result from the proposal SIP-6. Please refer to the SIP for more details and motivation around the changes.

  • #13099
    The number of events emitted has been increased from 256 to 1024, and there is now an explicit limit (65536000 bytes**)** on the total size of all events emitted in a PTB. This new limit is backward compatible with previous limits, so old transactions should work.

  • #13029
    When building Move code, additional linter warnings related to implementing a custom transfer/share/freeze functions might appear. These functions are created to enforce a custom transfer/share/freeze policy if you implement them to work with instances of a type with the store ability results in an unenforceable policy (these type instances can be transferred/shared/frozen using public variants of transfer/share/freeze functions).

  • #13012
    Developers can now selectively suppress linter warnings. Linter warnings now feature an additional message describing how they can be suppressed. For example, a message could be "This warning can be suppressed with #[lint_allow(share_owned)] applied to the module or module member (const, fun, or struct)" which would allow suppressing warnings related to potentially attempting to share already owned object to be suppressed with the #[lint_allow(share_owned)] annotation.

  • #12968
    When you run Move unit tests, warnings no longer prevent tests from running. Compilation results print only once for each sui move test command.

  • #12771
    This release adds a new filter, TransactionKindIn, to the queryTransactionBlocks RPC endpoint. The filter accepts a list of TransactionKind and returns a page of transaction blocks that match ANY input TransactionKind. Note that this is now supported only by the indexer, but not supported by Sui Full nodes directly.

  • #12822
    When building Move code, additional linter warnings related to transferring objects to the transaction sender may appear. The goal of this linter is to encourage developers to return objects from functions rather than transferring them to the transaction sender in order to increase the composability of functions in programmable transaction blocks by allowing callers to directly use the returned object.

Full Changelog: https://github.com/MystenLabs/sui/commits/testnet-v1.6.0

devnet-v1.6.0

24 Jul 16:22
6ef84f4
Compare
Choose a tag to compare
devnet-v1.6.0 Pre-release
Pre-release

Highlights

  • #13029
    When building Move code, additional linter warnings related to implementing a custom transfer/share/freeze functions might appear. These functions are created to enforce a custom transfer/share/freeze policy if you implement them to work with instances of a type with the store ability results in an unenforceable policy (these type instances can be transferred/shared/frozen using public variants of transfer/share/freeze functions).

  • #13012
    Developers can now selectively suppress linter warnings. Linter warnings now feature an additional message describing how they can be suppressed. For example, a message could be "This warning can be suppressed with #[lint_allow(share_owned)] applied to the module or module member (const, fun, or struct)" which would allow suppressing warnings related to potentially attempting to share already owned object to be suppressed with the #[lint_allow(share_owned)] annotation.

  • #12968
    When you run Move unit tests, warnings no longer prevent tests from running. Compilation results print only once for each sui move test command.

  • #12771
    This release adds a new filter, TransactionKindIn, to the queryTransactionBlocks RPC endpoint. The filter accepts a list of TransactionKind and returns a page of transaction blocks that match ANY input TransactionKind. Note that this is now supported only by the indexer, but not supported by Sui Full nodes directly.

  • #12822
    When building Move code, additional linter warnings related to transferring objects to the transaction sender may appear. The goal of this linter is to encourage developers to return objects from functions rather than transferring them to the transaction sender in order to increase the composability of functions in programmable transaction blocks by allowing callers to directly use the returned object.

Full Changelog: https://github.com/MystenLabs/sui/commits/devnet-v1.6.0

mainnet-v1.5.0

18 Jul 22:01
cc4ad6d
Compare
Choose a tag to compare

Highlights

  • #12676
    Protocol version v18 update. The minimum budget for gas has changed to be the same as the minimum charge. Before it was possible to provide a budget less than the minimum transaction charge, in which case the transaction was guaranteed to fail for insufficient gas, however, gas coins would still be combined together, when more than one was provided. Effectively it was possible to get a merge operation under the minimum charge. With the current changes a transaction will only be accepted if the budget covers the minimum charges. It is important to point out that any and every transaction that was successful before will still be so with no change in gas. In other words, the breaking nature of this change is only over certain transactions that failed with "insufficient gas" before and now would not be able to enter the system.

  • #12515 #12821
    The kiosk::purchase_with_cap method for Sui Kiosk no longer emits the ItemPurchased event. This update should have minimal impact. If the logic of your application does rely on this event, you must change it to leverage custom events instead.

  • #12276
    Invalid coin_type inputs to coin_api now yield error code -32602 instead of the default -32000 error code, with the error string beginning with Invalid struct type. Similarly, invalid cursors will also yield a -32602 if the provided cursor cannot be found (with language cursor not found) or is not a coin (with language cursor is not a coin). Error language has been modified slightly:

    1. "Invalid Cursor {:?}, Object is not a coin" -> "cursor is not a coin"
    2. "Invalid Cursor {:?}, Object not found" -> "cursor not found"

    This is part of a larger effort to make JSON-RPC errors more actionable, by splitting errors into three error codes: -32602 for any client-facing error, -32000 for noncritical server and catchall errors, and -32603 for critical errors.

  • #12650
    Developers may now opt into running linters when building/testing/publishing/upgrading packages via CLI by specifying the -lint flag.

  • #12648 #12600
    Prior to this change, unwrapped_then_deleted field in TransactionEffects only contain unwrapped then deleted objects that previously existed in the store (i.e. was once unwrapped in its lifetime). If an object was always wrapped since creation and was never unwrapped ever, it wouldn't show up in unwrapped_then_deleted. With this change, we no longer make such a distinction. As long as an object is unwrapped and then deleted in a transaction, it would show up in effect regardless of its history. This simplifies the logic of handling them significantly.
    To properly maintain the state of the system accurately with this change, at the epoch boundary when this upgrade happens, we must re-accumulate the state root hash of all objects in the store. This process takes a few seconds on the mainnet. Testnet can take a much longer time (30s-1min) since it contains significantly more objects. Users may observe a brief slowdown of the network during epoch change when this is applied.

  • #12425
    The compiler features additional warnings for unused private functions and unused (uninstantiated) struct types

Full Changelog: https://github.com/MystenLabs/sui/commits/mainnet-v1.5.0

testnet-v1.5.0

11 Jul 15:39
Compare
Choose a tag to compare
testnet-v1.5.0 Pre-release
Pre-release

Highlights

  • #12676
    Protocol version v18 update. The minimum budget for gas has changed to be the same as the minimum charge. Before it was possible to provide a budget less than the minimum transaction charge, in which case the transaction was guaranteed to fail for insufficient gas, however, gas coins would still be combined together, when more than one was provided. Effectively it was possible to get a merge operation under the minimum charge. With the current changes a transaction will only be accepted if the budget covers for the minimum charges. It is important to point out that any and every transaction that was successful before it will still be so with no change in gas. In other words, the breaking nature of this change is only over certain transactions that failed with "insufficient gas" before and now would not be able to enter the system.

  • #12515 #12821
    The kiosk::purchase_with_cap method for [Sui Kiosk](https://docs.sui.io/build/sui-kiosk) no longer emits the ItemPurchased event. This update should have minimal impact. If the logic of your application does rely on this event, you must change it to leverage custom events instead.

  • #12276
    Invalid coin_type inputs to coin_api now yield error code -32602 instead of the default -32000 error code, with the error string beginning with Invalid struct type. Similarly, invalid cursors will also yield a -32602 if the provided cursor cannot be found (with language cursor not found) or is not a coin (with language cursor is not a coin). Error language has been modified slightly:

    1. "Invalid Cursor {:?}, Object is not a coin" -> "cursor is not a coin"
    2. "Invalid Cursor {:?}, Object not found" -> "cursor not found"

    This is part of a larger effort to make JSON-RPC errors more actionable, by splitting errors into three error codes: -32602 for any client-facing error, -32000 for noncritical server and catchall errors, and -32603 for critical errors.

  • #12650
    Developers may now opt into running linters when building/testing/publishing/upgrading packages via CLI by specifying the -lint flag.

  • #12648 #12600
    Prior to this change, unwrapped_then_deleted field in TransactionEffects only contain unwrapped then deleted objects that previously existed in the store (i.e. was once unwrapped in its lifetime). If an object was always wrapped since creation and was never unwrapped ever, it wouldn't show up in unwrapped_then_deleted. With this change, we no longer make such a distinction. As long as an object is unwrapped and then deleted in a transaction, it would show up in effect regardless of its history. This simplifies the logic of handling them significantly.
    To properly maintain the state of the system accurately with this change, at the epoch boundary when this upgrade happens, we must re-accumulate the state root hash of all objects in the store. This process takes a few seconds on the mainnet. Testnet can take a much longer time (30s-1min) since it contains significantly more objects. Users may observe a brief slowdown of the network during epoch change when this is applied.

  • #12425
    The compiler features additional warnings for unused private functions and unused (uninstantiated) struct types

Full Changelog: https://github.com/MystenLabs/sui/commits/testnet-v1.5.0

mainnet-v1.4.3

08 Jul 00:57
Compare
Choose a tag to compare

What's Changed

  • Limits inflight transactions in client (QuorumDriver).
  • Remove tx entries from pending transaction log once it’s finalized.

Full Changelog: https://github.com/MystenLabs/sui/commits/mainnet-v1.4.3