tendermint / spn

A blockchain to launch blockchains.
Other
112 stars 43 forks source link

Publish with genesis file bufio.Scanner: token too long #980

Closed silverstr89 closed 2 years ago

silverstr89 commented 2 years ago

When i trying

ignite n chain publish https://github.com/silverstr89/alexey-cosmos.git --genesis "https://github.com/silverstr89/alexey-cosmos/blob/master/genesis.json" --local

✔ Source code fetched
✔ Blockchain set up
✔ Chain's binary built
✔ Blockchain initialized
✔ Custom Genesis JSON from URL fetched

i got error bufio.Scanner: token too long

how can i fix?

you could also check my repo and genesis for reproducing

https://github.com/silverstr89/alexey-cosmos

https://github.com/silverstr89/alexey-cosmos/blob/master/genesis.json

silverstr89 commented 2 years ago

@lubtd is it possible to run it from local genesis file?

lumtis commented 2 years ago

@lubtd is it possible to run it from local genesis file?

This is in progress: https://github.com/ignite/cli/issues/2852

It will be possible to specify for the initial genesis of the chain the genesis state defined in a config yml file in the project repo

silverstr89 commented 2 years ago

ah... ok... will wait when it will be possible to use --genesis-config config.yml

lumtis commented 2 years ago

@silverstr89 for the original issue: The provided URL for genesis in the example contains the HTLM page showing the genesis so the parsing will fail. You must provide the raw content of the genesis: https://raw.githubusercontent.com/silverstr89/alexey-cosmos/master/genesis.json Though the error is not self-explanatory, we should print something like invalid JSON file

When providing the raw content, it will still fail because:

So the following command works for publishing the chain:

ignite n chain publish https://github.com/silverstr89/alexey-cosmos.git --genesis "https://gist.githubusercontent.com/lubtd/f2144f19ae03f0d7c1519fc0edc6d1fd/raw/5d16f1a957fdd379b58fecab82c0cec1f2381d50/genesis-a.json" --chain-id alexey-0
silverstr89 commented 2 years ago

@lubtd thank you so much!