mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45: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
|
||||
[fixMasterKeyAsRegularKey amendment]: /resources/known-amendments.md#fixmasterkeyasregularkey
|
||||
[fixNFTokenDirV1 amendment]: /resources/known-amendments.md#fixnftokendirv1
|
||||
[fixNFTokenPageLinks amendment]: /resources/known-amendments.md#fixnftokenpagelinks
|
||||
[fixNFTokenRemint amendment]: /resources/known-amendments.md#fixnftokenremint
|
||||
[fixPayChanRecipientOwnerDir amendment]: /resources/known-amendments.md#fixpaychanrecipientownerdir
|
||||
[fixPreviousTxnID amendment]: /resources/known-amendments.md#fixprevioustxnid
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# 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")
|
||||
|
||||
_(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.
|
||||
|
||||
|
||||
@@ -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" /%}
|
||||
Reference in New Issue
Block a user