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

Fixes for non-default staking token #3574

Merged
merged 2 commits into from
Feb 9, 2019

Conversation

zmanian
Copy link
Member

@zmanian zmanian commented Feb 9, 2019

Fixes two issues discovered when using an alternative bond token denomination other than stake

  • Invariant checker uses default denom
  • collect-gentx uses default denom when computing supply.

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Copy link
Member

@jackzampolin jackzampolin left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jackzampolin jackzampolin merged commit e199604 into develop Feb 9, 2019
@jackzampolin jackzampolin deleted the zaki/InvariantCheckerBondDenom branch February 9, 2019 20:22
@zmanian zmanian mentioned this pull request Feb 9, 2019
@njmurarka
Copy link
Contributor

Sorry to bring this up, but is this resolved?

I noticed that when I ran the gentx command, the denom value in the generated file referred to "stake" instead of the non-default staking token foo that I was using when I manually edited config/genesis.json earlier and replaced bond_denom (right after I ran init).

So it appears that I could run the gentx command and end up with a "broken" setup, due to different names for staking tokens.

@alexanderbez
Copy link
Contributor

alexanderbez commented Feb 4, 2020

Yes, this is resolved.

When you execute gentx, it doesn't infer any bond denomination for you. The only case when it infers the default denomination is when you completely omit the self-delegation amount -- which you should not do.

	defaultAmount = defaultTokens.String() + sdk.DefaultBondDenom

Now if you specified an amount AND it still used sdk.DefaultBondDenom, that's a different problem then.

@njmurarka
Copy link
Contributor

Got it. Thanks. I think this related to something I asked in another thread, so much appreciated for this. I was able to resolve the matter with this information.

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.

4 participants