-
Notifications
You must be signed in to change notification settings - Fork 197
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
Peer honesty implementation #2008
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5172a97
- added peer honesty implementation able to black list a public key i…
iulianpascalau 9267c0e
fix after self review: added white spaces at the end of the json files
iulianpascalau c1a9759
fixes after review - partially
iulianpascalau 0ae328d
fixes after review - renamed peerScore -> peerHonesty
iulianpascalau 15e95fe
Merge branch 'development' into peer-honesty-implementation
sasurobert 66ec1e8
fix after review: renaming, added tests, split structs in more go file
iulianpascalau ad01136
Merge branch 'peer-honesty-implementation' of https://github.com/Elro…
iulianpascalau 59bc2ed
Merge branch 'development' into peer-honesty-implementation
LucianMincu 6fee92c
- fixed unit tests
iulianpascalau 9a24c20
Merge remote-tracking branch 'origin/peer-honesty-implementation' int…
iulianpascalau 6187223
- changed some prints
iulianpascalau 6b1d884
Merge branch 'development' into peer-honesty-implementation
LucianMincu cce6b3b
Merge branch 'development' into peer-honesty-implementation
andreibancioiu 537553e
Merge branch 'development' into peer-honesty-implementation
LucianMincu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
package spos | ||
|
||
//TODO consider moving these constants in config file | ||
|
||
// MaxThresholdPercent specifies the max allocated time percent for doing Job as a percentage of the total time of one round | ||
const MaxThresholdPercent = 95 | ||
|
||
// LeaderPeerHonestyIncreaseFactor specifies the factor with which the honesty of the leader should be increased | ||
// if it proposed a block or sent the final info, in its correct allocated slot/time-frame/round | ||
const LeaderPeerHonestyIncreaseFactor = 2.0 | ||
const LeaderPeerHonestyIncreaseFactor = 2 | ||
|
||
// ValidatorPeerHonestyIncreaseFactor specifies the factor with which the honesty of the validator should be increased | ||
// if it sent the signature, in its correct allocated slot/time-frame/round | ||
const ValidatorPeerHonestyIncreaseFactor = 1.0 | ||
const ValidatorPeerHonestyIncreaseFactor = 1 | ||
sasurobert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// LeaderPeerHonestyDecreaseFactor specifies the factor with which the honesty of the leader should be decreased | ||
// if it proposed a block or sent the final info, in an incorrect allocated slot/time-frame/round | ||
const LeaderPeerHonestyDecreaseFactor = -4.0 | ||
const LeaderPeerHonestyDecreaseFactor = -4 | ||
|
||
// ValidatorPeerHonestyDecreaseFactor specifies the factor with which the honesty of the validator should be decreased | ||
// if it sent the signature, in an incorrect allocated slot/time-frame/round | ||
const ValidatorPeerHonestyDecreaseFactor = -2.0 | ||
const ValidatorPeerHonestyDecreaseFactor = -2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nice that we have both positive and negative scores plus something neutral.