Kava-Labs / kava

DeFi for Crypto.
Apache License 2.0
439 stars 364 forks source link

kava init error #1927

Closed cpucorecore closed 2 months ago

cpucorecore commented 2 months ago

➜ kava git:(v0.26.0) kava version 0.26.0 ➜ kava git:(v0.26.0) rm -rf ~/.kava ➜ kava git:(v0.26.0) kava init test --chain-id 11111 Error: invalid chain-id format: 11111 Usage: kava init [moniker] [flags]

Flags: --chain-id string genesis file chain-id, if left blank will be randomly created --default-denom string genesis file default denomination, if left blank default value is 'stake' -h, --help help for init --home string node's home directory (default "/Users/sky/.kava") --initial-height int specify the initial block height at genesis (default 1) -o, --overwrite overwrite the genesis.json file --recover provide seed phrase to recover existing key instead of creating

Global Flags: --log_format string The logging format (json|plain) (default "plain") --log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info") --log_no_color Disable colored logs --trace print out full stack trace on errors

➜ kava git:(v0.26.0)

cpucorecore commented 2 months ago

so what the format of the chain-id? and i follow the doc to start a local testnet but also failed doc:https://docs.kava.io/docs/cosmos/getting-started#set-up-a-local-blockchain

is there someone to maintain these project?

pirtleshell commented 2 months ago

hello @cpucorecore,

the instructions you link guide you through setting up a local network with our utility kvtool. did you see that init example somewhere in our docs? as you have deduced, 1111 is not a valid form

the chain id must be compatible with both the cosmos ecosystem and the evm. for instance, mainnet's chain id is kava_2222-10; public testnet is kava_2221-16000; ktool's default network will have chain id kavalocalnet_8888-1.

for kava init, try using something that looks like localnet_1111-1. 1111 will be what the evm returns as its network id.

cpucorecore commented 2 months ago

hello @cpucorecore,

the instructions you link guide you through setting up a local network with our utility kvtool. did you see that init example somewhere in our docs? as you have deduced, 1111 is not a valid form

the chain id must be compatible with both the cosmos ecosystem and the evm. for instance, mainnet's chain id is kava_2222-10; public testnet is kava_2221-16000; ktool's default network will have chain id kavalocalnet_8888-1.

for kava init, try using something that looks like localnet_1111-1. 1111 will be what the evm returns as its network id.

thank you very much! i fix it by the chainId example you supply. sorry for that i don't find init example in the docs, maybe it exist somewhere but there is so many docs

cpucorecore commented 2 months ago

maybe the error prompt 'Error: invalid chain-id format: 11111' can changed to 'Error: invalid chain-id format: 11111, e.g. kava_2221-16000'

too many docs means no docs... give the fix prompt in the place maybe helpful