Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Soroban Merge] Create a "Reference" section #364

Merged
merged 60 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1823544
Add release notes (#232)
leighmcculloch Dec 2, 2022
f4a48b3
Revert "Add release notes (#232)" (#233)
leighmcculloch Dec 2, 2022
3a27e96
Add release notes (#234)
leighmcculloch Dec 2, 2022
8f73a05
Update version of SDK (#236)
leighmcculloch Dec 3, 2022
711a99b
Update versions of software (#240)
leighmcculloch Dec 6, 2022
67a79f1
Remove "Preview" from releases page title
leighmcculloch Dec 6, 2022
d0d2e74
Update chanelogs
leighmcculloch Dec 6, 2022
13fad0d
Update soroban-rpc version
leighmcculloch Dec 6, 2022
4609449
Update Friendbot version
leighmcculloch Dec 6, 2022
f195e26
updated quickstart image sha (#241)
sreuland Dec 6, 2022
59e705a
Add changelog notes about XDR
leighmcculloch Dec 6, 2022
03d08eb
Add changelog notes about env
leighmcculloch Dec 6, 2022
53195b4
Add other changelogs
leighmcculloch Dec 6, 2022
03e3e26
Add contributors
leighmcculloch Dec 6, 2022
45d3e54
Next Release Dev Branch (#231)
leighmcculloch Dec 6, 2022
b9f43fd
Fix links to contributors
leighmcculloch Dec 6, 2022
5ecc947
Add js-stellar-base and js-soroban-client versions to release notes (…
leighmcculloch Dec 6, 2022
d08f523
Reorder the nav bar (#244)
kalepail Dec 7, 2022
42a4be2
Update the release notes (#246)
jayz22 Dec 8, 2022
0098fbe
Merge branch 'main' into dev-main
sisuresh Jan 4, 2023
3c3c133
Merge pull request #255 from sisuresh/dev-main
sisuresh Jan 4, 2023
94b85f9
Update release versions for upcoming release (#259)
tsachiherman Jan 7, 2023
0f0a10d
Update release page
jayz22 Jan 7, 2023
a105c35
Merge pull request #262 from jayz22/main
sisuresh Jan 7, 2023
4162f03
Merge branch 'main' into update-dev
sisuresh Jan 7, 2023
ac1ee5b
Merge pull request #263 from sisuresh/update-dev
sisuresh Jan 7, 2023
7472508
Merge pull request #264 from sisuresh/dev-into-main
sisuresh Jan 9, 2023
2ae40b0
Support arm64 images in docs for quickstart (#274)
leighmcculloch Jan 17, 2023
cb1d73b
update all admonitions such that prettier doesn't yell
kalepail Feb 3, 2023
1e72438
Lots of formatting
kalepail Feb 3, 2023
1ce3327
Reorg (#290)
kalepail Feb 7, 2023
9259c2b
Pre mainnet restructure (#644)
ElliotFriend Jan 9, 2024
58c214c
Add 20.1.0 section (#704)
sisuresh Jan 23, 2024
48fb892
use the docusaurus blog feature for meeting notes (#719)
ElliotFriend Feb 16, 2024
715f86a
[Do Not Merge] Updates pending vote (#729)
ElliotFriend Feb 20, 2024
589fba8
Add v20.2.0 release to `releases.mdx` (#737)
Julian-dev28 Feb 22, 2024
8f2a8e4
Update resource limits and make a new reference page for them (#736)
ElliotFriend Feb 22, 2024
92e45fc
Update resource-limits-fees.mdx (#746)
namankumar Feb 23, 2024
8c9c565
Create 2024-02-22.mdx (#748)
kalepail Feb 26, 2024
408781e
Create 2024-02-15.mdx (#750)
namankumar Feb 27, 2024
d898443
Phase 1 updates to Soroban docs (#747)
briwylde08 Feb 27, 2024
35b7201
replace a link for indexing services in a meeting notes post (#753)
ElliotFriend Feb 27, 2024
3930587
Merge remote-tracking branch 'merge-subset/main' into soroban-merge/r…
ElliotFriend Mar 13, 2024
19385d3
rename "releases" page to "software versions"
ElliotFriend Mar 13, 2024
74f3986
format mdx in newly added pages
ElliotFriend Mar 13, 2024
e645d7d
create a reference sidebar and add the navbar item
ElliotFriend Mar 13, 2024
b6879fc
add navbar and sidebar links to meeting notes blog
ElliotFriend Mar 13, 2024
02f5da3
fix some broken links
ElliotFriend Mar 13, 2024
eeca595
add fees disclaimer to resource page
briwylde08 Mar 14, 2024
e523630
updates to SDP Introduction
briwylde08 Mar 14, 2024
b3e553f
add phase 2 references
Julian-dev28 Mar 14, 2024
9a4dc22
rollback commit that updated software version for phase 2
Julian-dev28 Mar 14, 2024
9c74c09
correctly spell "position" so the meetings are actually on the right
ElliotFriend Mar 14, 2024
23c3938
Revert "add phase 2 references"
ElliotFriend Mar 14, 2024
8b7550a
remove the extra "meeting notes" entry from reference sidebar
ElliotFriend Mar 14, 2024
52262c6
Merge branch 'main' into soroban-merge/reference-v3
ElliotFriend Mar 14, 2024
055b58b
fix some broken links (just a couple this time!)
ElliotFriend Mar 14, 2024
54d0101
remove some old, commented-out entries from the `docs` sidebar
ElliotFriend Mar 14, 2024
72c82f0
add some links
briwylde08 Mar 15, 2024
e38bbaa
fix some soroban links to point to this site's pages
ElliotFriend Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading