Skip to content

Commit fa6648e

Browse files
committed
[FAB-2756] Batch gossip state transfer request
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 <[email protected]>
1 parent c9ecf9e commit fa6648e

File tree

5 files changed

+536
-245
lines changed

5 files changed

+536
-245
lines changed

gossip/comm/mock/mock_comm_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func TestMockComm(t *testing.T) {
4646

4747
comm2.Send((&proto.GossipMessage{
4848
Content: &proto.GossipMessage_StateRequest{&proto.RemoteStateRequest{
49-
SeqNums: []uint64{1, 2, 3},
49+
StartSeqNum: 1,
50+
EndSeqNum: 3,
5051
}},
5152
}).NoopSign(), &comm.RemotePeer{"first", common.PKIidType("first")})
5253

0 commit comments

Comments
 (0)