Skip to content

Commit

Permalink
Update graphql-rpc.mdx (#20872)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

## 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:

---------

Co-authored-by: Ronny Roland <[email protected]>
  • Loading branch information
techdebt-99 and ronny-mysten authored Jan 14, 2025
1 parent 5c2826c commit abde857
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 172 deletions.
7 changes: 3 additions & 4 deletions docs/content/concepts/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ There is a cost associated with everything, and blockchain transactions are no e
To learn more about the tokenomics of Sui, see the following topics:

- [Sui Tokenomics](./tokenomics.mdx)
- [Sui Token](./tokenomics/sui-coin.mdx)
- [Gas in Sui](./tokenomics/gas-in-sui.mdx)
- [Sui Storage Fund](./tokenomics/storage-fund.mdx)
- [Gas Pricing](./tokenomics/gas-pricing.mdx)
- [Staking and Unstaking](./tokenomics/staking-unstaking.mdx)
- [Sui Bridging](./tokenomics/sui-bridging.mdx)

## Delegated proof-of-stake consensus

Expand All @@ -33,8 +34,6 @@ To learn more about consensus on Sui, see the following guides and topics:

- [Validator Committee](guides/operator/validator-committee.mdx)
- [Sui Full Node Data Management](guides/operator/data-management.mdx)



## Sui networks

Expand Down
6 changes: 3 additions & 3 deletions docs/content/concepts/graphql-rpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,6 @@ In addition to rate limits, queries are also validated against a number of rules

## Related links

- [GraphQL quick-start](../guides/developer/getting-started/graphql-rpc.mdx): Querying Sui RPC with GraphQL gets you started using GraphQL to query the Sui RPC for on-chain data.
- [GraphQL migration](../guides/developer/advanced/graphql-migration.mdx): Migrating to GraphQL guides you through migrating Sui RPC projects from JSON-RPC to GraphQL.
- [GraphQL reference](../references/sui-graphql.mdx): Auto-generated GraphQL reference for Sui RPC.
- [Querying Sui RPC with GraphQL](../guides/developer/getting-started/graphql-rpc.mdx): Gets you started using GraphQL to query the Sui RPC for on-chain data.
- [Migrating to GraphQL](../guides/developer/advanced/graphql-migration.mdx): Guides you through migrating Sui RPC projects from JSON-RPC to GraphQL.
- [GraphQL for Sui RPC](../references/sui-graphql.mdx): Auto-generated GraphQL reference for Sui RPC.
118 changes: 102 additions & 16 deletions docs/content/concepts/tokenomics.mdx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/content/concepts/tokenomics/gas-in-sui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A Sui transaction must pay for both the computational cost of execution and the

While computation and storage fees are separate, they are conceptually similar in that they each translate computation or storage into SUI terms by multiplying computation or storage units by the relevant price.

Finally, Sui [Storage mechanics](storage-fund.mdx#storage-fund-rewards) provide storage fee rebates whenever a transaction deletes previously stored objects. Hence, the net fees that a user pays equals gas fees minus the rebates associated with data deletion:
Finally, Sui storage mechanics provide storage fee rebates whenever a transaction deletes previously stored objects. Hence, the net fees that a user pays equals gas fees minus the rebates associated with data deletion:

`net_gas_fees = computation_gas_fee + storage_gas_fee - storage_rebate`

Expand Down Expand Up @@ -56,7 +56,7 @@ Using coarse bucketing accomplishes two important goals:

Similarly, Sui transactions vary depending on the amount of new data written into on-chain storage. The variable storage units capture these differences by mapping the amount of bytes held in storage into storage units. The current Sui schedule is linear and maps each byte into 100 storage units. So, for example, a transaction that stores 25 bytes costs 2,500 storage units, while a transaction that stores 75 bytes costs 7,500 units.

Importantly, in the Sui [Storage Fund](storage-fund.mdx) model users pay up front for the cost of storing data in perpetuity but can also get a partial rebate on previously stored data, if that data is deleted. Hence, the amount of storage fees that you pay can be split into a rebateable and non-rebateable amount. Initially, the rebateable amount equals 99% of the storage fees, while the non-rebateable amount equals the remaining 1%.
Importantly, in the Sui [storage fund](../tokenomics.mdx#storage-fund) model users pay up front for the cost of storing data in perpetuity but can also get a partial rebate on previously stored data, if that data is deleted. Hence, the amount of storage fees that you pay can be split into a rebateable and non-rebateable amount. Initially, the rebateable amount equals 99% of the storage fees, while the non-rebateable amount equals the remaining 1%.

### Gas budgets {#gas-budgets}

Expand Down
50 changes: 0 additions & 50 deletions docs/content/concepts/tokenomics/proof-of-stake.mdx

This file was deleted.

44 changes: 0 additions & 44 deletions docs/content/concepts/tokenomics/storage-fund.mdx

This file was deleted.

17 changes: 0 additions & 17 deletions docs/content/concepts/tokenomics/sui-coin.mdx

This file was deleted.

20 changes: 0 additions & 20 deletions docs/content/concepts/tokenomics/validators-staking.mdx

This file was deleted.

Loading

0 comments on commit abde857

Please sign in to comment.