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]: Unable to unjail a validator online #19165

Closed
1 task done
filippos47 opened this issue Jan 22, 2024 · 7 comments
Closed
1 task done

[Bug]: Unable to unjail a validator online #19165

filippos47 opened this issue Jan 22, 2024 · 7 comments
Labels

Comments

@filippos47
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

On a Babylon network (https://github.com/babylonchain/babylon), I'm unable to unjail a validator which was jailed due to downtime:

bash-5.1$ babylond tx slashing unjail  --from operator --fees 3ubbn
{"body":{"messages":[{"@type":"/cosmos.slashing.v1beta1.MsgUnjail","validator_addr":"bbnvaloper1k0st9qfpm7f8k94dxhckyd7cmm6fthk6zqpz6g"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"ubbn","amount":"3"}],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":[]}
confirm transaction before signing and broadcasting [y/N]: y
{"height":"0","txhash":"4AD43997E5227D9B45A62CA1B51124B65D1E80D06C582F160179617F15094656","codespace":"sdk","code":4,"data":"","raw_log":"signature verification failed; please verify account number (0) and chain-id (bbn-test-test-3): (unsuppored sign mode SIGN_MODE_TEXTUAL): unauthorized","logs":[],"info":"","gas_wanted":"0","gas_used":"0","tx":null,"timestamp":"","events":[]}

Trying any of the remaining sign modes fails with the following:

bash-5.1$ babylond tx slashing unjail  --from operator --fees 3ubbn --sign-mode direct
{"body":{"messages":[{"@type":"/cosmos.slashing.v1beta1.MsgUnjail","validator_addr":"bbnvaloper1k0st9qfpm7f8k94dxhckyd7cmm6fthk6zqpz6g"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"ubbn","amount":"3"}],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":[]}
confirm transaction before signing and broadcasting [y/N]: y
Error: unsuppored sign mode SIGN_MODE_DIRECT

I only managed to make this work by executing the transaction offline, as referenced here.

Cosmos SDK Version

0.50.3

How to reproduce?

No response

@alexanderbez
Copy link
Contributor

The issue is not the sign mode. The initial error gives you a hint as to what is wrong so I encourage you to evaluate it. The error states that signature is invalid. So please double or triple check that you are indeed using the correct chain-id (this is what causes issues 90% of the time). To be safe, you may explicitly pass it via the --chain-id flag.

@filippos47
Copy link
Author

Thanks for getting back quickly! chain-id is correct, and using the same account I'm able to sign other kinds of txs (eg sending tokens) on the same node.

@tac0turtle
Copy link
Member

does babylon have something custom around staking?

@alexanderbez
Copy link
Contributor

Thanks for getting back quickly! chain-id is correct, and using the same account I'm able to sign other kinds of txs (eg sending tokens) on the same node.

Interesting. Do you have some sort of custom account nonce management?

@julienrbrt
Copy link
Member

julienrbrt commented Jan 24, 2024

Unjail uses AutoCLI (https://github.com/cosmos/cosmos-sdk/blob/v0.50.3/x/slashing/autocli.go#L42-L47), it is one of the few commands we've migrated in v0.50 to use tx support (the rest is only on main).
So there is a possibility it is autocli related.

Have you verified that you properly pass the tx options with the correct supported sign mode to AutoCLI: https://github.com/babylonchain/babylon/blob/dev/cmd/babylond/cmd/root.go#L99-L102 -> https://github.com/cosmos/cosmos-sdk/blob/v0.50.3/client/v2/autocli/app.go#L53 ?
AutoCLI is easier to wire with depinject, it looks like in our example in simapp with legacy wiring we don't have them filled in either.
I have updated client/v2 to not require, so best to use latest from the v0.50 branch.

Additionally, can you as well try to use client/v2 with the latest commit from the release/v0.50.x branch?

@filippos47
Copy link
Author

Thanks for the hints @julienrbrt!

We deployed a working fix for the unjail command: babylonchain/babylon#435

Feel free to close this.

@github-project-automation github-project-automation bot moved this from 👀 To Do to 🥳 Done in Cosmos-SDK Feb 1, 2024
@julienrbrt
Copy link
Member

julienrbrt commented Feb 1, 2024

Thanks for the hints @julienrbrt!

We deployed a working fix for the unjail command: babylonchain/babylon#435

Feel free to close this.

Great! Do note that we've made modifications in client/v2 to not require it next client/v2 point release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants