Skip to content

Commit

Permalink
[FAB-2756] Batch gossip state transfer request
Browse files Browse the repository at this point in the history
Currently newly joined peer while syncing with rest of the network able
to send request to retrive entire ledger in one message, which is
in-efficient and presents potential exposure for denial of service
attacks.

This commits refactor gossip state trafer message in a way it
requires only to send two numbers representing the interval of required
missing blocks and makes sure this interval could not be longer than
specified by algorithm value.

Change-Id: I12cbf1922c39032125e1d168cea57eafa1013a32
Signed-off-by: Artem Barger <bartem@il.ibm.com>
  • Loading branch information
C0rWin committed Apr 12, 2017
1 parent c9ecf9e commit fa6648e
Show file tree
Hide file tree
Showing 5 changed files with 536 additions and 245 deletions.
3 changes: 2 additions & 1 deletion gossip/comm/mock/mock_comm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func TestMockComm(t *testing.T) {

comm2.Send((&proto.GossipMessage{
Content: &proto.GossipMessage_StateRequest{&proto.RemoteStateRequest{
SeqNums: []uint64{1, 2, 3},
StartSeqNum: 1,
EndSeqNum: 3,
}},
}).NoopSign(), &comm.RemotePeer{"first", common.PKIidType("first")})

Expand Down
Loading

0 comments on commit fa6648e

Please sign in to comment.