Skip to content

Commit 75aae6d

Browse files
ElliotFriendclaude
andauthored
Replace stale RPC transaction and event retention guidance (#2595) (#2656)
stellar-rpc retired the time-based `transaction-retention-window` setting in favor of a single ledger-denominated `history-retention-window` covering both transactions and events, with a stock default of 120960 ledgers (~7 days). The docs still described a 24-hour default and a separate seven-day cap. - getTransaction.mdx and the getTransaction/getEvents openrpc method descriptions now describe the ledger-count window, its 120960 default, and how to inspect the live window via getHealth (ledgerRetentionWindow, oldestLedger, latestLedger); regenerated static/stellar-rpc.openrpc.json - softened the RPC README "maximum 7 days" line to a bounded default window Verified against stellar-rpc source and live getHealth on testnet + mainnet. Closes #2595 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7a8791c commit 75aae6d

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/data/apis/rpc/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Running RPC within your own infrastructure provides a number of benefits. You ca
2727

2828
What Stellar RPC is not:
2929

30-
- An indexer for historical data. RPC retains at maximum 7 days of historical data.
30+
- An indexer for historical data. RPC retains only a bounded, recent window of history (about 7 days by default).
3131
- A primary backend service for your application. Use RPC as your gateway to the blockchain, but ingest and index only the data you care about.
3232
- A drop-in replacement for Horizon. Horizon provides several indexing features not commonly supported by RPC nodes. We believe these business opportunities should be passed back to third party applications (indexers, analytics providers, etc) and away from the SDF.
3333

docs/data/apis/rpc/api-reference/methods/getTransaction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class GetTransactionExample {
7979

8080
You can use the `getTransaction` method in the [Stellar Laboratory](https://laboratory.stellar.org) to **retrieve details about a specific transaction**. This is especially useful for checking the status of a transaction to determine whether it has been successfully recorded on the blockchain.
8181

82-
The **default transaction history retention window** in `stellar-rpc` is **24 hours**, but this can be adjusted (up to 7 days) for private Soroban RPC instances using the `transaction-retention-window` configuration setting. For transaction debugging beyond that window, consider indexing the data yourself, using a third-party indexer, or querying **Hubble**—Stellar’s public BigQuery dataset.
82+
`stellar-rpc` retains a bounded, ledger-denominated history of recent transactions and events, configured by a single `history-retention-window` setting. The stock default is **120960 ledgers** (about **7 days**, depending on ledger cadence), and operators of private instances can adjust it. You can inspect the active window and the range of ledgers available on an instance with the [`getHealth`](./getHealth.mdx) method (`ledgerRetentionWindow`, `oldestLedger`, `latestLedger`). For transaction debugging beyond the retained window, consider indexing the data yourself, using a third-party indexer, or querying **Hubble**—Stellar’s public BigQuery dataset.
8383

8484
👉 [View getTransaction on the Lab](https://lab.stellar.org/endpoints/rpc/get-transaction?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;)
8585

openrpc/src/stellar-rpc/methods/getEvents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "getEvents",
33
"summary": "returns contract events",
4-
"description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nStellar-RPC will support querying within a maximum 7 days of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default stellar-rpc retains the most recent 24 hours of events.",
4+
"description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nStellar-RPC retains a bounded, ledger-denominated history of recent transactions and events, configured by a single history-retention-window setting with a stock default of 120960 ledgers (about 7 days, depending on ledger cadence); requests are served from within that retained range. The effective window and the ledgers currently available can be inspected via the getHealth method (ledgerRetentionWindow, oldestLedger, latestLedger).\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.",
55
"externalDocs": {
66
"url": "https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getEvents"
77
},

openrpc/src/stellar-rpc/methods/getTransaction.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "getTransaction",
33
"summary": "returns transaction details",
4-
"description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The stellar-rpc system maintains a restricted history of recently processed transactions, with the default retention window set at 24 hours. For private soroban-rpc instances, it is possible to modify the retention window value by adjusting the transaction-retention-window configuration setting, but we do not recommend values longer than 7 days. For debugging needs that extend beyond this timeframe, it is advisable to index this data yourself, employ a third-party [indexer](https://developers.stellar.org/docs/tools/developer-tools/data-indexers), or query [Hubble](https://developers.stellar.org/docs/data/hubble) (our public BigQuery data set).",
4+
"description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The stellar-rpc system maintains a bounded history of recently processed transactions and events, configured by a single history-retention-window setting expressed in ledgers, with a stock default of 120960 ledgers (about 7 days, depending on ledger cadence). Operators of private stellar-rpc instances can adjust this value. The effective time span and the range of ledgers currently available can be inspected via the getHealth method (ledgerRetentionWindow, oldestLedger, latestLedger). For debugging needs that extend beyond the retained window, it is advisable to index this data yourself, employ a third-party [indexer](https://developers.stellar.org/docs/tools/developer-tools/data-indexers), or query [Hubble](https://developers.stellar.org/docs/data/hubble) (our public BigQuery data set).",
55
"externalDocs": {
66
"url": "https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getTransaction"
77
},

static/stellar-rpc.openrpc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{
3434
"name": "getEvents",
3535
"summary": "returns contract events",
36-
"description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nStellar-RPC will support querying within a maximum 7 days of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default stellar-rpc retains the most recent 24 hours of events.",
36+
"description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nStellar-RPC retains a bounded, ledger-denominated history of recent transactions and events, configured by a single history-retention-window setting with a stock default of 120960 ledgers (about 7 days, depending on ledger cadence); requests are served from within that retained range. The effective window and the ledgers currently available can be inspected via the getHealth method (ledgerRetentionWindow, oldestLedger, latestLedger).\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.",
3737
"externalDocs": {
3838
"url": "https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getEvents"
3939
},
@@ -1094,7 +1094,7 @@
10941094
{
10951095
"name": "getTransaction",
10961096
"summary": "returns transaction details",
1097-
"description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The stellar-rpc system maintains a restricted history of recently processed transactions, with the default retention window set at 24 hours. For private soroban-rpc instances, it is possible to modify the retention window value by adjusting the transaction-retention-window configuration setting, but we do not recommend values longer than 7 days. For debugging needs that extend beyond this timeframe, it is advisable to index this data yourself, employ a third-party [indexer](https://developers.stellar.org/docs/tools/developer-tools/data-indexers), or query [Hubble](https://developers.stellar.org/docs/data/hubble) (our public BigQuery data set).",
1097+
"description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The stellar-rpc system maintains a bounded history of recently processed transactions and events, configured by a single history-retention-window setting expressed in ledgers, with a stock default of 120960 ledgers (about 7 days, depending on ledger cadence). Operators of private stellar-rpc instances can adjust this value. The effective time span and the range of ledgers currently available can be inspected via the getHealth method (ledgerRetentionWindow, oldestLedger, latestLedger). For debugging needs that extend beyond the retained window, it is advisable to index this data yourself, employ a third-party [indexer](https://developers.stellar.org/docs/tools/developer-tools/data-indexers), or query [Hubble](https://developers.stellar.org/docs/data/hubble) (our public BigQuery data set).",
10981098
"externalDocs": {
10991099
"url": "https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getTransaction"
11001100
},

0 commit comments

Comments
 (0)