Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I see my balance at N-th block? #9

Open
username1565 opened this issue Nov 6, 2019 · 2 comments
Open

Can I see my balance at N-th block? #9

username1565 opened this issue Nov 6, 2019 · 2 comments

Comments

@username1565
Copy link

Hello. Can I see my balances at N-th block? Can you add this ability in future?

@deemru
Copy link
Owner

deemru commented Nov 6, 2019

The main reason why it is hard, because past states can be reached only with on-the-fly rollbacks from the current state.

So it is hard to implement in common, but it can be done for accounts with not so much transactions.

Will look into it.

@username1565
Copy link
Author

I see this site: https://dev.pywaves.org/balances/
is working by "reports-principle".

But I think this can be realized by caching the requests,
if sorting by assets will be available,
then this can be just cached, after request.

For example:
Request: "WavesExplorer, show me all transactions of token X for address ADDRESS".
Response: "blah-blah - all transactions for token X for ADDRESS + blocks".
Then, only blocks and amounts are cached for this token X for this ADDRESS.
And then, there is more easy to get balance for token X for N-th block,
and collect this values for many tokens.
Else, if this balances was not been requested, then just nulls there or actual balance, according last regularry report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants