Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ledger method: update for 1.12.0 #2248

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Conversation

mDuo13
Copy link
Collaborator

@mDuo13 mDuo13 commented Nov 1, 2023

Fix #2158

  • Update for 1.12.0 removing some deprecated fields from the response.
    • Update example API responses and use includes for the example responses.
  • Mark the full and accounts parameters and the corresponding accountState response field as deprecated.
  • Fix an outdated note about close_flags being omitted from the JSON representation of a ledger header.
  • Clean up a few minor formatting inconsistencies, such as the non-alphabetical order of fields in the ledger header page, missing periods at end of description rows, and change "local port" (confusing term) to "localhost" (more clear).

@mDuo13 mDuo13 added this to the rippled 1.12.0 milestone Nov 1, 2023
@mDuo13 mDuo13 added the content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts label Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

Link check report. 554061 links checked.
Success! No broken links found.

Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/ledger_remove_deprecated_fields/

Style Report

@mDuo13 mDuo13 added the needs japanese translation PRs with English changes that need to be added/updated in the Japanese translation of the site label Nov 2, 2023
Copy link
Contributor

@ckeshava ckeshava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @mDuo13 , thanks for this PR. I have asked a few clarifying questions.

I couldn't observe any changes in the behavior of close_flags. Although the description of the PR mentions it, I didn't see any changes. Did I miss something?

@@ -191,27 +107,28 @@ The response follows the [standard format][], with a successful result containin

| `Field` | Type | Description |
|:-------------------------------|:--------|:----------------------------------|
| `ledger` | Object | The complete header data of this ledger. |
| `ledger.account_hash` | String | Hash of all account state information in this ledger, as hex |
| `ledger.accountState` | Array | (Omitted unless requested) All the [account-state information](ledger-data-formats.html) in this ledger. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was of the understanding that we mark a field as [deprecated] and gracefully remove it from the responses. Have we informed the community sufficiently in advance?
My apologies if this was communicated before, I'm not aware of this development.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the communication. The code will still work without changes, but this updates the docs to communicate the deprecation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh okay :+1

| `queue_data` | Array | _(Omitted unless requested with the `queue` parameter)_ Array of objects describing queued transactions, in the same order as the queue. If the request specified `expand` as true, members contain full representations of the transactions, in either JSON or binary depending on whether the request specified `binary` as true. Added by the [FeeEscalation amendment][]. [New in: rippled 0.70.0][] |
| `queue_data` | Array | _(Omitted unless requested with the `queue` parameter)_ Array of objects describing queued transactions, in the same order as the queue. If the request specified `expand` as true, members contain full representations of the transactions, in either JSON or binary depending on whether the request specified `binary` as true. |

The `ledger.accountState` field (omitted unless requested with `"full": true` or `"accounts": true`) is deprecated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `ledger.accountState` field (omitted unless requested with `"full": true` or `"accounts": true`) is deprecated.
The `ledger.accountState` field is deprecated.

^^ I feel this would convey the meaning better, since full and accounts have been deprecated themselves

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt the note was needed because otherwise it might be confusing to be told that a field you don't see is deprecated—people might wonder if it has been removed already. This makes it clear when you should expect to see the field even though it is deprecated.

@@ -238,7 +155,7 @@ If the request specified `"owner_funds": true` and expanded transactions, the re
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
* `noPermission` - If you specified `full` or `accounts` as true, but are not connected to the server as an admin (usually, admin requires connecting on a local port).
* `noPermission` - If you specified `full` or `accounts` as true, but are not connected to the server as an admin (usually, admin requires connecting on localhost).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't full and accounts deprecated? Is it possible to get noPermission error even without these fields?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, but deprecated does not mean removed, so it's still a real error that can occur.

@@ -3144,6 +3144,7 @@ pages:
- en

- md: "@i18n/ja/references/http-websocket-apis/public-api-methods/ledger-methods/ledger.md"
outdated_translation: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you explain what this addition means?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It displays a warning on the Japanese version of the page telling users that the translated version of the page isn't up-to-date with the English version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool!

Copy link
Contributor

@ckeshava ckeshava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me 👍

Copy link
Collaborator

@amarantha-k amarantha-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mDuo13 mDuo13 merged commit 443b48f into master Nov 13, 2023
@mDuo13 mDuo13 deleted the ledger_remove_deprecated_fields branch November 13, 2023 21:28
@tequdev tequdev removed the needs japanese translation PRs with English changes that need to be added/updated in the Japanese translation of the site label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ledger (rippled) with deprecated fields removed
4 participants