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

Staking/slashing interoperation issue #1076

Closed
cwgoes opened this issue May 29, 2018 · 3 comments
Closed

Staking/slashing interoperation issue #1076

cwgoes opened this issue May 29, 2018 · 3 comments
Assignees

Comments

@cwgoes
Copy link
Contributor

cwgoes commented May 29, 2018

Revoked validator not unbonded correctly. To reproduce, using https://github.com/cosmos/cosmos-sdk/tree/cwgoes/slashing-staking-bug (which just fakes the validator never signing blocks):

rm -rf ~/.gaiad ~/.gaiacli
gaiad init gen-tx --name cwgoes
gaiad init --gen-txs
gaiad start

After 101 blocks, the validator is revoked (correctly) by slashing, but not unbonded and not passed back correctly to Tendermint as a validator set update (printed temporarily for debugging):

}#614593580B469455F0A3F4F17B5022047CBCF7AF module=consensus 
E[05-29|07:39:58.760] Validator FB98CD1DF8823860CC3039DBD6AC6E71C69DE505 present: false module=x/slashing 
I[05-29|07:39:58.760] Absent validator FB98CD1DF8823860CC3039DBD6AC6E71C69DE505 at height 101 module=x/slashing 
I[05-29|07:39:58.760] Validator FB98CD1DF8823860CC3039DBD6AC6E71C69DE505 past min height of 100 and below signed blocks threshold of 50 module=x/slashing 
I[05-29|07:39:58.761] Validator FB98CD1DF8823860CC3039DBD6AC6E71C69DE505 slashed by fraction 1/100, removed 1/1 shares and burned 1 tokens module=x/stake 
I[05-29|07:39:58.761] Validator FB98CD1DF8823860CC3039DBD6AC6E71C69DE505 revoked module=x/stake 
validator updates: []
I[05-29|07:39:58.761] Executed block                               module=state height=101 validTxs=0 invalidTxs=0
@cwgoes
Copy link
Contributor Author

cwgoes commented May 29, 2018

CC @rigelrozanski

@rigelrozanski
Copy link
Contributor

Cool thanks for the heads up - wow really excited to have revoking on the go here. Yeah let's write a (failing) test case to demonstrate this

@cwgoes
Copy link
Contributor Author

cwgoes commented May 30, 2018

Fixed by c8133a0 and 40526d3.

We should add integration tests to cover this, probably as part of #974.

@cwgoes cwgoes closed this as completed May 30, 2018
mmsqe added a commit to mmsqe/cosmos-sdk that referenced this issue Feb 5, 2025
* Limit recursion depth for unknown field detection

(cherry picked from commit f038dc731c55be1e1c526e67695acc358631afd6)

* Limit unpack any

(cherry picked from commit 1a2bff56fb7391f9ce87d4fbe9e0367ae991c0b2)

* Update Changelog

* Another limit recursion depth for unknown field detection

* Update changelog

Co-authored-by: mmsqe <mavis@crypto.com>
Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants