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

Display stake amount in token units in CLI command output #3037

Closed
tjanez opened this issue Jun 22, 2020 · 1 comment · Fixed by #3111
Closed

Display stake amount in token units in CLI command output #3037

tjanez opened this issue Jun 22, 2020 · 1 comment · Fixed by #3111
Labels
c:cli Category: command line interface c:staking Category: staking

Comments

@tjanez
Copy link
Member

tjanez commented Jun 22, 2020

SUMMARY

To have a better UX when using the oasis-node CLI with a hardware wallet (e.g. Ledger) or on its own, it should also support displaying stake amounts in token unit (rather than base units used internally).

For example, oasis stake info currently displays something like:

Total supply: 10000000000000000000
Common pool: 7999217230119682890
Last block fees: 0
Staking threshold (entity): 100000000000
Staking threshold (node-validator): 100000000000
Staking threshold (node-compute): 100000000000
Staking threshold (node-storage): 100000000000
Staking threshold (node-keymanager): 100000000000
Staking threshold (runtime-compute): 100000000000
Staking threshold (runtime-keymanager): 100000000000

It could display something like:

Total supply: AMBER 10000000000
Common pool: AMBER 7999217230.11968289
Last block fees: 0
Staking threshold (entity): AMBER 100
Staking threshold (node-validator): AMBER 100
Staking threshold (node-compute): AMBER 100
Staking threshold (node-storage): AMBER 100
Staking threshold (node-keymanager): AMBER 100
Staking threshold (runtime-compute): AMBER 100
Staking threshold (runtime-keymanager): AMBER 100

where AMBER is the token's ticker symbol for the currently running Oasis Amber Network.

We could support configuring both:

  • amount of base token units one token unit is worth (e.g. 1000000000),
  • token's ticker symbol (e.g. AMBER).
ISSUE TYPE
  • Feature Idea
@tjanez tjanez added c:staking Category: staking c:cli Category: command line interface labels Jun 22, 2020
@kostko
Copy link
Member

kostko commented Jun 22, 2020

It would probably be best if these attributes were configured in the genesis document as that ensures that changing any of them would generate a different chain domain separation context and thus any transactions signed using the wrong genesis document would not be valid in the original network.

@tjanez tjanez changed the title Support canonical (main) token unit in CLI commands Display stake amount in token units in CLI command output Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:cli Category: command line interface c:staking Category: staking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants