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] - autogenerated genesis file can't be parsed by cardano-wallet. Error parsing activeSlotsCoeff #2296

Closed
jbax opened this issue Nov 5, 2020 · 5 comments

Comments

@jbax
Copy link

jbax commented Nov 5, 2020

Context

Using command cardano-node shelley genesis create ... the resulting genesis.json file comes out with the following:


{
    "activeSlotsCoeff": 5.0e-2,
    "protocolParams": {
        "poolDeposit": 0,
        "protocolVersion": {
            "minor": 0,
            "major": 0
        },
 ...

When running the cardano-wallet process against that genesis.json file, the following exception is raised:

[cardano-wallet.main:Error:4] [2020-11-05 04:16:01.54 UTC] Failed to parse genesis configuration. You may want to check the filepath given via --genesis and make sure it points to a valid JSON genesis file. Here's (perhaps) some helpful hint: GenesisDataParseError "(line 2, column 26):\nunexpected \".\"\nexpecting digit, white space, \",\" or \"}\""

It seems like the cardano-wallet is unable to parse this double value 5.0e-2 however the JSON is valid.

Expected behavior
The cardano wallet should not raise any errors parsing the genesis.json file.

System info :

Information -
Version 2020.10.13 (git revision: 77e04fc)
Platform Ubuntu Linux 20.02
Installation From Github Release
@rvl
Copy link
Contributor

rvl commented Nov 5, 2020

Hi @jbax, what are you trying to do here?

When running cardano-wallet serve --testnet, you need to provide the Byron-era genesis json file for the testnet. Shelley genesis parameters are fetched from the chain.

The byron genesis file doesn't have activeSlotsCoeff, so it probably doesn't matter whether or not we can parse numbers in that format.

@jbax
Copy link
Author

jbax commented Nov 5, 2020 via email

@KtorZ
Copy link
Member

KtorZ commented Nov 5, 2020

@jbax No. Not anymore.

@jbax
Copy link
Author

jbax commented Nov 5, 2020

thanks!

@jbax jbax closed this as completed Nov 5, 2020
@vkconsult
Copy link

Ran into the same issue. The error message could be more specific in this came imo.

iohk-bors bot added a commit that referenced this issue Dec 31, 2020
2413: Clarify 'MsgFailedToParseGenesis' with regards to which genesis file is expected. r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue that this PR relates to and which requirements it tackles. Jira issues of the form ADP- will be auto-linked. -->

#2296 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- 21da8b6
  📍 **clarify 'MsgFailedToParseGenesis' with regards to which genesis file is expected**
    We wrote that message a while ago when there was only Byron and therefore a single genesis file. With Shelley (and later Goguen), there's now an ambiguity when speaking about 'a genesis file' so it is better called out explicitly.

# Comments

<!-- Additional comments or screenshots to attach if any -->

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: KtorZ <[email protected]>
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

No branches or pull requests

4 participants