ripple / rippled-historical-database

SQL database as a canonical source of historical data
99 stars 68 forks source link

Api that returns ledger gaps and last ledger sequence processed by importer #109

Closed offlinehacker closed 7 years ago

offlinehacker commented 8 years ago

Currently there's no way to get ledger gaps and last ledger sequence from data api. We would need this for reliable transaction processing.

shekenahglory commented 8 years ago

if you run /v2/ledgers with no parameters, you'll get the last ledger imported - but its not guaranteed that all ledgers before that one have been imported. It sounds like you are looking for the last ledger that was imported in unbroken sequence - right now we have /v2/health/importer?verbose=true which will show the time gap between now and the last imported (ledger gap) and last sequential (validation gap) - we could modify this endpoint to surface the sequence # of these as well. Is that what you are looking for?

Also its important to note that some of the aggregated data can still contain gaps even if we've already imported all the ledgers, since the real time import process does not require those to be reliably calculated in order to advance.

shekenahglory commented 7 years ago

the health check now includes the last ledger imported in unbroken sequence as last_validated_ledger - https://data.ripple.com/v2/health/importer?verbose=true

offlinehacker commented 7 years ago

Thanks, this helps a lot!

offlinehacker commented 7 years ago

I'm closing this issue, as I think it's solved by having last_validated_ledger field.