Skip to content

Fixes for non-default staking token#3574

Merged
jackzampolin merged 2 commits intodevelopfrom
zaki/InvariantCheckerBondDenom
Feb 9, 2019
Merged

Fixes for non-default staking token#3574
jackzampolin merged 2 commits intodevelopfrom
zaki/InvariantCheckerBondDenom

Conversation

@zmanian
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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