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

Revise or deprecate ledger_header command #3539

Closed
1 of 2 tasks
carlhua opened this issue Jul 15, 2020 · 6 comments · Fixed by #4759
Closed
1 of 2 tasks

Revise or deprecate ledger_header command #3539

carlhua opened this issue Jul 15, 2020 · 6 comments · Fixed by #4759
Labels
API Change RIPD Export Exported from legacy JIRA issue tracking

Comments

@carlhua
Copy link
Contributor

carlhua commented Jul 15, 2020

The ledger_header admin command provides the ledger header information in JSON and binary formats.

The ledger public command, meanwhile, provides the ledger header information in JSON format only.

Rather than having two commands that overlap so closely in functionality, we should consolidate them. Since it doesn't make sense to retrieve the same information in two different formats at once, the most effective solution would be to:

  1. Add a "binary" option to the ledger command (default:false). If true, then return the binary form of the ledger header instead of the JSON form. If false or omitted, return the same information as currently provided.
  2. Deprecate the now completely redundant ledger_header admin command.

Exported from RIPD-889

@carlhua carlhua added API Change RIPD Export Exported from legacy JIRA issue tracking labels Jul 15, 2020
@mDuo13
Copy link
Collaborator

mDuo13 commented Jul 22, 2020

I thought this was done already... Now I'm unsure.

@cjcobb23
Copy link
Contributor

I confirmed that 1 is already done.

@mDuo13
Copy link
Collaborator

mDuo13 commented Nov 12, 2020

It's not documented either, so in that sense it's kind of like it's deprecated?

@mDuo13
Copy link
Collaborator

mDuo13 commented Nov 19, 2020

I guess the only remaining step would be to remove ledger_header entirely from APIv2?

@mDuo13
Copy link
Collaborator

mDuo13 commented Oct 13, 2023

The ledger_header API method is not currently documented and is not implemented in Clio but is currently still available in rippled under API v1. IMO we should remove it (maybe from both, definitely from API v2)

@Bronek
Copy link
Collaborator

Bronek commented Oct 13, 2023

I'm on it Done in #4759

@intelliot intelliot linked a pull request Oct 16, 2023 that will close this issue
7 tasks
intelliot pushed a commit that referenced this issue Oct 24, 2023
Remove `tx_history` and `ledger_header` methods from API version 2.

Update `RPC::Handler` to allow for methods (or method implementations)
to be API version specific. This partially resolves #4727. We can now
store multiple handlers with the same name, as long as they belong to
different (non-overlapping) API versions. This necessarily impacts the
handler lookup algorithm and its complexity; however, there is no
performance loss on x86_64 architecture, and only minimal performance
loss on arm64 (around 10ns). This design change gives us extra
flexibility evolving the API in the future, including other parts of
#4727.

In API version 2, `tx_history` and `ledger_header` are no longer
recognised; if they are called, `rippled` will return error
`unknownCmd`

Resolve #3638

Resolve #3539
sophiax851 pushed a commit to sophiax851/rippled that referenced this issue Jun 12, 2024
Remove `tx_history` and `ledger_header` methods from API version 2.

Update `RPC::Handler` to allow for methods (or method implementations)
to be API version specific. This partially resolves XRPLF#4727. We can now
store multiple handlers with the same name, as long as they belong to
different (non-overlapping) API versions. This necessarily impacts the
handler lookup algorithm and its complexity; however, there is no
performance loss on x86_64 architecture, and only minimal performance
loss on arm64 (around 10ns). This design change gives us extra
flexibility evolving the API in the future, including other parts of
XRPLF#4727.

In API version 2, `tx_history` and `ledger_header` are no longer
recognised; if they are called, `rippled` will return error
`unknownCmd`

Resolve XRPLF#3638

Resolve XRPLF#3539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Change RIPD Export Exported from legacy JIRA issue tracking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants