XRPLF / clio

An XRP Ledger API Server
https://xrpl.org
ISC License
61 stars 52 forks source link

Use `can_delete` to tell rippled when it's ok to delete ledgers #40

Open cjcobb23 opened 2 years ago

cjcobb23 commented 2 years ago

Every time clio finishes processing a ledger, clio should send a can_delete request to rippled, with can_delete set to the ledger which clio just processed. This tells rippled that it's safe to delete that ledger from it's nodestore.

rippled may respond with a notEnabled error, if advisory deletion is not enabled. However, I think clio should just keep sending these messages, because the rippled node could be restarted with an updated config, and the messages are tiny.

This will require a new method in ETLLoadBalancer that sends a websocket request to ALL of the connected rippled nodes, instead of one at random.

godexsoft commented 1 year ago

This may be useful in the future. Leaving it for now. See doc here https://xrpl.org/can_delete.html#can_delete