Skip to content

Commit

Permalink
[docs] Remove move book topics (#21295)
Browse files Browse the repository at this point in the history
## Description 

Deletes the dynamic field topics that are part of the move book and
updates linking. Also fixes a recent change that killed the landing
pages pillbox descriptions. Lastly, cleans up the concepts page
pillboxes.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
ronny-mysten authored Feb 20, 2025
1 parent c3cf8fb commit 95b3ae7
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 34 deletions.
12 changes: 7 additions & 5 deletions docs/content/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ Sui is different than other blockchains. The concepts explored in this section p
## Move

<Cards>
<Card title="Move overview" href="concepts/sui-move-concepts"/>
<Card title="Package upgrades" href="concepts/sui-move-concepts/packages/upgrade"/>
<Card title="Move overview" href="/concepts/sui-move-concepts"/>
<Card title="Package upgrades" href="/concepts/sui-move-concepts/packages/upgrade"/>
<Card title="The Move Book" href="https://move-book.com">
A comprehensive guide to the Move programming language on the Sui blockchain.
</Card>
</Cards>

## Objects

<Cards>
<Card title="Object Model" href="concepts/object-model"/>
<Card title="Dynamic Fields" href="concepts/dynamic-fields"/>
<Card title="Transfer to Object" href="concepts/transfers/transfer-to-object"/>
</Cards>

Expand All @@ -30,7 +32,7 @@ Sui is different than other blockchains. The concepts explored in this section p
## Tokenomics

<Cards>
<Card title="SUI token" href="concepts/tokenomics/sui-coin" />
<Card title="SUI tokenomics" href="concepts/tokenomics" />
<Card title="Gas in Sui" href="concepts/tokenomics/gas-in-sui" />
<Card title="Storage fund" href="concepts/tokenomics/storage-fund" />
<Card title="Vesting strategies" href="concepts/tokenomics/vesting-strategies" />
</Cards>
7 changes: 7 additions & 0 deletions docs/content/concepts/dynamic-fields.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
---
title: Dynamic (Object) Fields
description: Dynamic fields and dynamic object fields on Sui are added and removed dynamically, affect gas only when accessed, and store heterogeneous values.
draft: true
---

:::warning

This topic is now covered in [The Move Book](https://move-book.com/programmability/dynamic-collections.html). Update your bookmarks to the new location as this page will be deleted soon and without further notice.

:::

There are various ways to use object fields to store primitive data and other objects (wrapping), but there are a few limitations to these:

1. Object's have a finite set of fields keyed by identifiers that are fixed when you publish its module (limited to the fields in the `struct` declaration).
Expand Down
7 changes: 7 additions & 0 deletions docs/content/concepts/dynamic-fields/tables-bags.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
---
title: Table and Bag
description: Sui provides `Table` and `Bag` collections built using dynamic fields, but with additional support to count the number of entries they contain to protect against accidental deletion when non-empty.
draft: true
---

:::warning

This topic is now covered in [The Move Book](https://move-book.com/programmability/dynamic-fields.html). Update your bookmarks to the new location as this page will be deleted soon and without further notice.

:::

You can extend existing objects using [dynamic fields](../dynamic-fields.mdx). Note that it's possible to delete an object that still has (potentially non-drop) dynamic fields. This might not be a concern when adding a small number of statically known additional fields to an object, but is particularly undesirable for on-chain collection types that could be holding unboundedly many key-value pairs as dynamic fields.

This topic describes two such collections -- Table and Bag -- built using dynamic fields, but with additional support to count the number of entries they contain, and protect against accidental deletion when non-empty.
Expand Down
4 changes: 3 additions & 1 deletion docs/content/concepts/object-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ Select a network from the following tabs to see the currently configured limits
- [Object and Package Versioning](./versioning.mdx): Versioning provides the ability to upgrade packages and objects on the Sui network.
- [Object Ownership](./object-ownership.mdx): Every object has an owner field that dictates how you can use it in transactions.
- [`sui-protocol-config`](https://github.com/MystenLabs/sui/blob/main/crates/sui-protocol-config/src/lib.rs): Crate that defines the `ProtocolConfig` struct with limit definitions.
- [Building against Limits](https://move-book.com/guides/building-against-limits.html): The Move Book provides a concise overview for limits most projects deal with.
- [Building against Limits](https://move-book.com/guides/building-against-limits.html): The Move Book provides a concise overview for limits most projects deal with.
- [The Move Book](https://move-book.com/): A comprehensive guide to the Move programming language used on the Sui network.
- [The Move Reference](https://move-book.com/reference/): Reference guide for the Move language.
6 changes: 0 additions & 6 deletions docs/content/concepts/object-ownership.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ An address-owned object is owned by a specific 32-byte address that is either an

Go to [Address-Owned Objects](./object-ownership/address-owned.mdx).

## Dynamic fields

Dynamic fields and dynamic object fields on Sui are added and removed dynamically, affect gas only when accessed, and store heterogeneous values.

Go to [Dynamic (Object) Fields](./dynamic-fields.mdx).

## Immutable

An immutable object is an object that can't be mutated, transferred, or deleted. Immutable objects have no owner, so anyone can use them.
Expand Down
1 change: 1 addition & 0 deletions docs/content/concepts/tokenomics/vesting-strategies.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Token Vesting Strategies
description: If you plan to launch a token on Sui, then you might consider implementing a vesting strategy to strengthen the long-term outlook of your token.
---

If you plan to launch a token on Sui, then you might consider implementing a vesting strategy to strengthen the long-term outlook of your token. A vesting strategy typically releases your tokens to team members, investors, or other early stakeholders over time, rather than releasing them all at once.
Expand Down
4 changes: 2 additions & 2 deletions docs/content/guides/developer/app-examples/reviews-rating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public fun register_service(db: &mut Dashboard, service_id: ID) {

A `Dashboard` is a [shared object](../../../concepts/object-ownership/shared.mdx), so any service owner can register their service to a dashboard.
A service owner should look for dashboards that best match their service attribute and register.
A [dynamic field](../../../concepts/dynamic-fields.mdx) stores the list of services that are registered to a dashboard.
A dynamic field stores the list of services that are registered to a dashboard. Learn more about dynamic fields in [The Move Book](https://move-book.com/programmability/dynamic-fields.html).
A service may be registered to multiple dashboards at the same time. For example, a Chinese-Italian fusion restaurant may be registered to both the Chinese and Italian dashboards.

:::info
Expand Down Expand Up @@ -179,7 +179,7 @@ In other words, anyone can go to a transaction explorer and find a review object

:::info

See [Table and Bag](../../../concepts/dynamic-fields/tables-bags.mdx) for more information on the differences between `Table` and `ObjectTable`.
See [Dynamic Collections](https://move-book.com/programmability/dynamic-collections.html) in The Move Book for more information on the differences between `Table` and `ObjectTable`.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/content/guides/developer/app-examples/tic-tac-toe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The guide is divided into three parts that each cover a different implementation
- **Owned objects:** The guide teaches you how to use [owned objects](../../../concepts/object-ownership/address-owned.mdx), in this case to act as the game board in the centralized and multisig version of tic-tac-toe. Owned objects are objects that are owned by a single account and can only be modified by that account. In this case, the game board is owned by a game admin, who is responsible for updating the board with each player's move.
- **Shared objects:** The guide teaches you how to use [shared objects](../../../concepts/object-ownership/shared.mdx), in this case to act as the game board in the more decentralized version of tic-tac-toe. Shared objects are objects that can be modified by multiple accounts. In this case, the game board is shared between the two players, allowing them to update the board directly.
- **Multisig accounts:** The guide teaches you how to use [multisig accounts](https://sdk.mystenlabs.com/typescript/cryptography/multisig) to share ownership of the game board between two players. Multisig accounts are accounts that require a certain threshold of signatures to authorize a transaction. In this case, the game board is owned by a 1-of-2 multisig account.
- **Dynamic object fields:** The guide teaches you how to use [dynamic object fields](../../../concepts/dynamic-fields.mdx), in this case to transfer the actions of the players to the game board, which will be retrieved by the game admin.
- **Dynamic object fields:** The guide teaches you how to use dynamic object fields, in this case to transfer the actions of the players to the game board, which will be retrieved by the game admin. See [The Move Book](https://move-book.com/programmability/dynamic-object-fields.html) to learn more about dynamic object fields.

## What you need

Expand Down
4 changes: 2 additions & 2 deletions docs/content/guides/developer/app-examples/weather-oracle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ fun init(otw: WEATHER, ctx: &mut TxContext) {

- The first struct, `AdminCap`, is a capability.
- The second struct, `WEATHER`, is a one-time witness that ensures only a single instance of this `Weather` ever exists. See [One Time Witness](https://move-book.com/programmability/one-time-witness.html) in The Move Book for more information.
- The `WeatherOracle` struct works as a registry and stores the `geoname_id`s of the `CityWeatherOracle`s as [dynamic fields](concepts/dynamic-fields.mdx).
- The `WeatherOracle` struct works as a registry and stores the `geoname_id`s of the `CityWeatherOracle`s as dynamic fields. See [The Move Book](https://move-book.com/programmability/dynamic-fields.html) to learn more about dynamic fields.
- The `init` function creates and sends the `Publisher` and `AdminCap` objects to the sender. Also, it creates a [shared object](concepts/object-ownership/shared.mdx) for all the `CityWeatherOracle`s. See [Module Initializer](https://move-book.com/programmability/module-initializer.html) in The Move Book for more information.

So far, you've set up the data structures within the module.
Now, create a function that initializes a `CityWeatherOracle` and adds it as [dynamic fields](concepts/dynamic-fields.mdx) to the `WeatherOracle` object:
Now, create a function that initializes a `CityWeatherOracle` and adds it as dynamic fields to the `WeatherOracle` object:

```rust title='weather.move'
public fun add_city(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ fragment MoveValueFields on MoveValue {

## Fetching all dynamic fields on an object

This query can be used to paginate over the dynamic fields of an object. This works even when the object in question is [wrapped](../../../concepts/object-ownership/wrapped.mdx), by using the <a href="/references/sui-api/sui-graphql/reference/queries/owner" data-noBrokenLinkCheck='true'>owner</a> query, so can be used for iterating over the elements of on-chain data structures, like [Tables and Bags](../../../concepts/dynamic-fields/tables-bags.mdx).
This query can be used to paginate over the dynamic fields of an object. This works even when the object in question is [wrapped](../../../concepts/object-ownership/wrapped.mdx), by using the <a href="/references/sui-api/sui-graphql/reference/queries/owner" data-noBrokenLinkCheck='true'>owner</a> query, so can be used for iterating over the elements of on-chain data structures, like tables and bags. See [The Move Book](https://move-book.com/programmability/dynamic-collections.html) to learn more about dynamic collections available in Move.

:::info
This example uses [fragments](../../../concepts/graphql-rpc.mdx#fragments) and [variables](../../../concepts/graphql-rpc.mdx#variables).
Expand Down
1 change: 1 addition & 0 deletions docs/content/guides/operator/bridge-node-configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Sui Bridge Validator Node Configuration
sidebar_label: Sui Bridge Node Configuration
description: Correct configuration of your node ensures optimal performance and valid metrics data.
---

Running a Bridge Validator Node (Bridge Node) requires registering your node with the bridge committee. Correct configuration of your node ensures optimal performance and valid metrics data. Follow this topic to make sure your Bridge Node is set up properly.
Expand Down
9 changes: 0 additions & 9 deletions docs/content/sidebars/concepts.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ const concepts = [
'concepts/object-ownership/wrapped',
],
},
{
type: 'category',
label: 'Dynamic Fields',
link: {
type: 'doc',
id: 'concepts/dynamic-fields',
},
items: ['concepts/dynamic-fields/tables-bags'],
},
{
type: 'category',
label: 'Transfers',
Expand Down
2 changes: 1 addition & 1 deletion docs/content/standards/kiosk-apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Use the `can_place<Ext>(kiosk: &Kiosk): bool` function to check if the app has t

## App storage

Every app gets its isolated storage as a [bag type](../concepts/dynamic-fields/tables-bags.mdx) that only the app module can access (providing the app witness). After you install an app, it can use the storage to store its data. Ideally, the storage should be managed in a way that allows the app to be removed from the kiosk if there are no active trades or other activities happening at the moment.
Every app gets its isolated storage as a bag type that only the app module can access (providing the app witness). See [The Move Book](https://move-book.com/programmability/dynamic-collections.html) to learn more about dynamic collections, like bags, available in Move. After you install an app, it can use the storage to store its data. Ideally, the storage should be managed in a way that allows the app to be removed from the kiosk if there are no active trades or other activities happening at the moment.

The storage is always available to the app if it is installed. The owner of a kiosk can't access the storage of the app if the logic for it is not implemented.

Expand Down
12 changes: 6 additions & 6 deletions docs/site/src/components/Cards/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

import React, { useEffect, useState, useContext } from "react";
import React, { useEffect, useState } from "react";
import { useHistory } from "@docusaurus/router";
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import {usePluginData} from '@docusaurus/useGlobalData';
import { usePluginData } from "@docusaurus/useGlobalData";
import styles from "./styles.module.css";

export function Card(props) {
Expand All @@ -20,8 +19,8 @@ export function Card(props) {

const { descriptions } = usePluginData("sui-description-plugin");
let h = props.href;
if (h.match(/^\//)) {
h = h.substring(1);
if (!h.match(/^\//)) {
h = `/${h}`;
}
const d = descriptions.find((desc) => desc["id"] === h);
let description = "";
Expand Down Expand Up @@ -51,7 +50,8 @@ export function Card(props) {
}

export function Cards({ children, ...props }) {
let twClassList = "grid-card gap-8 grid xl:grid-rows-${Math.ceil(children.length/3)} lg:grid-rows-${Math.ceil(children.length/2)} xl:grid-cols-3 lg:grid-cols-2 justify-start pb-8";
let twClassList =
"grid-card gap-8 grid xl:grid-rows-${Math.ceil(children.length/3)} lg:grid-rows-${Math.ceil(children.length/2)} xl:grid-cols-3 lg:grid-cols-2 justify-start pb-8";
return (
<div className={twClassList} {...props}>
{children}
Expand Down

0 comments on commit 95b3ae7

Please sign in to comment.