bat-ledger
bat-ledger copied to clipboard
allow for serving of stale balances with a last updated timestamp
recent crashes have reminded us why we had a balance materialized view in the first place. solution may instead be to provide the user with an option to see a more up to date balance in they deem it too out of sync. this would reduce load on services and provide faster response times if an already computed balances was available.
in order to do this well, the following are proposed:
- create snapshots daily so that balances do not get too out of sync
- create another endpoint for publishers to request most recent balance snapshot be recomputed