You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/guides/archival/test-ttl-extension.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ fn create_env() -> Env {
75
75
}
76
76
```
77
77
78
-
You could also use the current [network settings](../../../networks/resource-limits-fees.mdx#resource-fees) when setting up the tests, but keep in mind that these are subject to change, and the contract should be able to work with any values of these settings.
78
+
You could also use the current [network settings](https://lab.stellar.org/network-limits) when setting up the tests, but keep in mind that these are subject to change, and the contract should be able to work with any values of these settings.
79
79
80
80
Now we run a test scenario that verifies the TTL extension logic (see [`test_extend_ttl_behavior`](https://github.com/stellar/soroban-examples/blob/v23.0.0/ttl/src/test.rs#L38) test for the full scenario). First, we setup the data and ensure that the initial TTL values correspond to the network settings we've defined above:
Copy file name to clipboardExpand all lines: docs/build/guides/storage/choosing-the-right-storage.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ Like persistent storage, instance storage stores data permanently. However, it h
90
90
91
91
- Pro: Data TTL is tied to the contract instance, thus making state archival behavior much easier
92
92
- Pro/Con: Data is loaded automatically together with the contract, thus reducing the transaction footprint size, but increasing the number of bytes read every time the contract is loaded (_usually_ this still will result in a lower fee)
93
-
- Con: The total size of all the keys and values in the instance storage is limited by the ledger entry size limit. See the current value of the limit [here](../../../networks/resource-limits-fees.mdx). The total number of keys supported is on the order of tens to hundreds depending on the underlying data size and the current network limit. Keep in mind, that the network limit can never go down, so the instance can't ever become non-valid.
93
+
- Con: The total size of all the keys and values in the instance storage is limited by the ledger entry size limit. See the current value of the limit [on the Stellar Lab](https://lab.stellar.org/network-limits). The total number of keys supported is on the order of tens to hundreds depending on the underlying data size and the current network limit. Keep in mind, that the network limit can never go down, so the instance can't ever become non-valid.
94
94
95
95
Instance storage is best suited for data that has a well-known size limit and is either very small, or is necessary for every contract invocation. For example, contract administrator entry (small and should be maintained together with the contract instance), or a token pair for a liquidity pool (necessary for almost every operation on a liquidity pool).
96
96
@@ -133,7 +133,7 @@ impl LoyaltyPointsContract {
133
133
134
134
As the name implies, temporary storage stores data only for a certain time period, and then discards it automatically when TTL expires. **Temporary entries are gone forever when their TTL expires**.
135
135
136
-
The benefit of temporary storage is the smaller cost and the ability to set a very low TTL, both of which result in lower rent fees compared to persistent storage. See the current information on the minimal lifetimes and rent fees [here](../../../networks/resource-limits-fees.mdx).
136
+
The benefit of temporary storage is the smaller cost and the ability to set a very low TTL, both of which result in lower rent fees compared to persistent storage. See the current information on the minimal lifetimes and rent fees [on the Stellar Lab](https://lab.stellar.org/network-limits).
137
137
138
138
Temporary storage is suitable for data that is only necessary for a relatively short and well-defined time period. 'Well-defined' here means that when creating an entry, the contract should be able to define its maximum necessary TTL.
Copy file name to clipboardExpand all lines: docs/data/apis/horizon/api-reference/structure/xdr.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ When you post a transaction, a client will encode the transaction as XDR before
11
11
12
12
When you request a transaction, Horizon returns some data about the transaction in human-readable JSON. The full canonical data about the transaction is encoded in machine-readable XDR, available in XDR attributes at the end of the response.
13
13
14
-
You can decode this XDR in the Stellar Lab’s [XDR page](https://lab.stellar.org/xdr/view?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;).
14
+
You can decode this XDR on the Stellar Lab’s [XDR page](https://lab.stellar.org/xdr/view?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;).
Copy file name to clipboardExpand all lines: docs/data/apis/rpc/api-reference/structure/data-format.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ In the Stellar network, transactions are encoded using a standardized protocol c
9
9
10
10
In RPC, you will encounter XDR when [simulating](../methods/simulateTransaction) and [sending](../methods/sendTransaction) transactions, as well as when retrieving [transactions](../methods/getTransactions), [ledgers](../methods/getLedgers), and [ledger entries](../methods/getLedgerEntries).
11
11
12
-
By default, RPC will return all XDR attributes as the machine-readable base64-encoded string. XDR-encoded response fields are usually suffixed with `Xdr`. You can decode this XDR in the Stellar Lab’s [XDR page](https://lab.stellar.org/xdr/view?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;).
12
+
By default, RPC will return all XDR attributes as the machine-readable base64-encoded string. XDR-encoded response fields are usually suffixed with `Xdr`. You can decode this XDR on the Stellar Lab’s [XDR page](https://lab.stellar.org/xdr/view?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;).
Copy file name to clipboardExpand all lines: docs/learn/fundamentals/contract-development/storage/persisting-data.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ In addition to the types of state, it is also helpful to consider the type of co
72
72
### Best Practices
73
73
74
74
- Prefer `Temporary` over `Persistent` and `Instance` storage
75
-
- Anything that can have a timeout should be `Temporary` with TTL set to the timeout. See the [resource limits table](../../../../networks/resource-limits-fees.mdx) for the current maximum TTL/timeout.
75
+
- Anything that can have a timeout should be `Temporary` with TTL set to the timeout. See the [resource limits table](https://lab.stellar.org/network-limits) on the Stellar Lab for the current maximum TTL/timeout.
76
76
- Ideally, `Temporary` entries should be associated with an absolute ledger boundary and thus never need a TTL extension
77
77
- Example: Soroban Auth signatures have an absolute expiration ledger, so nonces can be stored in `Temporary` entries without security risks
78
78
- Example: SAC allowance that lives only until a given ledger (so that some old allowance signature can not be used in the future if not exhausted)
Copy file name to clipboardExpand all lines: docs/learn/fundamentals/contract-development/storage/state-archival.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,11 +111,11 @@ An entry's Time To Live (TTL) is defined as how many ledgers remain until the en
111
111
112
112
For each entry type, there is a minimum TTL that the entry will have when being created or restored. This TTL minimum is enforced automatically at the protocol level.
113
113
114
-
Minimum TTL is a network parameter. Refer to the [resource reference](../../../../networks/resource-limits-fees.mdx) to find the current values.
114
+
Minimum TTL is a network parameter. Refer to the [resource reference](https://lab.stellar.org/network-limits) on the Stellar Lab to find the current values.
115
115
116
116
### Maximum TTL
117
117
118
-
On any given ledger, an entry's TTL can be extended up to the maximum TTL. This is a network parameter (see the [resource limits table](../../../../networks/resource-limits-fees.mdx) for the current maximum TTL). Maximum TTL is not enforced based on when an entry was created, but based on the current ledger. For example, if an entry is created on January 1st, 2024, its TTL could initially be extended up to January 1st, 2025. After this initial TTL extension, if the entry received another TTL extension later on January 10th, 2024, the TTL could be extended up to January 10th, 2025. The `max_ttl()` function can be used to determine the current maximum allowed TTL.
118
+
On any given ledger, an entry's TTL can be extended up to the maximum TTL. This is a network parameter (see the [resource limits table](https://lab.stellar.org/network-limits) on the Stellar Lab for the current maximum TTL). Maximum TTL is not enforced based on when an entry was created, but based on the current ledger. For example, if an entry is created on January 1st, 2024, its TTL could initially be extended up to January 1st, 2025. After this initial TTL extension, if the entry received another TTL extension later on January 10th, 2024, the TTL could be extended up to January 10th, 2025. The `max_ttl()` function can be used to determine the current maximum allowed TTL.
Copy file name to clipboardExpand all lines: docs/learn/fundamentals/fees-resource-limits-metering.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Transactions that do not execute a smart contract can be thought of as having a
31
31
32
32
_\* Diagram: Solid line boxes are what is actually present in the transaction, while dotted lines are derivable._
33
33
34
-
Smart contracts on Stellar use a multidimensional resource fee model that charges fees for several resource types using [network-defined rates](../../networks/resource-limits-fees.mdx). The resource fee is calculated based on the resource consumption declared in the transaction and can fluctuate based on a mutable storage write fee (more on that in the [Storage Dynamic Pricing section](#dynamic-pricing-for-storage) below). If the transaction attempts to exceed the declared resource limits, it will fail. If the transaction uses fewer resources than declared, there will be no refunds [(with a couple of exceptions)](#refundable-and-non-refundable-resource-fees).
34
+
Smart contracts on Stellar use a multidimensional resource fee model that charges fees for several resource types using [network-defined rates](https://lab.stellar.org/network-limits) on the Stellar Lab. The resource fee is calculated based on the resource consumption declared in the transaction and can fluctuate based on a mutable storage write fee (more on that in the [Storage Dynamic Pricing section](#dynamic-pricing-for-storage) below). If the transaction attempts to exceed the declared resource limits, it will fail. If the transaction uses fewer resources than declared, there will be no refunds [(with a couple of exceptions)](#refundable-and-non-refundable-resource-fees).
35
35
36
36
The resource fee depends on the following resources:
37
37
@@ -50,7 +50,7 @@ Some parameters may contribute to multiple fee components. For example, the tran
50
50
51
51
The implementation details for fee computation are provided by the following [library](https://github.com/stellar/rs-soroban-env/blob/main/soroban-env-host/src/fees.rs). This library is used by the protocol to compute the fees and thus can be considered canonical. The resource fee rates may be updated based on consensus from the network validators.
52
52
53
-
Find current resource fees in the [Resource Limits & Fees](../../networks/resource-limits-fees.mdx) page in the Networks section.
53
+
Find current resource fees in the [Resource Limits & Fees](https://lab.stellar.org/network-limits) on the Stellar Lab.
54
54
55
55
For help in analyzing smart contract cost and efficiency, see this [How-To Guide](../../build/guides/fees/analyzing-smart-contract-cost.mdx).
56
56
@@ -78,7 +78,7 @@ Stellar’s ledger close time is constrained to a few seconds, preventing the ex
78
78
79
79
Resource limits are determined by a validator vote and can be adjusted based on network usage and ecosystem needs with a validator consensus.
80
80
81
-
Find current resource limits in the [Resource Limits & Fees](../../networks/resource-limits-fees.mdx) page in the Networks section.
81
+
Find current resource limits in the [Resource Limits & Fees](https://lab.stellar.org/network-limits) on the Stellar Lab.
Copy file name to clipboardExpand all lines: docs/networks/resource-limits-fees.mdx
+9-66Lines changed: 9 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,75 +3,18 @@ sidebar_position: 30
3
3
title: Resource Limits & Fees
4
4
---
5
5
6
-
:::info
6
+
## Where to find the current resource limits and fees
7
7
8
-
The values below are for reference. For current resource limits and fees on the live network, see Stellar Lab's [Network Limits](https://lab.stellar.org/network-limits) page.
8
+
### [Stellar Lab](https://lab.stellar.org/)
9
9
10
-
:::
10
+
The Stellar Lab's [Network Limits](https://lab.stellar.org/network-limits) page displays real-time network settings for [Testnet](https://lab.stellar.org/network-limits?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;), [Mainnet](https://lab.stellar.org/network-limits?$=network$id=mainnet&label=Mainnet&horizonUrl=https:////horizon.stellar.org&rpcUrl=https:////mainnet.sorobanrpc.com&passphrase=Public%20Global%20Stellar%20Network%20/;%20September%202015;;), and [Futurenet](https://lab.stellar.org/network-limits?$=network$id=futurenet&label=Futurenet&horizonUrl=https:////horizon-futurenet.stellar.org&rpcUrl=https:////rpc-futurenet.stellar.org&passphrase=Test%20SDF%20Future%20Network%20/;%20October%202022;;). The page offers both `table` and `JSON` display options for easy viewing.
You can also query current network settings directly from the command line using:
15
15
16
-
Resource limitations and fees only apply to smart contract transactions. Read more about the inner workings of fees on Stellar in the [Fees section](../learn/fundamentals/fees-resource-limits-metering.mdx).
16
+
```bash
17
+
stellar network settings
18
+
```
17
19
18
-
:::
19
-
20
-
### Per-transaction limits
21
-
22
-
These define the maximum amount of work a single Smart contract transaction can do.
\* Most transactions don't perform any disk reads, as only archived entries and 'classic' entries (G-accounts, trustlines) are considered to be disk reads. Live smart contract state is in-memory and is not counted towards this limit.
37
-
38
-
### TTL extension parameters
39
-
40
-
These define TTL extension parameters.
41
-
42
-
| Network Setting | Value |
43
-
| -------------------------------- | -------- |
44
-
| Persistent entry TTL on creation | 120 days |
45
-
| Temporary entry TTL on creation | 1 day |
46
-
| Max ledger entry TTL extension | 6 months |
47
-
48
-
### Ledger-wide limits
49
-
50
-
These define the maximum amount of work done by all the transactions in a single ledger (single block).
| 1KB of Events/return value | 10,000 (160,000/max tx) |
74
-
| 30 days of rent for 1 KB of persistent storage |~427,000 |
75
-
| 30 days of rent for 1 KB of temporary storage |~213,500 |
76
-
77
-
Note, that the rent fees provided here may go up in case if a lot of contract data is written to the ledger within a short time period. This happens because the rent fees are designed in such a way that the closer the state size to some validator-defined threshold, the more expensive it gets to write new data or extend the TTLs.
20
+
For more details on using this command, see the [Stellar CLI documentation](https://developers.stellar.org/docs/tools/cli/stellar-cli#stellar-network-settings).
0 commit comments