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

define delay tolerance for aex9 balance update processing #723

Closed
jyeshe opened this issue Jun 13, 2022 · 8 comments
Closed

define delay tolerance for aex9 balance update processing #723

jyeshe opened this issue Jun 13, 2022 · 8 comments

Comments

@jyeshe
Copy link
Member

jyeshe commented Jun 13, 2022

Please ignore the comment on 1.7.3, my bad. I was remembering about an old discussion on some PR to make the sync back to height bases but it was not on 1.7.3 (very likely to be on an intermediary version before release).

The in memory handling doesn't restore yet the prior behavior which is to be available to run during the same height (per microblock basis).

The DEX use case might be one that demands the aex9 balance to be available as soon as possible.

@jyeshe jyeshe changed the title define delay tolerance on start processing aex9 balance update define delay tolerance aex9 balance update processing Jun 13, 2022
@jyeshe
Copy link
Member Author

jyeshe commented Jun 14, 2022

@thepiwo this issue depends on your prioritization and analysis because I didn't want to block the PR #676. If it should be part of the PR could you comment there please? If not I would like only to be aware of what will be decided with @sborrazas. If needed I would be glad to help with this part of the implementation for the in-memory handling.

@jyeshe jyeshe changed the title define delay tolerance aex9 balance update processing define delay tolerance for aex9 balance update processing Jun 14, 2022
@jyeshe
Copy link
Member Author

jyeshe commented Jun 14, 2022

Relates to "sync AEX-9 transactions instantly" #211

@thepiwo
Copy link
Collaborator

thepiwo commented Jun 15, 2022

I think this can and should be changed to be instant with #676, but I'll let @sborrazas have the final word here.

@sborrazas
Copy link
Contributor

Taking into account @jyeshe's edited comment, IIRC the reason for us having asynchronous tasks for indexing aex9 tokens was that executing these contract functions could potentially take too long, regardless of how long it would take to store them on the DB

So I don't think it would be straightforward to actually have aex9 tokens in real-time, but we could have some additional mechanisms and evaluate different ways where it would be doable

@jyeshe
Copy link
Member Author

jyeshe commented Jun 15, 2022

Taking into account @jyeshe's edited comment, IIRC the reason for us having asynchronous tasks for indexing aex9 tokens was that executing these contract functions could potentially take too long, regardless of how long it would take to store them on the DB

So I don't think it would be straightforward to actually have aex9 tokens in real-time, but we could have some additional mechanisms and evaluate different ways where it would be doable

The starting point of this issue was just to raise a flag that if the we have a release with the PR as is, the aex9 balance update would wait always at least 10 heights to run. One improvement that could be done is to have a dynamic number of async tasks. When I get back I would be please to discuss enhancements to this processing.

@jyeshe
Copy link
Member Author

jyeshe commented Jun 21, 2022

Things to consider regarding async tasks:

  1. Its purpose is to get aex9 balance (not the token) without blocking the sync.
  2. It allows parallel updates on aex9 balances making it closer to the real-time goal (previously it was blocking and sequential).
  3. It depends on the Node to return the contract information and for some contracts it takes more than a minute so this is currently a best-effort task.

@jyeshe
Copy link
Member Author

jyeshe commented Jun 21, 2022

I think this can and should be changed to be instant with #676, but I'll let @sborrazas have the final word here.

you're welcome for the reminder (: otherwise the release would have delayed aex9 results (moving away from the instantaneous goal)

@jyeshe
Copy link
Member Author

jyeshe commented Jun 27, 2022

Closing as the goal is confirmed to be sync AEX-9 transactions instantly

As it's known that the Node takes sometimes more than a minute for big contracts, the goal will be handled through best effort with 1 Mdw instance (until optimization on Node side)

@jyeshe jyeshe closed this as completed Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants