fix(book_changes): add "validated" field and reduce RPC latency (#5096)

Update book_changes RPC to reduce latency, add "validated" field, and accept shortcut strings (current, closed, validated) for ledger_index.

`"validated": true` indicates that the transaction has been included in a validated ledger so the result of the transaction is immutable.

Fix #5033

Fix #5034

Fix #5035

Fix #5036

---------

Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
This commit is contained in:
Chenna Keshava B S
2024-09-19 08:39:10 -07:00
committed by GitHub
parent 9a6af9c431
commit b6391fe011
4 changed files with 126 additions and 6 deletions

View File

@@ -26,7 +26,15 @@ In `api_version: 2`, the `signer_lists` field [will be moved](#modifications-to-
The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it is not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode).
## XRP Ledger server version 2.0.0
### Breaking change in 2.3
- `book_changes`: If the requested ledger version is not available on this node, a `ledgerNotFound` error is returned and the node does not attempt to acquire the ledger from the p2p network (as with other non-admin RPCs).
Admins can still attempt to retrieve old ledgers with the `ledger_request` RPC.
### Addition in 2.3
- `book_changes`: Returns a `validated` field in its response, which was missing in prior versions.
### Additions in 2.2