-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Failed to slash a validator for double sign at the first block #2372
Comments
CC @cwgoes |
That's unusual, can you replicate this in a testcase or describe more about the order in which you ran the daemons and double-signed? I don't understand why you would get evidence for a double-sign at height 1 before block 0 was committed. |
@cwgoes we did some analysis and figured out double-sign evidence was included in the first block, then got broadcasted. However, there's mismatch to treat double-sign evidence. in tendermint the |
@cwgoes |
If a new validator is slashed at the first height after it becomes the real validator, cosmos may panic. Because currently the validator has no sign info which is necessary for figuring out jail period. I think this may be a bug too. |
This definitely seems possible. I'm still a bit lost on how evidence reaches the block height +1 except maybe the case of the first block? |
@alexanderbez |
Yes, but wont the application also be onto the next block? |
@alexanderbez |
We don't care about the consensus round, just the consensus height. If we're attempting to come to consensus at some height |
This is why evidence handling is run after validator signature handling in the slashing tick function. Do you mean as a result of slashing from elsewhere (e.g. governance), or do you have a testcase which replicate this (which seems like a separate issue to evidence at a future height)? |
Although this will probably fix the symptom, I don't think this is the right approach. It's illogical to handle double-signature evidence for a block at a height we haven't started processing yet - if Tendermint is indeed sending such evidence, that's a bug in Tendermint. Do you know how I might replicate either issue, either by running commands locally or with a test case? That's the next step to debug the root cause. |
I have synced my
|
@cwgoes |
Thanks @HaoyangLiu - I'm trying to replicate this, working on a shell script at https://gist.github.com/cwgoes/3ab18585a72966bb9e68e8a9428a28b8 to make it easier. So far I can replicate the Byzantine duplicate-voting but not the crash - the |
@cwgoes |
Thanks @HaoyangLiu, I can replicate the issue now. On the first block, it looks like the vote information sent by Tendermint is empty (which I suppose makes sense, since that's for the last commit) - but the SDK currently expects to have seen a validator signature in I wonder if this is also a problem in general - does Tendermint send evidence for e.g. double-signatures at the current height which the SDK will not necessarily have seen yet in the |
Ah OK - we should set a |
#2480 fixes already, trying to incorporate #1867 (comment) into that PR too. |
Summary of Bug
When someone double signed at the first block, the slashing module will not handle it correctly.
Steps to Reproduce
When generating the first block, someone may double sign and trigger the slashing module.
log:
For Admin Use
The text was updated successfully, but these errors were encountered: