From 00262880b92278a4883d9d68b71acceadf724252 Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Fri, 12 Jan 2024 01:09:01 -0800 Subject: [PATCH 1/2] additional 2.0 doc updates --- assets/js/apitool-methods-ws.js | 9 ++ content/_snippets/rippled-api-links.md | 2 + .../server-info-methods/server_definitions.md | 108 ++++++++++++++++++ content/resources/known-amendments.md | 43 +++++++ dactyl-config.yml | 5 + 5 files changed, 167 insertions(+) create mode 100644 content/references/http-websocket-apis/public-api-methods/server-info-methods/server_definitions.md diff --git a/assets/js/apitool-methods-ws.js b/assets/js/apitool-methods-ws.js index 0ad9b21dc7..93ae90f121 100644 --- a/assets/js/apitool-methods-ws.js +++ b/assets/js/apitool-methods-ws.js @@ -581,6 +581,15 @@ Request('fee', { } }) +Request('server_definitions', { + description: "Returns an SDK-compatible `definitions.json`, generated from the rippled server being queried.", + link: "server_definitions.html", + body: { + "id": 1, + "command": "server_definitions" + } +}) + Request('server_info', { description: "Reports a human-readable version of various information about the rippled server being queried.", link: "server_info.html", diff --git a/content/_snippets/rippled-api-links.md b/content/_snippets/rippled-api-links.md index 44bb96c542..0603a043ae 100644 --- a/content/_snippets/rippled-api-links.md +++ b/content/_snippets/rippled-api-links.md @@ -226,6 +226,8 @@ "fix1578", "fix1623", "fixCheckThreading", + "fixDisallowIncomingV1", + "fixFillOrKill", "fixMasterKeyAsRegularKey", "fixNFTokenDirV1", "fixNFTokenRemint", diff --git a/content/references/http-websocket-apis/public-api-methods/server-info-methods/server_definitions.md b/content/references/http-websocket-apis/public-api-methods/server-info-methods/server_definitions.md new file mode 100644 index 0000000000..80efb87a04 --- /dev/null +++ b/content/references/http-websocket-apis/public-api-methods/server-info-methods/server_definitions.md @@ -0,0 +1,108 @@ +--- +html: server_definitions.html +parent: server-info-methods.html +blurb: Retrieve an SDK-compatible `definitions.json`, generated from the `rippled` instance currently running. +labels: + - Core Server +--- +# server_definitions + +[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/ServerInfo.cpp#L43 "Source") + +The `server_definitions` command returns an SDK-compatible `definitions.json`, generated from the `rippled` instance currently running. You can use this to query a node in a network, quickly receiving the definitions necessary to serialize/deserialize its binary data. + + +## Request Format +An example of the request format: + + + +*WebSocket* + +```json +{ + "id": 2, + "command": "server_definitions" +} +``` + + + +[Try it! >](websocket-api-tool.html#server_definitions) + +The request does not take any parameters. + + +## Response Format + +An example of a successful response: + + + +*WebSocket* + +```json +{ + "id": 1, + "result": { + "FIELDS": [ + [ + "Generic", + { + "isSerialized": false, + "isSigningField": false, + "isVLEncoded": false, + "nth": 0, + "type": "Unknown" + } + ], + [ + "Invalid", + { + "isSerialized": false, + "isSigningField": false, + "isVLEncoded": false, + "nth": -1, + "type": "Unknown" + } + ], + [ + "ObjectEndMarker", + { + "isSerialized": true, + "isSigningField": true, + "isVLEncoded": false, + "nth": 1, + "type": "STObject" + } + ], + [ + "ArrayEndMarker", + { + "isSerialized": true, + "isSigningField": true, + "isVLEncoded": false, + "nth": 1, + "type": "STArray" + } + ] + ... + ] + } +} +``` + + + +To see a full `definitions.json` file and descriptions of the top-level fields, see: [Definitions File](serialization.html#definitions-file). + + +## Possible Errors + +Any of the [universal error types][]. + + + +{% include '_snippets/rippled-api-links.md' %} +{% include '_snippets/tx-type-links.md' %} +{% include '_snippets/rippled_versions.md' %} diff --git a/content/resources/known-amendments.md b/content/resources/known-amendments.md index 3174795b23..b358abc573 100644 --- a/content/resources/known-amendments.md +++ b/content/resources/known-amendments.md @@ -16,6 +16,8 @@ The following is a comprehensive list of all known [amendments](amendments.html) | Name | Introduced | Status | |:----------------------------------|:-----------|:------------------------------| +| [fixDisallowIncomingV1][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | +| [fixFillOrKill][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | | [DID][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | | [XChainBridge][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | | [AMM][] | v1.12.0 | [Open for Voting: 2023-09-06](https://xrpl.org/blog/2023/rippled-1.12.0.html "BADGE_80d0e0") | @@ -106,6 +108,47 @@ The following is a list of known [amendments](amendments.html) that have been re ## Details about Known Amendments +### fixDisallowIncomingV1 +[fixDisallowIncomingV1]: #fixDisallowIncomingV1 + +| Amendment | fixDisallowIncomingV1 | +|:-------------|:--------------| +| Amendment ID | 15D61F0C6DB6A2F86BCF96F1E2444FEC54E705923339EC175BD3E517C8B3FF91 | +| Status | Open for Voting | +| Default Vote (Latest stable release) | No | +| Pre-amendment functionality retired? | No | + +This amendment fixes an issue with approving trustlines after a user enables the `lsfDisallowIncomingTrustline` flag on their account. + +To recreate this issue: + +1. An issuer sets `asfRequireAuth` on their account. +2. The user sets `asfDisallowIncomingTrustline` on their account. +3. The user submits a `SetTrust` transaction to the issuer. +4. The issuer is unable to authorize the trustline. + +With this amendment, the issuer can now authorize the trustline. + +This amendment has no effect unless the [DisallowIncoming][] amendment is enabled. + + +### fixFillOrKill +[fixFillOrKill]: #fixFillOrKill + +| Amendment | fixFillOrKill | +|:-------------|:--------------| +| Amendment ID | 3318EA0CF0755AF15DAC19F2B5C5BCBFF4B78BDD57609ACCAABE2C41309B051A | +| Status | Open for Voting | +| Default Vote (Latest stable release) | No | +| Pre-amendment functionality retired? | No | + +This amendment fixes an issue introduced in the `FlowCross` amendment. Offers with the `tfFillOrKill` flag set and `tfSell` not set will fail if the exchange rate on the offer is better than, but doesn't exactly match, the order book rate. + +This amendment enables the payment engine to properly handle this scenario and allow offers to cross. + +This amendment has no effect unless the [FlowCross][] amendment is enabled. + + ### DID [DID]: #did diff --git a/dactyl-config.yml b/dactyl-config.yml index ca5870ebb7..ab2728444a 100644 --- a/dactyl-config.yml +++ b/dactyl-config.yml @@ -3593,6 +3593,11 @@ pages: targets: - ja + - md: references/http-websocket-apis/public-api-methods/server-info-methods/server_definitions.md + targets: + - en + - ja + - md: references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md targets: - en From c52ef751370441a3307e9409d4e31971bb702756 Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Wed, 17 Jan 2024 10:41:54 -0800 Subject: [PATCH 2/2] fix links --- assets/js/apitool-methods-ws.js | 2 +- content/resources/known-amendments.md | 6 +++--- dactyl-config.yml | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/js/apitool-methods-ws.js b/assets/js/apitool-methods-ws.js index 93ae90f121..3036a8b7d3 100644 --- a/assets/js/apitool-methods-ws.js +++ b/assets/js/apitool-methods-ws.js @@ -582,7 +582,7 @@ Request('fee', { }) Request('server_definitions', { - description: "Returns an SDK-compatible `definitions.json`, generated from the rippled server being queried.", + description: "Returns an SDK-compatible definitions.json, generated from the rippled server being queried.", link: "server_definitions.html", body: { "id": 1, diff --git a/content/resources/known-amendments.md b/content/resources/known-amendments.md index b358abc573..eb6ae620e0 100644 --- a/content/resources/known-amendments.md +++ b/content/resources/known-amendments.md @@ -16,9 +16,9 @@ The following is a comprehensive list of all known [amendments](amendments.html) | Name | Introduced | Status | |:----------------------------------|:-----------|:------------------------------| +| [DID][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | | [fixDisallowIncomingV1][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | | [fixFillOrKill][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | -| [DID][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | | [XChainBridge][] | v2.0.0 | [Open for Voting: 2024-01-09](https://xrpl.org/blog/2024/rippled-2.0.0.html "BADGE_80d0e0") | | [AMM][] | v1.12.0 | [Open for Voting: 2023-09-06](https://xrpl.org/blog/2023/rippled-1.12.0.html "BADGE_80d0e0") | | [Clawback][] | v1.12.0 | [Open for Voting: 2023-09-06](https://xrpl.org/blog/2023/rippled-1.12.0.html "BADGE_80d0e0") | @@ -109,7 +109,7 @@ The following is a list of known [amendments](amendments.html) that have been re ## Details about Known Amendments ### fixDisallowIncomingV1 -[fixDisallowIncomingV1]: #fixDisallowIncomingV1 +[fixDisallowIncomingV1]: #fixdisallowincomingv1 | Amendment | fixDisallowIncomingV1 | |:-------------|:--------------| @@ -133,7 +133,7 @@ This amendment has no effect unless the [DisallowIncoming][] amendment is enable ### fixFillOrKill -[fixFillOrKill]: #fixFillOrKill +[fixFillOrKill]: #fixfillorkill | Amendment | fixFillOrKill | |:-------------|:--------------| diff --git a/dactyl-config.yml b/dactyl-config.yml index ab2728444a..a1d8344148 100644 --- a/dactyl-config.yml +++ b/dactyl-config.yml @@ -216,6 +216,8 @@ targets: # Fix links from untranslated open-closed-validated-ledgers.html: "consensus-principles-and-rules.html#simplifying-the-problem": "consensus-principles-and-rules.html#問題の単純化" "consensus-structure.html#validation": "consensus-structure.html#検証" + # Fix link to Japanese definitions-file + "serialization.html#definitions-file": "serialization.html#定義ファイル" link_re_subs: # Fix link from untranslated account_nfts.html. # Because the replacement contains the original as a substring,