XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.5k stars 1.46k forks source link

Adding ledger coverage to server_state #2131

Closed dora-gt closed 5 years ago

dora-gt commented 7 years ago

Hi,

I would like to propose this property: "ledger_coverage" that means how much ledgers the server stores like 0.9 (90%) or 0.01 (1%).

When I started rippled, I could not find my transaction that was made a few days before and I didn't know why. Now I know the reason (maybe...), the server had not acquired the ledger that contains my transaction.

Some of users may think "Why? where is my transaction??", so the property works for those users.

...or, at least, writing "Your rippled does not have complete ledgers with the default rippled.cfg . If you want complete ledger history, set [ledger_history] full." onto "rippled-setup" helps a lot for those users. https://ripple.com/build/rippled-setup/

Thank you.

MarkusTeufelberger commented 7 years ago

complete_ledgers already serves this role nicely imho and helps more than a plain percentage which doesn't tell you if you have the oldest or newest percent of ledgers available...

I agree that the documentation really is not ideal (as well as the default configuration) - stating "Anyone can run their own rippled server that follows the network and keeps a complete copy of the Ripple ledger." in the beginning and then never telling you that by default it will throw away history several times a day is not obvious.

sublimator commented 7 years ago

With 8-12 billion $$$ worth of XRP (depending on the time of day :) maybe they could make a video about setting up rippled :)

MarkusTeufelberger commented 7 years ago

Or maybe they could follow basic packaging guidelines.

...random people running rippled doesn't generate any income though and they likely sell consulting services for "integration".

This issue report however is not about setup videos or complaining about (nonexistent) build artifacts, but about displaying a percentage of history that is available locally.

sublimator commented 7 years ago

Or maybe they could follow basic packaging guidelines.

That too

dora-gt commented 7 years ago

@MarkusTeufelberger Thank you for the reply.

I think your opinion is true if the users know the lowest and latest ledger number then. How can we know it? (Is there API?)

MarkusTeufelberger commented 7 years ago

It is really hard to know without querying external state. Since ledgers are in the 30 million range by now, it might be enough to just assume that max(max(complete_ledgers), closed_ledger/validated_ledger) is the latest ledger, the lowest ledger is fixed to 32570 and likely will stay that way unless someone suddenly discovers a backup of an old machine.

gituser commented 7 years ago

I had exactly same issue. As the workaround you can query https://data.ripple.com/ or make your own instance for getting historical transactions from your account.

I've also opened a feature request - https://github.com/ripple/rippled/issues/2129

nbougalis commented 5 years ago

We are happy to accept PRs that add support for building packages for various distributions.