As ledger contains a sequence of transaction, How can I query the current state of ledger and Historic data from ledger.