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

Remove deprecated ledger fields #3214

Closed
mDuo13 opened this issue Jan 8, 2020 · 2 comments
Closed

Remove deprecated ledger fields #3214

mDuo13 opened this issue Jan 8, 2020 · 2 comments
Labels
API Change Tech Debt Non-urgent improvements

Comments

@mDuo13
Copy link
Collaborator

mDuo13 commented Jan 8, 2020

The JSON format for ledger objects (as returned by the ledger method among others) could probably stand to be better-unified a la transactions but for starters, we could at least remove some of the redundant fields that have been deprecated for years:

The following fields are deprecated and may be removed without further notice: accepted, hash (use ledger_hash instead), seqNum (use ledger_index instead), totalCoins (use total_coins instead).

Given that we've had that statement up since probably 2015 if not earlier, I think we'd be justified in removing the mentioned fields even without having full "API versioning" in place. Anyone who's still using them at this point is almost certainly doing something highly inadvisable if whatever they're doing even still works with all the amendments to the protocol since then.

@mDuo13 mDuo13 added API Change Tech Debt Non-urgent improvements labels Jan 8, 2020
intelliot added a commit to XRPLF/xrpl.js that referenced this issue Jan 9, 2020
Per XRPLF/rippled#3214

The following fields are deprecated and may be removed without further notice: accepted, hash (use ledger_hash instead), seqNum (use ledger_index instead), totalCoins (use total_coins instead).
intelliot added a commit to XRPLF/xrpl.js that referenced this issue Jul 26, 2021
Per XRPLF/rippled#3214

The following fields are deprecated and may be removed without further notice: accepted, hash (use ledger_hash instead), seqNum (use ledger_index instead), totalCoins (use total_coins instead).
ckeshava pushed a commit to ckeshava/rippled that referenced this issue Jul 20, 2022
ckeshava pushed a commit to ckeshava/rippled that referenced this issue Jul 20, 2022
@ckeshava
Copy link
Collaborator

Hello,
I'm a beginner to XRPL and I have a question. After removal of the deprecated fields, this seems to be the output of the command ./rippled ledger validated :

Loading: "/Users/keshava/.config/ripple/rippled.cfg"
2022-Jul-20 17:39:49.765444 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005

{
   "result" : {
      "ledger" : {
         "account_hash" : "725DB4D108D882CEC03FCCFABDEB969A6DB9626E3F2CF1425E61F394A95C631E",
         "close_flags" : 0,
         "close_time" : 711653980,
         "close_time_human" : "2022-Jul-20 17:39:40.000000 UTC",
         "close_time_resolution" : 10,
         "closed" : true,
         "ledger_hash" : "5C0A53406F1AC9D479ACF8114072AF47ECBA2747E8CB409126379117BF8CDA6D",
         "ledger_index" : "73137147",
         "parent_close_time" : 711653972,
         "parent_hash" : "199689B8B6545D92CB19F8A92386C9E23D7009733A1B7906E08D9411969AE8C1",
         "total_coins" : "99989392350108618",
         "transaction_hash" : "470B3CBAA9E3E88C1F98E85C97C736CC530929B62393D1C2E7B38F63F841EA12"
      },
      "ledger_hash" : "5C0A53406F1AC9D479ACF8114072AF47ECBA2747E8CB409126379117BF8CDA6D",
      "ledger_index" : 73137147,
      "status" : "success",
      "validated" : true
   }
}

Two fields ledger_hash and ledger_index seem to be repeated in result and result::ledger. Is the redundancy intended as a feature?

@intelliot
Copy link
Collaborator

I don't know if it's intended, but if that's how it currently is, then I see no strong reason to change it.

ckeshava added a commit to ckeshava/rippled that referenced this issue Jul 10, 2023
Remove deprecated fields from the ledger command:
* accepted
* hash (use ledger_hash instead)
* seqNum (use ledger_index instead)
* totalCoins (use total_coins instead)

Update SHAMapStore unit tests to use `jss:ledger_hash` instead of the
deprecated `hash` field.

Fix XRPLF#3214
ckeshava added a commit to ckeshava/rippled that referenced this issue Sep 22, 2023
Remove deprecated fields from the ledger command:
* accepted
* hash (use ledger_hash instead)
* seqNum (use ledger_index instead)
* totalCoins (use total_coins instead)

Update SHAMapStore unit tests to use `jss:ledger_hash` instead of the
deprecated `hash` field.

Fix XRPLF#3214
ckeshava added a commit to ckeshava/rippled that referenced this issue Sep 25, 2023
Remove deprecated fields from the ledger command:
* accepted
* hash (use ledger_hash instead)
* seqNum (use ledger_index instead)
* totalCoins (use total_coins instead)

Update SHAMapStore unit tests to use `jss:ledger_hash` instead of the
deprecated `hash` field.

Fix XRPLF#3214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Change Tech Debt Non-urgent improvements
Projects
None yet
Development

No branches or pull requests

3 participants