-
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
SDK handling of new evidence types #7190
Comments
@cwgoes Where is the expected behavior (in terms of what kind of slashing or jailing happens) documented for these new evidence types? |
Honestly, we haven't decided yet. Generally, I would consider all of these as "severe protocol violations committed intentionally", so I suggest we treat them all the same as duplicate-voting (slash & jail the validator). |
There will be some changes happening in Tendermint in regard to the new evidence types. This work is blocked on rc4. ref tendermint/tendermint#5288 for the progress on the update. cc @cmwaters, do you have anything more to add? |
Do these changes need to block the SDK? Is something changing over the ABCI interface boundary? How the light client deals with evidence is orthogonal to this issue/question, this is just about handling evidence sent over ABCI. |
You could start the work and then just add the name to the switch when it's available. The message will stay the same but the string names will change.
I'll remove blocked. |
OK, so basically will need to rebase later, right? |
Either we
|
I think this is a much better default than (3). I don't think we want to handle duplicate votes but not other evidence types - this is misleading, other kinds of attacks can be just as dangerous - either we should force developers to always handle evidence themselves (probably suboptimal) or handle all evidence types tracked by Tendermint in a reasonable default manner, which can always be overridden. |
I think this 1 is the needed solution but also a quick solution. IMO all supported evidences should have a set of parameters. An application may not want to tombstone Equivocation, but only do a large slash. The needed changes seem to be fairly trivial (famous last words).
DuplicateVoteEvidence is already handled, nothing will need to change there. Tendermint is removing an evidence parameter from the consensus parameters, |
Yes as @marbar3778 alluded to here:
We're still working to get the evidence finished. There will only be one new evidence As far as I can see, I think what bez said about treating the evidence as the same is a good default. I've opened a PR relating to what the abci.Evidence will look like including the use of an enum for the evidence type which will either be |
Ok great, if we go with that option, then this PR should be very trivial -- slash & jail/tombstone. We might have the change the parameter name for the slashing % though. |
Should I also update the Tendermint version (using a commit syntax) or we will do it later once a new Tendermint version (tag) will be pushed? |
Update commit style will allow you to work with the most recent updates. |
I've made a PR. There are few breaking changes from the latest Tendermint. Also, the evidence types were totally reworked, so the original task description is obsolete now. None of the evidence types listed there (DuplicateVoteEvidence, LunaticValidatorEvidence, AmnesiaEvidence) exist any more. |
It seams that this function in tendermint:
Doesn't handle Light Client Attack. And we don't have an evidence structure for Light Client Attack in Tendermint. Is this something that Tendermint will work on in the future? |
The new type of evidence has not been added yet. We are working on finalizing the design for the implementation. Once it is merged we will update you. |
Thanks. I've added a checkpoint here to OP, to have a new task once this changes will arrive. |
Reopening, as @robert-zaremba mentioned there will still be some todo's remaining here (waiting on tendermint adding the new evidence type) |
Spec updates are needed alongside the addition of new evidence |
What updates are needed exactly @clevinson? What updates to the spec are needed? |
@alexanderbez I think we are missing a final spec for evidence types tendermint is planning to add. |
this section needs to state it is handling two types of evidence.
Why? The sdk only cares about evidence that comes through the abci. If each evidence is handled differently than you would need to check the spec but now it all the same. I think other than the SDK spec updates this issue can be closed. |
We have a |
The new type ( |
I know, but if there will be a new type, then the function will log an error rather than handling it. I would prefer to have a coordinated update, with a fallback:
|
@marbar3778 @robert-zaremba Is there anything remaining on this issue or can it be closed? |
It can be closed. The needed changes from the ABCI have been incorporated |
@clevinson , @cwgoes -- I was thinking to keep it open until we will have a decision from Tendermint about your plans for new Evidence types. |
Tendermint 0.34 introduces the following new evidence types:
[deprecated - the list has changed]
(new evidence types are mapped in this proto oneof here).
We need to add proper of handling of these new types in the x/evidence module so that validators are slashed accordingly (see here).
The text was updated successfully, but these errors were encountered: