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

Add new deny peer cache #1992

Merged
merged 6 commits into from Jun 24, 2020
Merged

Add new deny peer cache #1992

merged 6 commits into from Jun 24, 2020

Conversation

iulianpascalau
Copy link
Contributor

  • added a peer denial evaluator able to track black listed public keys beside peer IDs

@iulianpascalau iulianpascalau self-assigned this Jun 22, 2020
@iulianpascalau iulianpascalau added the type:feature New feature or request label Jun 22, 2020
@sasurobert sasurobert self-requested a review June 23, 2020 08:01
@iulianpascalau iulianpascalau changed the base branch from release-candidate to development June 23, 2020 08:53
@iulianpascalau iulianpascalau changed the base branch from development to release-candidate June 23, 2020 08:53
// IsDenied returns true if the provided peer id is denied to access the network
// It also checks if the provided peer id has a backing public key, checking also that the public key is not denied
func (pde *peerDenialEvaluator) IsDenied(pid core.PeerID) bool {
if pde.peerIdsCache.Has(pid) {
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to blakcListIDsCache

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return false //no need to further search in the next cache, this is an unknown peer
}

return pde.publicKeysCache.Has(string(pkBytes))
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to blakcListedPublicKeysCache

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

AdoAdoAdo
AdoAdoAdo previously approved these changes Jun 23, 2020
@iulianpascalau iulianpascalau changed the base branch from release-candidate to development June 23, 2020 15:51
@iulianpascalau iulianpascalau dismissed AdoAdoAdo’s stale review June 23, 2020 15:51

The base branch was changed.

# Conflicts:
#	factory/networkComponents.go
#	process/interceptors/processor/hdrInterceptorProcessor.go
#	update/errors.go
Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

System tests passed.

@LucianMincu LucianMincu merged commit cab5a0c into development Jun 24, 2020
@LucianMincu LucianMincu deleted the add-new-deny-peer-cache branch June 24, 2020 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants