-
Notifications
You must be signed in to change notification settings - Fork 284
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
[master] Exclude shard guards from PoW reputation #2469
Conversation
c1adcdb
to
c063579
Compare
// Iterate PoWs based on key ordering in the map | ||
for (const auto& kv : m_allPoWs) { | ||
const auto& pubKey = kv.first; | ||
uint8_t priority = 0; | ||
auto reputation = m_mapNodeReputation.find(pubKey); |
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.
better if can move this line to line 592?
continue; | ||
} | ||
priority = maxPriority; | ||
LOG_GENERAL(INFO, "Node=" << pubKey << "Reputation=(shard guard)"); | ||
listNodePriority.emplace_back(pubKey, priority); |
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.
may be just use max_priority
when adding back.
continue; | ||
} | ||
priority = maxPriority; | ||
LOG_GENERAL(INFO, "Node=" << pubKey << "Reputation=(shard guard)"); |
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.
LOG_GENERAL(INFO, "Node=" << pubKey << "Reputation=(shard guard)"); | |
LOG_GENERAL(INFO, "Node=" << pubKey << " Reputation=(shard guard)"); |
c063579
to
55544ae
Compare
55544ae
to
4a0dc2c
Compare
Description
To prevent shard guards from being affected by the reputation, priority is being set to the highest for SHARD_GUARD_TOL percent of nodes.
This will be further trimmed in the SortPoWSoln to fit the shard structure.
There will only be a maximum of SHARD_GUARD_TOL percent of shard guards in the shards.
Backward Compatibility
Review Suggestion
Status
Implementation
Integration Test (Core Team)