Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Add slashing threshold to params and evidence #200

Merged

Conversation

jinmannwong
Copy link
Contributor

Add threshold number of complaints required for slashing into evidence itself. Reason for this is because the threshold changes with the size of the validator set, which may not be the same size in every aeon

func (bie *BeaconInactivityEvidence) ValidatorHeight() int64 {
return bie.AeonStart
return bie.AeonStart - 1
Copy link
Contributor Author

@jinmannwong jinmannwong Oct 7, 2020

Choose a reason for hiding this comment

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

This is a bug fix.

@@ -346,7 +347,7 @@ message Evidence {
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
int64 total_voting_power = 5;
Validator complainant = 6; // Allowed to be null
int64 threshold = 6;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No longer need to send the validator who signed the complaint as we make the evidence from each validator each aeon unique so that duplicates can not be submitted into the blocks

@jinmannwong jinmannwong merged commit 09810cc into fetchai:master Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants