mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 12:15:50 +00:00
Merge pull request #2971 from XRPLF/ledgerstatefix-docs
Add ledgerstatefix txn doc
This commit is contained in:
@@ -403,6 +403,7 @@
|
|||||||
[fixFillOrKill amendment]: /resources/known-amendments.md#fixfillorkill
|
[fixFillOrKill amendment]: /resources/known-amendments.md#fixfillorkill
|
||||||
[fixMasterKeyAsRegularKey amendment]: /resources/known-amendments.md#fixmasterkeyasregularkey
|
[fixMasterKeyAsRegularKey amendment]: /resources/known-amendments.md#fixmasterkeyasregularkey
|
||||||
[fixNFTokenDirV1 amendment]: /resources/known-amendments.md#fixnftokendirv1
|
[fixNFTokenDirV1 amendment]: /resources/known-amendments.md#fixnftokendirv1
|
||||||
|
[fixNFTokenPageLinks amendment]: /resources/known-amendments.md#fixnftokenpagelinks
|
||||||
[fixNFTokenRemint amendment]: /resources/known-amendments.md#fixnftokenremint
|
[fixNFTokenRemint amendment]: /resources/known-amendments.md#fixnftokenremint
|
||||||
[fixPayChanRecipientOwnerDir amendment]: /resources/known-amendments.md#fixpaychanrecipientownerdir
|
[fixPayChanRecipientOwnerDir amendment]: /resources/known-amendments.md#fixpaychanrecipientownerdir
|
||||||
[fixPreviousTxnID amendment]: /resources/known-amendments.md#fixprevioustxnid
|
[fixPreviousTxnID amendment]: /resources/known-amendments.md#fixprevioustxnid
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
# AMMClawback
|
# AMMClawback
|
||||||
|
|
||||||
<!--> Add link to github source after feature is merged into devnet. <-->
|
|
||||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/AMMClawback.cpp "Source")
|
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/AMMClawback.cpp "Source")
|
||||||
|
|
||||||
_(Added by the [AMM amendment][])_
|
_(Added by the [AMMClawback amendment][])_
|
||||||
|
|
||||||
Claw back tokens from a holder who has deposited your issued tokens into an AMM pool.
|
Claw back tokens from a holder who has deposited your issued tokens into an AMM pool.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
---
|
||||||
|
seo:
|
||||||
|
description: Repair corruptions to the XRP ledger.
|
||||||
|
labels:
|
||||||
|
- Utilities
|
||||||
|
- Troubleshooting
|
||||||
|
---
|
||||||
|
# LedgerStateFix
|
||||||
|
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/LedgerStateFix.cpp "Source")
|
||||||
|
|
||||||
|
`LedgerStateFix` is a general purpose transaction used to fix specific issues affecting the XRP ledger. You submit the transaction with the `LedgerFixType` value set to indicate the particular error state to correct.
|
||||||
|
|
||||||
|
_(Added by the [fixNFTokenPageLinks amendment][])_
|
||||||
|
|
||||||
|
|
||||||
|
## Example {% $frontmatter.seo.title %} JSON
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||||
|
"Fee" : "2000000",
|
||||||
|
"LedgerFixType" : 1,
|
||||||
|
"Owner" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||||
|
"Sequence" : 2,
|
||||||
|
"TransactionType" : "LedgerStateFix"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
{% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%}
|
||||||
|
|
||||||
|
| Field | JSON Type | [Internal Type][] | Required? | Description |
|
||||||
|
|:----------------|:---------------------|:------------------|:----------|:------------|
|
||||||
|
| `LedgerFixType` | Number | UInt16 | Yes | The type of fix to apply. See [LedgerFixType](#ledgerfixtype) for possible values. Currently the only type is `1`, which fixes the NFToken directory for a single account. |
|
||||||
|
| `Owner` | String - [Address][] | Account | No | _(Required if `LedgerFixType` is `1`.)_ The account that owns the NFToken directory to fix. Does not need any relationship to the sender of the transaction. |
|
||||||
|
|
||||||
|
|
||||||
|
## LedgerFixType
|
||||||
|
|
||||||
|
`LedgerStateFix` transactions are targeted solutions for rare and specific issues. They can only be used to fix a specific type of ledger corruption, described below.
|
||||||
|
|
||||||
|
### Type 1
|
||||||
|
|
||||||
|
Corrupt NFT directories resulting from these conditions:
|
||||||
|
|
||||||
|
- At least two NFToken pages were in the directory.
|
||||||
|
- The next-to-last page was completely full, holding 32 NFTokens.
|
||||||
|
- The last page of the directory contained only one NFToken.
|
||||||
|
- A transaction removed the last remaining token from the last page, causing the directory to delete the page.
|
||||||
|
|
||||||
|
When these conditions were met, the NFToken directory didn't properly update page links, causing holes in the directory when new last pages were created for additional NFTokens.
|
||||||
|
|
||||||
|
The [fixNFTokenPageLinks amendment][] prevents new instances of this type of ledger corruption from happening.
|
||||||
|
|
||||||
|
|
||||||
|
## Special Transaction Cost
|
||||||
|
|
||||||
|
The `LedgerStateFix` transaction is rare and potentially compute intensive, so the transaction must pay a special [transaction cost][] equal to at least the [owner reserve](../../../../concepts/accounts/reserves.md) for one item (currently {% $env.PUBLIC_OWNER_RESERVE %}).
|
||||||
|
|
||||||
|
The transaction cost always applies when a transaction is included in a validated ledger, even if the transaction fails. (See [Error Cases](#error-cases).) To greatly reduce the chances of paying the high transaction cost if the transaction fails, [submit the transaction](../../../http-websocket-apis/public-api-methods/transaction-methods/submit.md) with `fail_hard` enabled.
|
||||||
|
|
||||||
|
|
||||||
|
## Error Cases
|
||||||
|
|
||||||
|
Besides errors that can occur for all transactions, {% $frontmatter.seo.title %} transactions can result in the following [transaction result codes](../transaction-results/index.md):
|
||||||
|
|
||||||
|
| Error Code | Description |
|
||||||
|
|:-----------------------------|:------------|
|
||||||
|
| `tecFAILED_PROCESSING` | The transaction failed to apply the fix. For example, the transaction attempted to repair an NFT directory that was not broken. |
|
||||||
|
| `tecOBJECT_NOT_FOUND` | A ledger entry specified in the transaction does not exist. For example, the transaction tried to repair the NFT directory of an account that does not hold any NFTs. |
|
||||||
|
| `tefINVALID_LEDGER_FIX_TYPE` | The [`LedgerFixType`](#ledgerfixtype) value specified in the transaction is not valid. Currently, the only valid type is `1`. |
|
||||||
|
|
||||||
|
{% raw-partial file="/docs/_snippets/common-links.md" /%}
|
||||||
@@ -17,13 +17,13 @@ This list is updated manually. For a live view of amendment voting, see the Amen
|
|||||||
|
|
||||||
| Name | Introduced | Status |
|
| Name | Introduced | Status |
|
||||||
|:----------------------------------|:-----------|:------------------------------|
|
|:----------------------------------|:-----------|:------------------------------|
|
||||||
| [AMMClawback][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [AMMClawback][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/8672DFD11FCF79F8E8F92E300187E8E533899ED8C8CF5AFB1A9C518195C16261" %}Enabled: 2025-01-30{% /badge %} |
|
||||||
| [Credentials][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [Credentials][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
||||||
| [fixAMMv1_2][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [fixAMMv1_2][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/71D5031A5BD927BDFE424E51699E69F2784097D615D0852BF20C168BA9B5EA76" %}Enabled: 2025-01-30{% /badge %} |
|
||||||
| [fixEnforceNFTokenTrustline][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [fixEnforceNFTokenTrustline][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/606FA84C4BA30F67582C11A39BBFC11A9D994E114CD515E9F63FC7D8701A8ED9" %}Enabled: 2025-01-30{% /badge %} |
|
||||||
| [fixInnerObjTemplate2][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [fixInnerObjTemplate2][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/426314C8BC64BA339E97E53B278602ADC44F115056274BF7971F694C9A8AF946" %}Enabled: 2025-01-30{% /badge %} |
|
||||||
| [fixNFTokenPageLinks][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [fixNFTokenPageLinks][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/2D9A29768A7FA4BAC01DF1941380077E304785279E5E49267EC269F53ABADF5A" %}Enabled: 2025-01-30{% /badge %} |
|
||||||
| [fixReducedOffersV2][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [fixReducedOffersV2][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/6D325D5EFF8230F1FECA3EE6418C9678637F3F56B0CA247013F70B3BDCFE75C8" %}Enabled: 2025-01-30{% /badge %} |
|
||||||
| [MPTokensV1][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [MPTokensV1][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
||||||
| [NFTokenMintOffer][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
| [NFTokenMintOffer][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} |
|
||||||
| [fixXChainRewardRounding][] | v2.2.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.2.0" %}Open for Voting: 2024-06-04{% /badge %} |
|
| [fixXChainRewardRounding][] | v2.2.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.2.0" %}Open for Voting: 2024-06-04{% /badge %} |
|
||||||
@@ -169,7 +169,7 @@ Adds several new transaction result codes.
|
|||||||
| Amendment | AMMClawback |
|
| Amendment | AMMClawback |
|
||||||
|:-------------|:------------|
|
|:-------------|:------------|
|
||||||
| Amendment ID | 726F944886BCDF7433203787E93DD9AA87FAB74DFE3AF4785BA03BEFC97ADA1F |
|
| Amendment ID | 726F944886BCDF7433203787E93DD9AA87FAB74DFE3AF4785BA03BEFC97ADA1F |
|
||||||
| Status | Open for Voting |
|
| Status | Enabled |
|
||||||
| Default Vote (Latest stable release) | No |
|
| Default Vote (Latest stable release) | No |
|
||||||
| Pre-amendment functionality retired? | No |
|
| Pre-amendment functionality retired? | No |
|
||||||
|
|
||||||
@@ -732,7 +732,7 @@ Fixes AMM offer rounding and low quality order book offers from blocking the AMM
|
|||||||
| Amendment | fixAMMv1_2 |
|
| Amendment | fixAMMv1_2 |
|
||||||
|:-------------|:-----------|
|
|:-------------|:-----------|
|
||||||
| Amendment ID | 1E7ED950F2F13C4F8E2A54103B74D57D5D298FFDBD005936164EE9E6484C438C |
|
| Amendment ID | 1E7ED950F2F13C4F8E2A54103B74D57D5D298FFDBD005936164EE9E6484C438C |
|
||||||
| Status | Open for Voting |
|
| Status | Enabled |
|
||||||
| Default Vote (Latest stable release) | No |
|
| Default Vote (Latest stable release) | No |
|
||||||
| Pre-amendment functionality retired? | No |
|
| Pre-amendment functionality retired? | No |
|
||||||
|
|
||||||
@@ -806,7 +806,7 @@ This amendment has no effect unless the [DID][] amendment is enabled.
|
|||||||
| Amendment | fixEnforceNFTokenTrustline |
|
| Amendment | fixEnforceNFTokenTrustline |
|
||||||
|:-------------|:---------------------------|
|
|:-------------|:---------------------------|
|
||||||
| Amendment ID | 763C37B352BE8C7A04E810F8E462644C45AFEAD624BF3894A08E5C917CF9FF39 |
|
| Amendment ID | 763C37B352BE8C7A04E810F8E462644C45AFEAD624BF3894A08E5C917CF9FF39 |
|
||||||
| Status | Open for Voting |
|
| Status | Enabled |
|
||||||
| Default Vote (Latest stable release) | No |
|
| Default Vote (Latest stable release) | No |
|
||||||
| Pre-amendment functionality retired? | No |
|
| Pre-amendment functionality retired? | No |
|
||||||
|
|
||||||
@@ -854,7 +854,7 @@ Currently, the inner object template isn't set upon object creation. If the obje
|
|||||||
| Amendment | fixInnerObjTemplate2 |
|
| Amendment | fixInnerObjTemplate2 |
|
||||||
|:-------------|:---------------------|
|
|:-------------|:---------------------|
|
||||||
| Amendment ID | 9196110C23EA879B4229E51C286180C7D02166DA712559F634372F5264D0EC59 |
|
| Amendment ID | 9196110C23EA879B4229E51C286180C7D02166DA712559F634372F5264D0EC59 |
|
||||||
| Status | Open for Voting |
|
| Status | Enabled |
|
||||||
| Default Vote (Latest stable release) | No |
|
| Default Vote (Latest stable release) | No |
|
||||||
| Pre-amendment functionality retired? | No |
|
| Pre-amendment functionality retired? | No |
|
||||||
|
|
||||||
@@ -926,7 +926,7 @@ This amendment has no effect unless the [NonFungibleTokensV1][] amendment is ena
|
|||||||
| Amendment | fixNFTokenPageLinks |
|
| Amendment | fixNFTokenPageLinks |
|
||||||
|:-------------|:--------------------|
|
|:-------------|:--------------------|
|
||||||
| Amendment ID | C7981B764EC4439123A86CC7CCBA436E9B3FF73B3F10A0AE51882E404522FC41 |
|
| Amendment ID | C7981B764EC4439123A86CC7CCBA436E9B3FF73B3F10A0AE51882E404522FC41 |
|
||||||
| Status | Open for Voting |
|
| Status | Enabled |
|
||||||
| Default Vote (Latest stable release) | No |
|
| Default Vote (Latest stable release) | No |
|
||||||
| Pre-amendment functionality retired? | No |
|
| Pre-amendment functionality retired? | No |
|
||||||
|
|
||||||
@@ -1088,7 +1088,7 @@ Without this amendment, an offer with very small amounts remaining can have a a
|
|||||||
| Amendment | fixReducedOffersV2 |
|
| Amendment | fixReducedOffersV2 |
|
||||||
|:-------------|:-------------------|
|
|:-------------|:-------------------|
|
||||||
| Amendment ID | 31E0DA76FB8FB527CADCDF0E61CB9C94120966328EFA9DCA202135BAF319C0BA |
|
| Amendment ID | 31E0DA76FB8FB527CADCDF0E61CB9C94120966328EFA9DCA202135BAF319C0BA |
|
||||||
| Status | Open for Voting |
|
| Status | Enabled |
|
||||||
| Default Vote (Latest stable release) | No |
|
| Default Vote (Latest stable release) | No |
|
||||||
| Pre-amendment functionality retired? | No |
|
| Pre-amendment functionality retired? | No |
|
||||||
|
|
||||||
|
|||||||
@@ -377,6 +377,7 @@
|
|||||||
- page: docs/references/protocol/transactions/types/escrowcancel.md
|
- page: docs/references/protocol/transactions/types/escrowcancel.md
|
||||||
- page: docs/references/protocol/transactions/types/escrowcreate.md
|
- page: docs/references/protocol/transactions/types/escrowcreate.md
|
||||||
- page: docs/references/protocol/transactions/types/escrowfinish.md
|
- page: docs/references/protocol/transactions/types/escrowfinish.md
|
||||||
|
- page: docs/references/protocol/transactions/types/ledgerstatefix.md
|
||||||
- page: docs/references/protocol/transactions/types/mptokenauthorize.md
|
- page: docs/references/protocol/transactions/types/mptokenauthorize.md
|
||||||
- page: docs/references/protocol/transactions/types/mptokenissuancecreate.md
|
- page: docs/references/protocol/transactions/types/mptokenissuancecreate.md
|
||||||
- page: docs/references/protocol/transactions/types/mptokenissuancedestroy.md
|
- page: docs/references/protocol/transactions/types/mptokenissuancedestroy.md
|
||||||
|
|||||||
Reference in New Issue
Block a user