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

Instances do not count towards locked balance #541

Open
MHHukiewitz opened this issue Jan 4, 2024 · 2 comments
Open

Instances do not count towards locked balance #541

MHHukiewitz opened this issue Jan 4, 2024 · 2 comments
Assignees

Comments

@MHHukiewitz
Copy link
Member

locked_amount should actually display the required balance for the holder-tier instance. Correct calculation of the required balance only happens on the scheduler, so we need to call the scheduler API to see, which instances are scheduled and how much tokens they require, so we can show them on the /balances API.

Screenshot from 2024-01-03 11-41-31

@MHHukiewitz MHHukiewitz self-assigned this Jan 4, 2024
@hoh
Copy link
Member

hoh commented Jan 10, 2024

I thought that pyaleph already computed the required balance for all resources of a user 🤔

Having pyaleph call the scheduler, when the scheduler calls pyaleph, seems like API spaghetti.
Should all that logic not be in pyaleph itself ?

@MHHukiewitz
Copy link
Member Author

Yeah, but then we'd need to have consensus on the scheduler instances of all the CCNs. An alternative to calling the API would be for the scheduler to post an AGGREGATE/POST every time the plan changes.

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