Why does ripple need to maintain a long ledger? Why is it not enough to maintain only the most previous transaction details? What is the purpose of having a long history ledger?
1 Answer
First note that Ripple uses the term ledger slightly differently than general use.
In Ripple a ledger is the set of all Ripple accounts, all their current balances, all open trade offers, and only the transaction details that justify the changes in this ledger from the previous ledger. A specific Ripple ledger does not contain any other past history of transactions.
Even so, a Ripple ledger can still be somewhat large due to implementation details of it's binary representation. The implementation values lookup speed, syncing efficiency, hashing of sub-parts, and other features over absolute size.
Transaction history in Ripple is stored by servers keeping multiple past ledgers, as many as desired, that form a chain similar to Bitcoin's block chain. However, unlike Bitcoin, it's possible for new transactions to be processed by a Ripple server that only has the last validated ledger. Such servers (validators) are free to discard all older ledgers (and their transactions).
Currently most public facing Ripple servers (that accept transaction submissions and state queries) maintain a near fully history of all past ledgers and can therefore answer queries relating to historical information (e.g. a list of past transactions that effected a specific account via the account_tx API), but there is no requirement for any given Ripple server to make such history available (servers inform clients of the range or ledgers they have available).
It's desirable to have at least a few Ripple servers making as much past history as possible publicly available so that anyone interested can query information about past transactions. For example, it is expected that gateways will run Ripple servers for their customers and would configure at least some of those to store the full history since the gateway's inception (at least).
As the storage requirements for full history increase it may become more common to have "slim" Ripple servers that only store a fixed history (perhaps a few weeks worth) for cost reasons. Ripple clients could use these for faster day-to-day operation (for example if their were more of these or if they were located closer to the client) and only need to query the potentially slower (for example if they're fewer and more overloaded or farther away from the client) servers when more ancient history is required.