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

[Bug fix] Forgetting delegation tokens #3023

Merged
merged 1 commit into from
Sep 22, 2023
Merged

[Bug fix] Forgetting delegation tokens #3023

merged 1 commit into from
Sep 22, 2023

Conversation

grod220
Copy link
Contributor

@grod220 grod220 commented Sep 14, 2023

Two bugs:

  1. Spent commitments are being forgotten if they are delegation tokens. Should flip the logic on that conditional.
  2. Spent swap commitments are never delegation tokens.

Found while pairing 🍐 with @plaidfinch

@grod220 grod220 temporarily deployed to smoke-test September 14, 2023 16:52 — with GitHub Actions Inactive
@grod220 grod220 requested a review from plaidfinch September 14, 2023 16:52
Copy link
Collaborator

@plaidfinch plaidfinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that this wasn't detected by the test suite indicates that the smoke test doesn't exercise a relevant path:

  • delegate
  • proposal submit
  • undelegate
  • delegator vote

This would have failed before this fix, and should succeed now. I recommend adding this scenario to the smoke tests, perhaps in a follow-up PR?

@hdevalence hdevalence merged commit 4242f2b into main Sep 22, 2023
8 checks passed
@hdevalence hdevalence deleted the delegation-bug-fix branch September 22, 2023 01:12
@grod220
Copy link
Contributor Author

grod220 commented Sep 22, 2023

@hdevalence fyi, we were pairing yesterday and found some oddities while trying to write a smoke test for this:

  • In main (before this change), after undelegating, voting appeared to work (not sure how if bug was forgetting)
  • Tallys did not show the vote count
  • Spent denom not showing unbonding token when we used tracing

@plaidfinch will sync with Aubrey to see get additional eyes on the spent_denom sql query.

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

Successfully merging this pull request may close these issues.

3 participants