Skip to content

Commit

Permalink
[Soroban Merge] Create a "Reference" section (stellar#364)
Browse files Browse the repository at this point in the history
* Add release notes (stellar#232)

* Update Examples, SDK and CLI v0.2.1

* Pin docker image

* Add release notes

* preview 3 start

* fix

* fix nums

* link

* FutureNet => Futurenet

* add core and horizon versions

* Revert "Add release notes (stellar#232)" (stellar#233)

This reverts commit 1823544.

* Add release notes (stellar#234)

* Update version of SDK (stellar#236)

* Update versions of software (stellar#240)

* Remove "Preview" from releases page title

* Update chanelogs

* Update soroban-rpc version

* Update Friendbot version

* updated quickstart image sha (stellar#241)

* Add changelog notes about XDR

* Add changelog notes about env

* Add other changelogs

* Add contributors

* Next Release Dev Branch (stellar#231)

* Fix links to contributors

* Add js-stellar-base and js-soroban-client versions to release notes (stellar#242)

* Reorder the nav bar (stellar#244)

* Update Examples, SDK and CLI v0.2.1

* Pin docker image

* Add release notes (stellar#234)

* Rename and move releases page

* reorder EVERYTHING

* reorder Learn between Examples and SDKs

* update wallet position

Co-authored-by: Leigh McCulloch <[email protected]>

* Update the release notes (stellar#246)

* Update the release notes

* Update docs/releases.mdx

Co-authored-by: Leigh McCulloch <[email protected]>

* Update release versions for upcoming release (stellar#259)

* initial ver

* update

* update

* update

* Update release page

* Support arm64 images in docs for quickstart (stellar#274)

* update all admonitions such that prettier doesn't yell

* Lots of formatting

* Reorg (stellar#290)

* Change SDK section to Reference section

* Adding JS SDK to list of SDKs

* Adding Overcat's Python SDK to list of SDKs

* Moving Networks -> Futurenet to Reference section

* Moving Releases to Reference section

* Delete Networks from main nav

Networks now lives under Reference section

* Deleting as Releases now live in Reference section

* Changing sidebar position

Temporary, this will eventually move to How-To Guides

* Update byo.mdx

* Edited Quick Start to 1. Hello World

Includes Tutorials -> Create a Project / Write a Contract / Test / Build / Run on Sandbox / Optimizing Builds

* Move Storing Data from Examples to Getting Started

* Move Deploy to Local Network to Getting Started

Moved this section from Tutorials to Getting Started

* Move Freighter wallet tutorial to Getting Started

* Update and rename 6.-connect-Freighter-wallet.mdx to 4. Connect Freighter Wallet

* Move Deploy to Futurenet to Getting Started

* Rename 4. Connect Freighter Wallet to 4. Connect Freighter Wallet.mdx

* Moved to Getting Started

* Moved to Getting Started

Removing this section

* Moved to Getting Started

Removing this as it has been moved to Getting Started

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started

Removing due to this section being moved

* Update Examples to How-To Guides

* Move BYO SDK to How-To Guides

* Moved to How-To Guides

* Moved invoking contracts with transactions to How-To Guides

* Removing because it's moved to How-To Guides

* Moved Token Interface to Token How-To Guide

* Remove Token Interface

Token Interface has been moved to How-To Guides -> Token

* Move Stellar Asset Contract to How-To Guides

* Delete docs/built-in-contracts directory

Moved to How-To Guides

* Move Stellar FAQs to Learn

* Delete faq.mdx

Moved to Learn

* Update authorization.mdx

Alphabetize sidebar

* Update contract-lifecycle.mdx

Alphabetizing sidebar

* Update custom-types.mdx

Alphabetizing sidebar

* Update rust-dialect.mdx

Alphabetizing sidebar

* Update debugging.mdx

Alphabetizing sidebar

* Update environment-concepts.mdx

Alphabetizing sidebar

* Update errors.mdx

Alphabetizing sidebar

* Update events.mdx

Alphabetizing sidebar

* Update gas-and-metering.mdx

Alphabetizing sidebar

* Update interacting-with-contracts.mdx

Alphabetizing sidebar

* Update persisting-data.mdx

Alphabetizing sidebar

* Update high-level-overview.mdx

Update spelling

* formatting

* formatting

* formatting

* formatting

* Update faq.mdx

* fixed broken links

* fix broken links

* fix broken links

* moar link fixes

* fixed some broken links

* added sorobanathon homepage

* add google tag manager

* Content edits made

* back to original

* Content Edit

* button location

* Content & Eligibility guidelines added

* Update sorobanathon.js

* update all admonitions such that prettier doesn't yell

* Lots of formatting

* --prose-wrap preserve

* Update releases.mdx

* update prettier

* fixed the callouts

* formatting

* fix module import

* Update sorobanathon.js

* Fixed Reorg PR

Fixed links, moved sections, deleted double sections

* Update index.js

* Updating Sorobanathon Info

* Fixed links

Many links.

* Formatting

* Change SDK section to Reference section

* Adding JS SDK to list of SDKs

* Adding Overcat's Python SDK to list of SDKs

* Moving Networks -> Futurenet to Reference section

* Moving Releases to Reference section

* Delete Networks from main nav

Networks now lives under Reference section

* Deleting as Releases now live in Reference section

* Changing sidebar position

Temporary, this will eventually move to How-To Guides

* Update byo.mdx

* formatting

* fix broken links

* Edited Quick Start to 1. Hello World

Includes Tutorials -> Create a Project / Write a Contract / Test / Build / Run on Sandbox / Optimizing Builds

* Move Storing Data from Examples to Getting Started

* Move Deploy to Local Network to Getting Started

Moved this section from Tutorials to Getting Started

* Move Freighter wallet tutorial to Getting Started

* Update and rename 6.-connect-Freighter-wallet.mdx to 4. Connect Freighter Wallet

* Move Deploy to Futurenet to Getting Started

* Rename 4. Connect Freighter Wallet to 4. Connect Freighter Wallet.mdx

* Moved to Getting Started

Removing this as it has been moved to Getting Started

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* formatting

* fix broken links

* moar link fixes

* Update Examples to How-To Guides

* Move BYO SDK to How-To Guides

* Moved invoking contracts with transactions to How-To Guides

* Moved Token Interface to Token How-To Guide

* Remove Token Interface

Token Interface has been moved to How-To Guides -> Token

* Move Stellar Asset Contract to How-To Guides

* Delete docs/built-in-contracts directory

Moved to How-To Guides

* formatting

* fixed broken links

* Move Stellar FAQs to Learn

* Update authorization.mdx

Alphabetize sidebar

* Update contract-lifecycle.mdx

Alphabetizing sidebar

* Update custom-types.mdx

Alphabetizing sidebar

* Update rust-dialect.mdx

Alphabetizing sidebar

* Update debugging.mdx

Alphabetizing sidebar

* Update environment-concepts.mdx

Alphabetizing sidebar

* Update errors.mdx

Alphabetizing sidebar

* Update events.mdx

Alphabetizing sidebar

* Update gas-and-metering.mdx

Alphabetizing sidebar

* Update interacting-with-contracts.mdx

Alphabetizing sidebar

* Update persisting-data.mdx

Alphabetizing sidebar

* Update high-level-overview.mdx

Update spelling

* formatting

* Update faq.mdx

* fixed some broken links

* Update releases.mdx

* update prettier

* fixed the callouts

* formatting

* fix module import

* Fixed Reorg PR

Fixed links, moved sections, deleted double sections

* Fixed links

Many links.

* Formatting

* Merge cleanup

* More cleanup

* Formatting

* some small design tweaks

* copy tweaks

---------

Co-authored-by: Bri <[email protected]>
Co-authored-by: Anuxhya <[email protected]>

* Pre mainnet restructure (stellar#644)

* docs: rename "fundamentals and concepts" to "soroban internals"

* docs: remove old "under the hood" section

* docs: add tags to the various tutorials

* docs: move tutorials into one main directory

* fix broken links to old pages

* docs: renaming soroban internals in category file

* docs: remove old "command line reference" category

* docs: add tokens directory, rearrange sidebars

* docs: rearrange migration from evm guide

* docs: remove unused reference/interfaces category

* docs: move "reference" section to "resources"

* docs: move "releases" page up a level

* docs: move FAQ page up one level

* docs: move dev tools into resources directory

* docs: move testnet.mdx to networks.mdx

* docs: rearrange items in resources directory

* docs: collapse various SDK pages into two pages

* docs: move data-providers up one level

* docs: remove some empty categories, move the tutorial template

* docs: add a new getting-started page, reorganize that section

* docs: change sidebar position integers in soroban-internals

* docs: shuffling contract interaction around in soroban-internals

* style: fixing a couple small markdown nits in dapps directory

* docs: fix a broken link

* feat: start to the "guides" page(s)

* style(lint): fixing a small linting error

* remove guides placeholder

* fixing broken links

* work on guides listing. might revert this

* formatting mdx

* docs: fixing a broken link to tutorials

* style: crack at making the tutorials filterable and hidden in the sidebar

* customizing some components for the `/guides` pages and layouts

* rename index page for guides to README

* remove commented configuration option

* remove some console logging in components

* change name of index page in guides sidebar

* remove commented sidebar generation code

* remove comments and add description to sidebar generator

* rename sidebar generator file

* more work on how the 'guides' pages might look.

* docs: adjusting sidebar positions of new getting started pages

* fix some broken links in the getting-started section

* prefer "README.mdx" files where possible

* some more guides placeholder stubs

* docs(guides): More placeholder stubs for guides and categories

* feat: don't display "guides in category" page on `/guides`

* build: check/fix MDX formatting in more directories than just docs

* style: add a larger margin before more category guides

* style: more selectively increase that top margin

* docs(guides): a quick stab at a "publishing" events guide

* docs(guides): first stab at the "publish events" guide

* docs: updating tutorial descriptions

* fix a few broken links

* docs: add note about a tuple with one element

* style: couple link changes and reformats

* move fuzzing tutorial back

* change to README file in contract interactions category

* docs(guides): give a better title for the wasm metadata guide

* fixing some broken markdown links

* fix (another!) broken link

* move the guides back into the main layout of the docs directory

* add placeholder for testnet reset automation stuff

* some initial content for some guides

* markdown formatting and fixing broken links

* moving "resources" back to "reference" to fit the definition better

More like "technical reference" rather than a "reference encyclopedia"

* change some styles of the tutorial list

* removing most category pages

* some more first-drafts of guides

* fixing some category links

* include a period at the end of each tutorial description

* simplify tutorial search box placeholder text

* better description for the tutorials page

* making the pre-commit script executable

* flesh out some of the state archival guides

* first effort for some rpc ledger key guides

* fix some broken links

* add a guide on ingesting events into a db

* first effort at storage type guides

* Some more stubs, marking drafts, and a couple additions

* make not a draft to fix a broken link

* guides category descriptions in README.mdx files

* marking incomplete chain migration docs as drafts

* change some tutorial difficulty levels

* fine-tune the tutorials component styling a bit

* improving some guides organization

* fix linting errors and broken links

* include wrap instructions for native lumens

* fix broken link in contract metadata guide

* final changes to existing guides

* moving developer tools into the main sidebar

* create real redirects instead of just notes

* fix broken links in a dapps challenge page

* fix a redirect syntax error

* fix a tutorials redirect

* Add 20.1.0 section (stellar#704)

* Add 20.1.0 section

* format

* Update docs/releases.mdx

Co-authored-by: George <[email protected]>

* Update docs/releases.mdx

---------

Co-authored-by: George <[email protected]>

* use the docusaurus blog feature for meeting notes (stellar#719)

* use the docusaurus blog feature for meeting notes

* tweak the meeting notes a bit

---------

Co-authored-by: Tyler van der Hoeven <[email protected]>

* [Do Not Merge] Updates pending vote (stellar#729)

* update to the welcome page to reflect the live on Mainnet status

* remove note about non-production software on networks page

* add the link definition for the phased rollout

* Add v20.2.0 release to `releases.mdx`  (stellar#737)

* Update releases.mdx

* use latest versions

* add changelog

* update title

* Update resource limits and make a new reference page for them (stellar#736)

* add a reference page on resource limits and fees

* remove resource fee/limit tables from "explainer" page

* removing some unnecessary comments and entries

Some of the comments are more applicable in the discussion doc,
than they are for developer documentation. So, let's get rid of
those.

* remove unnecessary "current is..." language from resource fees

* Update resource-limits-fees.mdx (stellar#746)

* Update resource-limits-fees.mdx

Add context around the phased approach

* formatting and linting

---------

Co-authored-by: Elliot Voris <[email protected]>

* Create 2024-02-22.mdx (stellar#748)

* Create 2024-02-22.mdx

* Update 2024-02-22.mdx

* Create 2024-02-15.mdx (stellar#750)

* Create 2024-02-15.mdx

* proper indents

---------

Co-authored-by: Tyler van der Hoeven <[email protected]>

* Phase 1 updates to Soroban docs (stellar#747)

* Adding Mainnet to Networks section

-Need help with Mainnet information for Horizon API, Validator, and History Archive
-Also getting errors when clicking on Testnet and Futurenet History Archive links

* Add Mainnet information to Block Explorers

* Add Releases section for Phase 1

* put in version numbers for (most) software

* add changelong for soroban rpc

* add changelog for soroban cli

* add mainnet passphrase to protocol 20 release notes

* try another title for this version

* remove unnecessary headings

* update Horizon link for Mainnet

* add resource limits and fees to releases page

* shifting some things around in resource limits for phase 1

* use `TBD` for soroban react version placeholders

* networks placeholders

* add validator and history urls for Mainnet

---------

Co-authored-by: Elliot Voris <[email protected]>

* replace a link for indexing services in a meeting notes post (stellar#753)

* rename "releases" page to "software versions"

* format mdx in newly added pages

* create a reference sidebar and add the navbar item

* add navbar and sidebar links to meeting notes blog

* fix some broken links

* add fees disclaimer to resource page

* updates to SDP Introduction

* add phase 2 references

* rollback commit that updated software version for phase 2

* correctly spell "position" so the meetings are actually on the right

* Revert "add phase 2 references"

This reverts commit b3e553f.

* remove the extra "meeting notes" entry from reference sidebar

* fix some broken links (just a couple this time!)

* remove some old, commented-out entries from the `docs` sidebar

* add some links

* fix some soroban links to point to this site's pages

---------

Co-authored-by: Leigh McCulloch <[email protected]>
Co-authored-by: shawn <[email protected]>
Co-authored-by: Tyler van der Hoeven <[email protected]>
Co-authored-by: Jay Geng <[email protected]>
Co-authored-by: Siddharth Suresh <[email protected]>
Co-authored-by: Tsachi Herman <[email protected]>
Co-authored-by: Bri <[email protected]>
Co-authored-by: Anuxhya <[email protected]>
Co-authored-by: George <[email protected]>
Co-authored-by: Julian Martinez <[email protected]>
Co-authored-by: Naman Kumar <[email protected]>
Co-authored-by: Julian Martinez <[email protected]>
  • Loading branch information
13 people authored Mar 15, 2024
1 parent 52a10f9 commit 295c3a6
Show file tree
Hide file tree
Showing 19 changed files with 1,867 additions and 70 deletions.
16 changes: 8 additions & 8 deletions docs/learn/fundamentals/networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ Stellar has three networks: the public network (Mainnet, also called Pubnet or t
### Mainnet

- Validator nodes are run by the public
- SDF offers a free [Horizon instance](https://horizon.stellar.org/) to interact with the Mainnet with a limited set of history, or you can [run your own](https://developers.stellar.org/docs/run-api-server) or use an instance offered by an infrastructure provider.
- SDF offers a free [Horizon instance](https://horizon.stellar.org/) to interact with the Mainnet with a limited set of history, or you can [run your own](/network/core-node/admin-guide) or use an instance offered by an infrastructure provider.
- You need to fund your account with XLM from another account
- Mainnet is limited to 1,000 operations per ledger and will be limited to a maximum of 30 smart contract transactions per ledger (the precise amount of smart contract txs per ledger can vary greatly depending on transaction [resource limits](https://soroban.stellar.org/docs/fundamentals-and-concepts/fees-and-metering#resource-limits))
- See more detailed smart contract network settings in the section on [Fees and Metering](https://soroban.stellar.org/docs/fundamentals-and-concepts/fees-and-metering) in the Soroban docs
- No publicly available RPC, see RPC service providers [here](https://soroban.stellar.org/docs/reference/rpc-list)
- Mainnet is limited to 1,000 operations per ledger and will be limited to a maximum of 30 smart contract transactions per ledger (the precise amount of smart contract txs per ledger can vary greatly depending on transaction [resource limits](../smart-contract-internals/fees-and-metering.mdx#resource-limits))
- See more detailed smart contract network settings in the section on [Fees and Metering](../smart-contract-internals/fees-and-metering.mdx)
- No publicly available RPC, see RPC service providers [here](/network/soroban-rpc/rpc-providers)

### Testnet

- SDF runs three core validator nodes
- SDF offers a free [Horizon instance](https://horizon-testnet.stellar.org/) you can use to interact with the Testnet
- Friendbot is a faucet you can use for free Testnet XLM
- Testnet is limited to 100 operations per ledger and one smart contract transaction per ledger
- SDF offers free RPC endpoints, more information [here](https://soroban.stellar.org/docs/reference/rpc-list#sdf-futurenet-and-testnet-only)
- SDF offers free RPC endpoints, more information [here](/network/soroban-rpc/rpc-providers#sdf-provided-rpc)

### Futurenet

- SDF runs core validator nodes
- SDF offers a free [Horizon instance](https://horizon-futurenet.stellar.org) you can use to interact with the Futurenet
- Friendbot is a faucet you can use for free Futurenet XLM
- Futurenet is limited to 100 operations per ledger and one smart contract transaction per ledger
- SDF offers free RPC endpoints, more information [here](https://soroban.stellar.org/docs/reference/rpc-list#sdf-futurenet-and-testnet-only)
- SDF offers free RPC endpoints, more information [here](/network/soroban-rpc/rpc-providers#sdf-provided-rpc)

## Friendbot

Expand Down Expand Up @@ -100,6 +100,6 @@ The current passphrases for the Stellar Mainnet, Testnet, and Futurenet are:

For applications that don’t rely on the state of the network (such as specific accounts needing to exist), you move to production by changing the network passphrase and ensuring your Horizon instance is connected to Mainnet.

If you’ve been running a Stellar Core or Horizon instance against the Testnet and want to switch to production, changing the passphrase will require both respective databases to be completely reinitialized. If you run your own RPC on Testnet or Futurenet, you may want to use an RPC service when you move to Mainnet. Check out the RPC service providers [here](https://soroban.stellar.org/docs/reference/rpc-list).
If you’ve been running a Stellar Core or Horizon instance against the Testnet and want to switch to production, changing the passphrase will require both respective databases to be completely reinitialized. If you run your own RPC on Testnet or Futurenet, you may want to use an RPC service when you move to Mainnet. Check out the RPC service providers [here](/network/soroban-rpc/rpc-providers).

To learn more about network passphrases, see our [Network Passphrase Encyclopedia Entry](../encyclopedia/network-passphrases)
To learn more about network passphrases, see our [Network Passphrase Encyclopedia Entry](../encyclopedia/network-passphrases.mdx)
12 changes: 6 additions & 6 deletions docs/learn/fundamentals/stellar-stack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ title: Stellar Stack
sidebar_position: 20
---

The Stellar stack is made up of the following components: Stellar Core, Horizon API, RPC, CLI, SDKs, DeFi protocols, and the [networks](./networks), each of which plays a specific part in providing financial infrastructure that is resilient to failures, available to anyone, and fast and cheap enough to serve real-world use cases.
The Stellar stack is made up of the following components: Stellar Core, Horizon API, RPC, CLI, SDKs, DeFi protocols, and the [networks](./networks.mdx), each of which plays a specific part in providing financial infrastructure that is resilient to failures, available to anyone, and fast and cheap enough to serve real-world use cases.

![Stellar Stack](/assets/updated-stellar-stack.png)

## Stellar Core

Stellar Core is the program used by the individual nodes (or computers) that make up the network. Stellar Core keeps a common distributed ledger and engages in consensus to validate and process transactions. Generally, nodes reach consensus, apply a transaction set, and update the ledger every 5-7 seconds.

Nodes reach consensus using the Stellar Consensus Protocol, which can you can learn more about here: [Stellar Consensus Protocol](./stellar-consensus-protocol)
Nodes reach consensus using the Stellar Consensus Protocol, which can you can learn more about here: [Stellar Consensus Protocol](./stellar-consensus-protocol.mdx)

Anyone can run a Stellar Core node, but you don’t have to in order to build on Stellar. We recommend you do so if you issue an asset and want to ensure the accuracy of the ledger, if you want to participate in network governance by voting on protocol version, minimum fees, and resource and ledger limits, and/or if you want to contribute to Stellar’s overall health and decentralization. Check out our tutorial on installing, configuring, and maintaining your own node here: [Run a Core Node Tutorial](/network/core-node).

Expand All @@ -21,15 +21,15 @@ Horizon is the client-facing RESTful HTTP API server in the platform layer which

You do not need to run your own Horizon instance — when you're getting started, you can use the free SDF Horizon instance to access the network — but it is recommended that you do when you’re ready to launch a finished product. Check out how to do so here: [Run Platform Services Tutorial](/network/horizon/admin-guide)

Learn all there is to know about using Horizon in the Horizon [API Reference documentation](https://developers.stellar.org/api).
Learn all there is to know about using Horizon in the Horizon [documentation](/network/horizon).

## RPC

Soroban's RPC is a JSON RPC server that provides an interface for users and applications to interact with smart contracts on the Stellar blockchain. When an application would like to interact with smart contracts, it sends a request to the RPC server. The server interprets these requests, translates them into a format understandable by the blockchain nodes, and forwards them. After processing the requests, the blockchain nodes send back the results. The RPC server receives these results and sends them back to the requesting application.

SDF has RPC endpoints available for Futurenet and Testnet. These services are free to use, and are suitable for development and testing.

SDF does not provide a publicly available RPC endpoint for Mainnet. Developers should [select an ecosystem provider](https://soroban.stellar.org/docs/reference/rpc-list) that works for their project before migrating to Mainnet. In some cases, projects may choose to run their own RPC instance.
SDF does not provide a publicly available RPC endpoint for Mainnet. Developers should [select an ecosystem provider](/network/soroban-rpc/rpc-providers) that works for their project before migrating to Mainnet. In some cases, projects may choose to run their own RPC instance.

## CLI

Expand All @@ -39,7 +39,7 @@ The Soroban CLI is the command line interface to Soroban and can be downloaded [

SDKs simplify some of the work of accessing Horizon and the Soroban RPC by converting the data into friendlier formats and allowing you to program in the language of your choice. Stellar’s SDKs show you how to request data and create and submit transactions. Soroban's SDKs allow you to write smart contracts in Rust and interact with smart contracts in a myriad of other languages.

View Stellar's [SDK library](../../tools/sdks/library.mdx) to access our SDKs and their documentation. View Soroban's [SDK library](https://soroban.stellar.org/docs/category/sdks) in the Soroban docs.
View Stellar's [SDK library](../../tools/sdks/library.mdx) to access our SDKs and their documentation.

## DeFi protocols

Expand All @@ -49,4 +49,4 @@ DeFi protocols are financial frameworks (such as lending and borrowing tools, AM

Stellar has three networks: the public network (Mainnet, also called Pubnet or the Public Network), the test network (Testnet), and a dev network (Futurenet). Mainnet is the main network used by applications in production. The Testnet is a smaller, free-to-use network maintained by SDF that functions like the Mainnet but doesn’t connect to real money and is the best place for developers to test their applications. Futurenet is a dev network you can use to test more bleeding edge features.

Read more about the different networks in the [Networks section](./networks).
Read more about the different networks in the [Networks section](./networks.mdx).
6 changes: 3 additions & 3 deletions docs/learn/smart-contract-internals/fees-and-metering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ The refundable fees is calculated from rent, events, and return value. Refundabl

### Where to find Resource Fee Info for the Transaction

The best way to find the required resource fee for any Soroban transaction is to use the [`simulateTransaction`](contract-interactions/transaction-simulation.mdx) endpoint from the RPC, which enables you to send a preflight transaction that will return resource fees.
The best way to find the required resource fee for any Soroban transaction is to use the [`simulateTransaction`](./contract-interactions/transaction-simulation.mdx) endpoint from the RPC, which enables you to send a preflight transaction that will return resource fees.

## Resource limits

Ledger close time is constrained to a few seconds, thus preventing the execution of arbitrarily large transactions, regardless of the resource fees involved. All the resources referenced in the prior section are subject to a per-transaction limit. Additionally, the memory (RAM) usage by a transaction is capped, though it is not subject to any charge.

These resource limits may change in the Mainnet release. They can also be updated, usually increased, based on the network validator vote and consensus.

Currently defined resource limits can be found in [the "Resource Limits & Fees" page](https://soroban.stellar.org/docs/reference/resource-limits-fees) in the Reference section.
Currently defined resource limits can be found in [the "Resource Limits & Fees" page](../../reference/resource-limits-fees.mdx) in the Reference section.

# Metering

Expand Down Expand Up @@ -132,4 +132,4 @@ If the contract execution concludes within the specified resource limits, the me

### Current Fee Rates

Currently defined fee rates can be found in the [Resource Limits & Fees](https://soroban.stellar.org/docs/reference/resource-limits-fees) page.
Currently defined fee rates can be found in the [Resource Limits & Fees](../../reference/resource-limits-fees.mdx) page.
24 changes: 24 additions & 0 deletions docs/reference/networks.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 10
title: Networks
description: The shared Soroban test networks.
---

Read more about the different networks in the [Networks section](../learn/fundamentals/networks.mdx).

| | Mainnet | Testnet | Futurenet |
| :-- | --- | --- | --- |
| Network Passphrase | `Public Global Stellar Network ; September 2015` | `Test SDF Network ; September 2015` | `Test SDF Future Network ; October 2022` |
| Horizon API | https://horizon.stellar.org/ | https://horizon-testnet.stellar.org | https://horizon-futurenet.stellar.org |
| Soroban RPC | Please check out the available [ecosystem providers] | https://soroban-testnet.stellar.org | https://rpc-futurenet.stellar.org |
| Friendbot API | N/A | https://friendbot.stellar.org | https://friendbot-futurenet.stellar.org |
| Validator | `core-live-a.stellar.org` `core-live-b.stellar.org` `core-live-c.stellar.org` | `core-live-testnet.stellar.org` | `core-live-futurenet.stellar.org` |
| History Archive | http://history.stellar.org/prd/core-live/core_live_001/ http://history.stellar.org/prd/core-live/core_live_002/ http://history.stellar.org/prd/core-live/core_live_003/ | https://history-testnet.stellar.org | https://history-futurenet.stellar.org |

:::caution

Testnet and Futurenet can be reset at any time. A reset erases all accounts, contract data, and contract deployments from the network.

:::

[ecosystem providers]: /network/soroban-rpc/rpc-providers
94 changes: 94 additions & 0 deletions docs/reference/resource-limits-fees.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
sidebar_position: 30
title: Resource Limits & Fees
---

:::note

Resource limitations and fees only apply to smart contract transactions. Read more about the inner workings of inclusion fees in the [Fees section](../learn/encyclopedia/fees-surge-pricing-fee-strategies.mdx) and more about smart contract fees, which include resource fees, in the [Fees and Metering section](../learn/smart-contract-internals/fees-and-metering.mdx).

:::

## Resource Limits

Soroban introduces smart contracts, marking the most transformative upgrade to the Stellar network to date. To maintain network performance, the ecosystem has decided to upgrade the network in a phased approach where network capacity is increased gradually over time. See [this blog post](https://stellar.org/blog/developers/the-stellar-network-s-phased-rollout-of-smart-contracts-the-road-to-mainnet) for more details and [Discord](https://discord.com/invite/zVYdY3ktTn) for current status.

| Network Setting | Phase 0 | Phase 1 (current) |
| :-- | :-- | :-- |
| Soroban Txn per ledger | 1 | 100 |
| Max CPU Instructions per Txn | 2.5 million (2M instructions for max Wasm) | 100 million (VM instantiation consumes up to 23M for a 64KB Wasm, and 46M for multiple Wasms of 130KB) |
| Memory limit per Txn | 2 MB | 40 MB |
| Ledger entry size (including Wasm entries) per Txn | 2 KB | 64 KB |
| Read/Write Ledger entries per Txn | 3 read; 2 write | 40 read; 25 write |
| Read/Write bytes per Txn | 3.2 KB read; 3.2 KB write | 130 KB read; 65 KB write |
| Transaction size | 10 KB | 70 KB |
| Persistent entry minimal/initial lifetime | 4,096 ledgers (~5.68 hours) | 120 days |
| Temporary entry minimal/initial lifetime | 16 ledgers | 1 day |
| Max ledger entry expiration bump | 61 days | 6 months |
| Events+return value size bytes | 200 B | 8 KB |

## Resource Fees

Note that write fees grow linearly from empty ledger to ledger "target size", and then grow linearly, but with a 1000x factor after exceeding the target. This is to bound the ledger size growth.

The ledger rent cost ('Write 1KB' entries in the table) is based on the write fee, rent period and some coefficient. For the temporary storage, the coefficient is 10 months (in ledgers), thus 1 month of temporary entry rent is 1/10 of the rent fee. For persistent storage the coefficient is 1 month (in ledgers) and thus 1 month of rent is equivalent to the write fee.

### Phase 1 (current) {#phase-1}

Phase 1 is meant for network operators to monitor network performance under use. While you'll be able to deploy contracts, Mainnet in Phase 1 has limited throughput. You should not expect more than 1 smart contract transaction per ledger. You can expect throughput to be gradually increased based on network performance and user (your) feedback. See [this blog post](https://stellar.org/blog/developers/the-stellar-network-s-phased-rollout-of-smart-contracts-the-road-to-mainnet) for more details and share your feedback in [Discord](https://discord.com/invite/zVYdY3ktTn).

| Network setting | Phase 1 Cost (stroops) |
| :-- | :-- |
| 10,000 instructions | 25 (250,000/max tx) |
| Read 1 ledger entry | 6,250 (250,000/max tx) |
| Write 1 ledger entry | 10,000 (250,000/max tx) |
| Read 1KB from ledger | 1,786 (250,000/max tx) |
| 1KB of transaction size (bandwidth) | 1,624 (113,642/max tx) |
| 1KB of transaction size (history) | 16,235 (1,136,418/max tx) |
| 1KB of Events/return value | 10,000 (80,000/max tx) |
| “Target” ledger size | 13 GB |
| Fee multiplier after reaching the target size | 1,000 |
| Write 1KB to ledger, stroops (empty) | -1,234,673 (the write cost is always positive; this value is used only for the effective write fee computations) |
| Write 1KB to ledger, stroops (current, 12 GB) | 11,539 (750,000/max tx) |
| Write 1KB to ledger, stroops (target, 13 GB) | 115,390 (7,500,000/max tx) |
| Temp entry rent period, ledgers | 2,804 |
| Persistent entry rent period, ledgers | 1,402 |
| Minimum persistent entry TTL, ledgers | 2,073,600 (120 days) |
| Minimum temp entry TTL, ledgers | 17,280 (~1 day) |

#### Phase 1 Examples

Here are some examples to put things in perspective (the fees are computed at "current" ledger size and would grow as ledger size increases):

| Scenario | Phase 1 Cost |
| :-- | :-- |
| Upload a new 64KB Wasm (includes 120 day rent payment) | 109.2 XLM |
| 1 year of 64KB Wasm storage rent | 327.7 XLM |
| Bump 64KB Wasm rent by 1 day | 0.91 XLM |
| Modify 64 KB contract data entry without increasing the size | 0.075 XLM |
| Create 100 byte contract data entry, e.g. user balance (includes 120 day rent payment) | 0.17 XLM |
| 1 year of 100 byte storage rent | 0.512 XLM |
| Modify 100 byte contract data entry without increasing the size | 1150 stroops |

### Phase 0

Phase 0 is meant for network operators to observe and ensure network stability. While you may be able to deploy simple contracts, Mainnet in Phase 0 is not designed for contract development or deployment. Testnet is better suited for this purpose.

| Network Setting | Phase 0 Cost (stroops) |
| :-------------------------------------------- | :---------------------- |
| 10,000 instructions | 100 (1,000,000/tx) |
| Read 1 ledger entry | 1,000 (20,000/tx) |
| Write 1 ledger entry | 3,000 (30,000/tx) |
| Read 1KB from ledger | 1,000 (127,000/tx) |
| 1KB of transaction (bandwidth) | 500 (34,000/tx) |
| 1KB of transaction (history) | 5,000 (340,000/tx) |
| 1KB of Events/return value | 300 (1,500/tx) |
| “Target” ledger size | 14.5 GB |
| Fee multiplier after reaching the target size | 1,000 |
| Write 1KB to ledger (empty) | 1,000 |
| Write 1KB to ledger (current, 12 GB) | 0.356 XLM (17.4 XLM/tx) |
| Write 1KB to ledger (target, 14 GB) | 0.4 XLM (2.26 XLM/tx) |
| Temp entry rent period | 10 months |
| Persistent entry rent period | 1 month |
| 1 KB of temp storage per month | 400,000 |
| 1 KB of persistent storage per month | 4,000,000 |
Loading

0 comments on commit 295c3a6

Please sign in to comment.