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

Bond in simple stake not working #833

Closed
kidinamoto01 opened this issue Apr 10, 2018 · 2 comments
Closed

Bond in simple stake not working #833

kidinamoto01 opened this issue Apr 10, 2018 · 2 comments

Comments

@kidinamoto01
Copy link
Contributor

kidinamoto01 commented Apr 10, 2018

Hello, it occurs to me that we cannot use simple stake module properly in the latest democoind of SDK v0.14

After I ran

PUBKEY=$(cat ~/.demoind/config/priv_validator.json | jq -r .pub_key.data)
echo $PASS| ./democli bond  --stake=100mycoin --validator=$PUBKEY --name=$NAME --chain-id=test-chain-YCeKC1  --sequence=0

I got the following error

ERROR: CheckTx failed: (303) msg: Unknown code 303
trace:

github.com/cosmos/cosmos-sdk/client/core.CoreContext.BroadcastTx
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/client/core/core.go:32
github.com/cosmos/cosmos-sdk/client/core.CoreContext.SignBuildBroadcast
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/client/core/core.go:137
github.com/cosmos/cosmos-sdk/x/simplestake/commands.commander.sendMsg
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/x/simplestake/commands/commands.go:98
github.com/cosmos/cosmos-sdk/x/simplestake/commands.commander.bondTxCmd
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/x/simplestake/commands/commands.go:82
github.com/cosmos/cosmos-sdk/x/simplestake/commands.(commander).(github.com/cosmos/cosmos-sdk/x/simplestake/commands.bondTxCmd)-fm
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/x/simplestake/commands/commands.go:28
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).execute
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:756
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).ExecuteC
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:846
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).Execute
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:794
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tmlibs/cli.Executor.Execute
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tmlibs/cli/setup.go:89
main.main
	/Users/b/Documents/go/src/github.com/cosmos/cosmos-sdk/examples/democoin/cmd/democli/main.go:95
runtime.main
	/usr/local/Cellar/go/1.9.2/libexec/src/runtime/proc.go:195
runtime.goexit
	/usr/local/Cellar/go/1.9.2/libexec/src/runtime/asm_amd64.s:2337

CheckTx cannot pass, and I guess it has to be sth wrong with validator Pubkey

I think we need to change the TM dependency to 0.19 on the master

@sunnya97
Copy link
Member

Yeah, you need to convert the base64 pubkey string to hex. We'll fix the cli so it accepts the base64. #836

Until then, you can use this: https://cryptii.com/base64-to-hex

@kidinamoto01
Copy link
Contributor Author

@sunnya97 but with TM v0.18, the pub key is already in hex, not base64

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

2 participants