Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

[Stellar Merge] Announcement Bar #742

Merged
merged 5 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion api/pagination.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ For example, calling a method with pagination parameter set:
"jsonrpc": "2.0",
"id": "1",
"method": "exampleMethod",
"params": ["other", "arguments", { "cursor": "1234-1", "limit": 100 }]
"params": {
"some": "argument",
"pagination": {
"cursor": "1234-1",
"limit": 100
}
}
}
```
82 changes: 82 additions & 0 deletions docs/reference/resource-limits-fees.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
sidebar_position: 35
title: Resource Limits & Fees
---

## Resource Limits

| Network Setting | Phase 0 (current) | Phase 1 |
| :------------------------------------------------- | :----------------------------------------- | :----------------------------------------------------------------------------------------------------- |
| 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 0 (current)

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

### Phase 1

| 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 |
4 changes: 2 additions & 2 deletions docs/reference/rpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ This example of Helm chart usage highlights some key aspects:

By default, this is disabled (`sorobanRpc.persistence.enabled=false`) and the RPC deployment will use ephemeral pod storage via `emptyDir`, which will likely be adequate for `futurenet` and `testnet` transaction volumes. However, it's worth highlighting the trade-off of not having storage limitations of the cluster enforced (likely below 100MB).

- Network presets are defined in [`values.yaml`](https://github.com/stellar/helm-charts/blob/main/charts/soroban-rpc/values.yaml), which currently sets network configuration specific to `futurenet`. You can override this default and use other "canned" `values.yaml` files which have been published for other networks. For example, there is a [`testnet-values.yaml`](https://github.com/stellar/helm-charts/blob/main/charts/soroban-rpc/testnet-values.yaml) file to configure the deployment of the RPC server with the `testnet` network. Include this `--values` parameter in your `helm install` to specify the desired network:
- Network presets are defined in [`values.yaml`](https://github.com/stellar/helm-charts/blob/main/charts/soroban-rpc/values.yaml), which currently sets network configuration specific to `futurenet`. You can override this default and use other "canned" `values.yaml` files which have been published for other networks. For example, there is a [`values-testnet.yaml`](https://github.com/stellar/helm-charts/blob/main/charts/soroban-rpc/values-testnet.yaml) file to configure the deployment of the RPC server with the `testnet` network. Include this `--values` parameter in your `helm install` to specify the desired network:

```bash
--values https://raw.githubusercontent.com/stellar/helm-charts/main/charts/soroban-rpc/testnet-values.yaml
--values https://raw.githubusercontent.com/stellar/helm-charts/main/charts/soroban-rpc/values-testnet.yaml
```

- Configuring RPC to use other custom networks can be accomplished by downloading the [`values.yaml`](https://github.com/stellar/helm-charts/blob/main/charts/soroban-rpc/values.yaml) locally and updating settings under `sorobanRpc.sorobanRpcConfig` and `sorobanRpc.coreConfig`. This is applicable when connecting to specific networks other than the existing files like `values.yaml` available, such as your own standalone network. Include the local `values.yaml` in `helm install`:
Expand Down
102 changes: 102 additions & 0 deletions docs/releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,108 @@ Release candidates are software releases that are also released to the [Testnet]

[Testnet]: reference/networks.mdx

## Protocol 20 (February 5, 2024): Mainnet Edition (Phase 0)

### Software

| Software | Version |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| XDR | [8b9d623ef40423a8462442b86997155f2c04d3a1](https://github.com/stellar/rs-stellar-xdr/commit/8b9d623ef40423a8462442b86997155f2c04d3a1) |
| Soroban Environment | `v20.2.2` |
| Soroban Interface Version | `0` |
| Stellar Core | `v20.2.0` |
| Soroban Rust SDK | `v20.3.2` |
| Soroban CLI | `v20.3.0` |
| Soroban RPC | `v20.3.1` |
| Stellar Horizon | `v2.28.3` |
| Stellar Friendbot | `TBD` |
| Stellar Quickstart | `docker.io/stellar/quickstart:latest@sha256:8d6f6520ad3842042bfe4e271f8b2324ec2f128564487abedd3876cea83af4f1` |
| Stellar JS Stellar Base | [`v11.0.0`](https://github.com/stellar/js-stellar-base/releases/tag/v11.0.0) |
| Stellar JS Stellar SDK | [`v11.2.2`](https://github.com/stellar/js-stellar-sdk/releases/tag/v11.2.2) |
| Freighter | `5.16.0` |
| Laboratory | `v4.1.0` |
| Soroban React Payment dapp | `v3.0.0` |
| Soroban Mint Token dapp | `v3.0.0` |
| Soroban Swap Token dapp | `TBD` |
| Futurenet Network Passphrase | `Test SDF Future Network ; October 2022` |
| Testnet Network Passphrase | `Test SDF Network ; September 2015` |

### Changelog

#### XDR

Run CI for the msrv and latest rust version
Backfill changes to next for json rendering
Bump XDR
Bump version to 20.1.0

#### Soroban Environment

Allow small version-range wiggle room on curve25519-dalek to enable docs.rs nightly build
Bump version to 20.2.2
Enable publish of soroban-simulation crate
Add a function to invoke host function 'end-to-end' in recording mode.
Bug 1283 asset code rendering
Use strkeys for contract IDs and addresses in diagnostic events.
Turn off wasm_reference_types in Wasmi
Prng tests
Remove ConversionError from ScVal/Val conversions
Tightening up metering in auth
Bump XDR to 20.1
Allow negative fee1 kb low
Bump version to 20.2.0
Cover various Symbol conversion code paths with various valid/invalid cases
Run CI for the msrv and latest rust version
Add protocol version method to invoke_contract
Enable VM execution in a WASM environment by guarding time track behind time feature
Add test for checking VM stack depth.
Migrate preflight computations from soroban-rpc
soroban-simulate: Misc fixes
Add CI job to run cargo-semver-checks
Tracing
Add some basic test coverage for e2e_invoke.
Add test vectors for ed25519 edge cases
Trace should not emit diagnostic errors
Bump wasmi to 0.31.1-soroban.20.0.1
Bump version to 20.1.1

#### Soroban Rust SDK

Update soroban-env-\*
Bump version to 20.3.2
Update extend_ttl docs
Bug 1076 conversion error flattening

#### Soroban RPC

Migrate Soroban Tools to Soroban RPC
Use soroban-tools Crates
Pull in Recent Soroban RPC changes from soroban-tools
Mirror Last Remaining PRs from soroban-tools Repo
Add Workflow to Publish soroban-rpc Crate
added user agent config on ha archive pool
Update getTxn rpc with events data
Remove publish-dry-run Workflow
Use external soroban-simulation library for preflight computations
Store and serve the event transaction ID
Reduce event memory footprint
Add diagnostic events to sendTransaction response
Remove panics from internal codebase

#### Soroban CLI

feat: soroban init command
Bump dependencies for pubnet release
Upgrade Ubuntu to 22.04 from 20.04
Bump Go, Rust and Core dependencies
feat/cli: Move config commands to top level
bindings-ts: update to latest SDK & TypeScript, add CI test
TypeScript bindings have been updated to use the latest stellar-sdk
Support multi-auth workflows in typescript bindings
Replace cli xdr command with stellar-xdr cli
Update typescript bindings for latest versions
Warn about RC versions only when using pubnet

## Stable v20.1.0 (January 11, 2024)

### Software
Expand Down
Loading
Loading