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

Should namadac bonds show 0 amount remaining bonds? #1232

Closed
brentstone opened this issue Mar 17, 2023 · 3 comments · Fixed by #1239
Closed

Should namadac bonds show 0 amount remaining bonds? #1232

brentstone opened this issue Mar 17, 2023 · 3 comments · Fixed by #1239

Comments

@brentstone
Copy link
Collaborator

Currently for a client query of the bonds, if there is no amount remaining in a bond, the CLI still prints it. For example, consider a delegation of 200 NAM in epoch 0, then a delegation of 300 NAM in epoch 8, followed by an unbond of 412 tokens, upon querying the bonds, one would see something like:

Delegations from atest1v4ehgw36g4rrxd6pgfp5vwf3x3zrqv6xxue5g3j9xym52d6rx4znyv29xqcrs33eg5unvvzyr35txx to atest1v4ehgw36xgmnys6yxscnsd3cxvcrvvzxxscyvwzygymnj3fkxdz52vp4x3zrw3p3xgmnwse5p73tj8:
  Remaining active bond from epoch 0: Δ 88
  Remaining active bond from epoch 8: Δ 0
Bonds total: 88
Withdrawable total: 0

This may pose an annoyance/issue with the load tester (@bengtlofgren @Fraccaman ?) calculating bonds. Perhaps we want to make sure that this 0-amount bond info does not get written to the output. We could do this by making sure the library code skips over empty bonds, or we could ensure that these bond entries get deleted in storage when their amount gets reduced to 0 during unbond. One possibly valuable bit of information that the current query communicates is that there was a bond submitted during epoch 6 (active at 8), but not sure if we care to convey this.

@brentstone
Copy link
Collaborator Author

@tzemanovic

@tzemanovic
Copy link
Member

I think we should filter out any 0s

@Fraccaman
Copy link
Member

agree with @tzemanovic

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

Successfully merging a pull request may close this issue.

3 participants