Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Implement peer banning mechanism - Closes #3343 #3664 #3665

Merged
merged 17 commits into from
May 29, 2019

Conversation

mitsuaki-u
Copy link
Contributor

@mitsuaki-u mitsuaki-u commented May 17, 2019

What was the problem?

No mechanism was in place for penalizing peers bad behavior as per LIP 0004.

How did I fix it?

Added banning functionality to P2P library.

How to test it?

Review checklist

@mitsuaki-u mitsuaki-u changed the base branch from development to feature/implement-lip-p2p May 20, 2019 10:28
@mitsuaki-u mitsuaki-u marked this pull request as ready for review May 21, 2019 12:48
elements/lisk-p2p/src/p2p.ts Show resolved Hide resolved
framework/src/modules/network/network.js Outdated Show resolved Hide resolved
@mitsuaki-u mitsuaki-u changed the title Implement peer banning mechanism - Closes #3343 Implement peer banning mechanism - Closes #3343 #3664 May 21, 2019
Repository owner deleted a comment from shuse2 May 22, 2019
elements/lisk-p2p/src/p2p.ts Outdated Show resolved Hide resolved
elements/lisk-p2p/src/peer.ts Outdated Show resolved Hide resolved
elements/lisk-p2p/src/peer.ts Outdated Show resolved Hide resolved
elements/lisk-p2p/src/peer.ts Outdated Show resolved Hide resolved
elements/lisk-p2p/src/peer_pool.ts Outdated Show resolved Hide resolved
shuse2
shuse2 previously requested changes May 24, 2019
Copy link
Collaborator

@shuse2 shuse2 left a comment

Choose a reason for hiding this comment

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

Would it be possible to add banning integration test or it's still too early?

elements/lisk-p2p/src/p2p.ts Show resolved Hide resolved
@mitsuaki-u mitsuaki-u dismissed stale reviews from shuse2 and diego-G May 24, 2019 12:04

Addressed.

@mitsuaki-u mitsuaki-u requested a review from diego-G May 27, 2019 14:16
Copy link

@diego-G diego-G left a comment

Choose a reason for hiding this comment

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

LGTM. Just two comments.

elements/lisk-p2p/test/integration/p2p.ts Outdated Show resolved Hide resolved
framework/src/modules/network/network.js Outdated Show resolved Hide resolved
Copy link

@diego-G diego-G left a comment

Choose a reason for hiding this comment

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

I think we're not properly passing the config parameters to the network module and later to the library. Please, rebase your branch to the feature.

elements/lisk-p2p/src/p2p.ts Outdated Show resolved Hide resolved
elements/lisk-p2p/src/p2p_request.ts Outdated Show resolved Hide resolved
elements/lisk-p2p/src/p2p_types.ts Outdated Show resolved Hide resolved
@mitsuaki-u mitsuaki-u requested a review from jondubois May 29, 2019 08:13
@@ -168,6 +169,63 @@ describe('Integration tests for P2P library', () => {
});
});

describe('Peer banning mechanism', () => {
Copy link
Contributor

@jondubois jondubois May 29, 2019

Choose a reason for hiding this comment

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

Nice test cases 👍

framework/src/modules/network/network.js Show resolved Hide resolved
@jondubois jondubois merged commit d38c08f into feature/implement-lip-p2p May 29, 2019
@shuse2 shuse2 deleted the 3343_ban_manager branch June 19, 2019 08:58
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.

None yet

5 participants