-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
ADR 009: Evidence Module #4826
ADR 009: Evidence Module #4826
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4826 +/- ##
==========================================
+ Coverage 53.43% 53.44% +0.01%
==========================================
Files 290 290
Lines 17714 17714
==========================================
+ Hits 9465 9467 +2
+ Misses 7510 7508 -2
Partials 739 739 |
ADR-003 already exists, next available is [ADR-8] |
@alexanderbez @cwgoes What is the open items left here on this PR? |
Just addressing comments, I believe - separately, there will be questions of what kinds of evidence specifically are handled and how (in relation to Tendermint light clients, cross-chain validation, etc)., but this ADR mostly defines an interface. |
need to review the new version of the ADR
|
||
- Should we persist infractions indefinitely? Or should we rather rely on events? | ||
|
||
## References |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also add ICS03 as a reference here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 or 3? As the link above routes to ics-003
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ICS02 sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK modulo one question about total power
slashing and jailing the validator. Upon success, the submitted evidence is persisted. | ||
|
||
```go | ||
func (k Keeper) SubmitEvidence(ctx Context, evidence Evidence) Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function must also be exposed to other modules (e.g. the client module in IBC)
```go | ||
type Evidence interface { | ||
Route() string | ||
Type() string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a short comment on the type
Type() string | |
// Evidence type. Each of the types might have custom slashing penalties values defined by governance | |
Type() string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary?
Route() string | ||
Type() string | ||
String() string | ||
ValidateBasic() Error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Examples of basic validations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are none as there are no concrete types. I don't want to pollute the ADR with examples.
ValidateBasic() Error | ||
|
||
// The consensus address of the malicious validator at time of infraction | ||
GetConsensusAddress() ConsAddress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know. But typically we have field members as public due to amino encoding requirements and we want to also establish a contract of what evidence "must" provide.
occurred and the validator's power at same height in which the infraction occurred. | ||
|
||
```go | ||
type Evidence interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite different from TM version https://github.com/tendermint/tendermint/blob/bc572217c07b90ad9cee851f193aaa8e9557cbc7/types/evidence.go#L56-L66
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, we could potentially add Verify
and Hash
but I wonder what Verify
would look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [-t <tag>] [-m <msg>]
Re-reviewed
Files changed
in the github PR explorerFor Admin Use: