-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Soroban to Stellar Fundamentals (#269)
* Networks * formatting * update ledger section * update asset section * adding details to Soroban operations * markdown linting for the list-of-operations page * update Lumens section to include smart contract data * network additions to include Futurenet * edit to accounts page I'm iffy on if this one makes sense. Is smart contract data even relevant to account subentries? Is it assumed that we're not talking about smart contract data? Is it confusing to call out? To be discussed. * quick addition to Assets section * starting on the stack * update RPC for Futurenet * updating stellar stack to include Soroban components * starting on operations and transactions -move transaction lifecycle to new section under F&C -remove transaction lifecycle from operations & transactions * updated stack image * update ledger * other network edits * more on operations & transactions * docs: first stab at a "contract" data structure page... meh * added bit about resource limitations * small copy tweaks * Update docs/fundamentals-and-concepts/lumens.mdx Co-authored-by: George <[email protected]> * Update docs/fundamentals-and-concepts/networks.mdx Co-authored-by: George <[email protected]> * Update docs/fundamentals-and-concepts/networks.mdx Co-authored-by: George <[email protected]> * Update docs/fundamentals-and-concepts/list-of-operations.mdx expand TTL acronym, point that `extendTo` is an absolute sequence number. Co-authored-by: George <[email protected]> * docs: swap persistent/instance storage add note about abstraction * note the `extendTo` parameter is an absolute seq number, not relative * add redirect for networks page * docs: add description of "soroban" in "smart contracts" page * Update docs/fundamentals-and-concepts/lumens.mdx Co-authored-by: Elliot Voris <[email protected]> * Update docs/fundamentals-and-concepts/lumens.mdx Co-authored-by: Elliot Voris <[email protected]> * Update docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx Co-authored-by: Elliot Voris <[email protected]> * Update docs/fundamentals-and-concepts/stellar-data-structures/operations-and-transactions.mdx Co-authored-by: Elliot Voris <[email protected]> * Update docs/fundamentals-and-concepts/stellar-data-structures/operations-and-transactions.mdx Co-authored-by: Elliot Voris <[email protected]> * Update docs/fundamentals-and-concepts/transaction-lifecycle.mdx Co-authored-by: Elliot Voris <[email protected]> * fix link for state archival, include bit about instance storage * update networks * transaction lifecycle disclaimer * Update docs/fundamentals-and-concepts/lumens.mdx Co-authored-by: Justin Rice <[email protected]> * Update docs/fundamentals-and-concepts/networks.mdx Co-authored-by: Justin Rice <[email protected]> * Update docs/fundamentals-and-concepts/networks.mdx Co-authored-by: Justin Rice <[email protected]> * Update docs/fundamentals-and-concepts/stellar-data-structures/contracts.mdx Co-authored-by: Justin Rice <[email protected]> * Update docs/fundamentals-and-concepts/stellar-data-structures/contracts.mdx Co-authored-by: Justin Rice <[email protected]> * rent and asset edits * Update docs/fundamentals-and-concepts/stellar-stack.mdx Co-authored-by: Justin Rice <[email protected]> * formatting * Update docs/fundamentals-and-concepts/stellar-stack.mdx Co-authored-by: Justin Rice <[email protected]> --------- Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Justin Rice <[email protected]>
- Loading branch information
1 parent
010fb1d
commit 3ccd325
Showing
18 changed files
with
338 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
title: Networks | ||
sidebar_position: 30 | ||
--- | ||
|
||
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. It connects to real financial rails and requires XLM to cover minimum balances, transaction fees, and rent. The Testnet is a smaller, free-to-use network maintained by SDF that functions like the Mainnet but doesn’t connect to real money. It has a built-in testnet XLM faucet (called Friendbot), and it resets on a regular cadence, so it's the best place for developers to test applications when they need a stable environment that mirrors Mainnet functionality. Futurenet is a dev network you can use to test more bleeding edge features that also has access to its own Friendbot. It resets whenever a reset is necessary, so it's not as predictable as Testnet, but it is where new features may be introduced before the are implemented in stable releases. | ||
|
||
## Stats: Mainnet versus Testnet versus Futurenet | ||
|
||
### 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. | ||
- 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) | ||
|
||
### 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) | ||
|
||
### 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) | ||
|
||
## Friendbot | ||
|
||
Friendbot is a bot that funds accounts with fake XLM on Testnet or Futurenet. You can request XLM from Friendbot using the Stellar Laboratory or with various SDKs. Requests to Friendbot are rate limited, so use it wisely. Friendbot provides 10,000 fake XLM when funding a new account. | ||
|
||
If you are creating multiple accounts, you can fund your first account with Friendbot and then use that first account to fund your subsequent accounts using the Create Account operation. | ||
|
||
## Testnet and Futurenet data reset | ||
|
||
Testnet and Futurenet are reset periodically to the genesis ledger to declutter the network, remove spam, reduce the time needed to catch up on the latest ledger, and help maintain the system. Resets clear all ledger entries (accounts, trustlines, offers, smart contract data, etc.), transactions, and historical data from Stellar Core, Horizon, and the Soroban RPC- which is why developers should not rely on the persistence of accounts or the state of any balances when using Testnet or Futurenet. | ||
|
||
Futurenet resets are on a less regular cadence than Testnet resets and don't have a set schedule. | ||
|
||
Testnet resets happen once per quarter at 17:00 UTC and are announced at least two weeks in advance on the [Stellar Dashboard](http://dashboard.stellar.org/) and through several developer community channels. Here are the 2023 dates: | ||
|
||
March 15, 2023 | ||
June 14, 2023 | ||
~~September 13, 2023~~ Note: this reset was skipped due to its proximity to the Protocol 20 Testnet upgrade. | ||
December 18, 2023 | ||
|
||
If you run a Testnet or Futurenet Horizon instance, you need to re-join and re-sync to the network after a reset. Check out how to do that here: [Testnet Reset](https://github.com/stellar/packages/blob/master/docs/testnet-reset.md). | ||
|
||
## Test data automation | ||
|
||
It is recommended that you have testing infrastructure that can repopulate the Testnet and Futurenet with useful data after a reset. This will make testing more reliable and will help you scale your testing infrastructure to a private network if you choose to do so. For example, you may want to: | ||
|
||
- Generate issuers of assets for testing the development of a wallet; | ||
- Generate orders on the order book (both current and historical) for testing the development of a trading client; | ||
- Recreate liquidity pools; | ||
- Redeploy smart contracts. | ||
|
||
If you maintain an application, you should think about creating a data set that is representative enough to test your primary use cases, and allow for robust testing even when Testnet or Futurenet are not available. | ||
|
||
A script can automate this entire process by creating an account with Friendbot and submitting a set of transactions that are predefined as a part of your testing infrastructure. | ||
|
||
## What Testnet and Futurenet should and should not be used for | ||
|
||
### Testnet and Futurenet are good for | ||
|
||
- Creating test accounts (with funding from Friendbot); | ||
- Developing applications and contracts and exploring tutorials on Stellar without the potential to lose any assets; | ||
- Testing existing applications against new releases or release candidates of Stellar Core, Horizon, and the Soroban RPC; | ||
- Performing data analysis on a smaller, non-trivial data set compared to the Mainnet. | ||
|
||
### Testnet and Futurenet are bad for | ||
|
||
- Load and stress testing; | ||
- High availability test infrastructure- SDF does not guarantee Testnet availability; | ||
- Long-term storage of data on the network since the network resets periodically; | ||
- A testing infrastructure that requires more control over the test environment, such as: | ||
- The ability to control the data reset frequency; | ||
- The need to secure private or sensitive data (before launching on the Mainnet). You can always run your own test network for use cases that don’t work well with SDF’s Testnet. | ||
|
||
## Moving your project from Testnet or Futurenet to production | ||
|
||
Mainnet, Testnet, and Futurenet each have their own unique passphrase, which is used to validate signatures on a given transaction. | ||
|
||
The current passphrases for the Stellar Mainnet, Testnet, and Futurenet are: | ||
|
||
**Mainnet (Pubnet)**: `Public Global Stellar Network ; September 2015` | ||
|
||
**Testnet**: `Test SDF Network ; September 2015` | ||
|
||
**Futurenet**: `Test SDF Future Network ; October 2022` | ||
|
||
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). | ||
|
||
To learn more about network passphrases, see our [Network Passphrase Encyclopedia Entry](../encyclopedia/network-passphrases) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.