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

ADR 009: Evidence Module #4826

Merged
merged 33 commits into from
Oct 17, 2019
Merged

ADR 009: Evidence Module #4826

merged 33 commits into from
Oct 17, 2019

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Jul 31, 2019

  • 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 explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@alexanderbez alexanderbez added T:Docs Changes and features related to documentation. WIP T: ADR An issue or PR relating to an architectural decision record labels Jul 31, 2019
@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #4826 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@            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

@tac0turtle
Copy link
Member

ADR-003 already exists, next available is [ADR-8]

@alexanderbez alexanderbez changed the title ADR 003: Evidence Module ADR 008: Evidence Module Aug 1, 2019
@alexanderbez alexanderbez added R4R and removed WIP labels Aug 1, 2019
@alexanderbez alexanderbez marked this pull request as ready for review August 1, 2019 18:53
docs/architecture/adr-009-evidence-module.md Outdated Show resolved Hide resolved
docs/architecture/adr-009-evidence-module.md Outdated Show resolved Hide resolved
docs/architecture/adr-009-evidence-module.md Outdated Show resolved Hide resolved
docs/architecture/adr-009-evidence-module.md Outdated Show resolved Hide resolved
@tac0turtle tac0turtle changed the title ADR 008: Evidence Module ADR 009: Evidence Module Aug 28, 2019
@tnachen
Copy link
Contributor

tnachen commented Sep 9, 2019

@alexanderbez @cwgoes What is the open items left here on this PR?

@cwgoes
Copy link
Contributor

cwgoes commented Sep 9, 2019

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.

@alexanderbez alexanderbez self-assigned this Oct 1, 2019
@tnachen tnachen mentioned this pull request Oct 16, 2019
7 tasks
@fedekunze fedekunze dismissed their stale review October 16, 2019 15:39

need to review the new version of the ADR

docs/architecture/adr-009-evidence-module.md Show resolved Hide resolved
docs/architecture/adr-009-evidence-module.md Outdated Show resolved Hide resolved
docs/architecture/adr-009-evidence-module.md Outdated Show resolved Hide resolved

- Should we persist infractions indefinitely? Or should we rather rely on events?

## References
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ICS02 sorry

Copy link
Contributor

@cwgoes cwgoes left a 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

docs/architecture/adr-009-evidence-module.md Show resolved Hide resolved
slashing and jailing the validator. Upon success, the submitted evidence is persisted.

```go
func (k Keeper) SubmitEvidence(ctx Context, evidence Evidence) Error {
Copy link
Contributor

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
Copy link
Collaborator

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

Suggested change
Type() string
// Evidence type. Each of the types might have custom slashing penalties values defined by governance
Type() string

Copy link
Contributor Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples of basic validations?

Copy link
Contributor Author

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.

@alexanderbez alexanderbez merged commit 1edecb8 into master Oct 17, 2019
@alexanderbez alexanderbez deleted the bez/adr-evidence-module branch October 17, 2019 15:07
ValidateBasic() Error

// The consensus address of the malicious validator at time of infraction
GetConsensusAddress() ConsAddress
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: ADR An issue or PR relating to an architectural decision record T:Docs Changes and features related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants