Homework 1 forum

Private Message Hop Limit

 
Picture of Reka Inovan
Private Message Hop Limit
by Reka Inovan - Monday, 19 October 2020, 20:01
 

Hi,

I just want to point out that the behaviour expected by testcase TestGossiper_Topo2_5Nodes_Private_Close disagrees with the homework specification.

So the homework specification says:

Every node on the forwarding path (including the source peer) will first decrement this value and either forward the message, or discard the message if the value reaches 0 before the message reaches the destination.

Of course, this means that private messages with hop-limit 1 will be discarded at the source peer. But in the testcase, we are required to send a message with hop-limit 1 to a neighbour of the source peer. I think it is a typo, the homework specification should say "excluding the source peer", so it will agree with the testcase.

Best,

Picture of Cristina Basescu
Re: Private Message Hop Limit
by Cristina Basescu - Monday, 19 October 2020, 20:50
 

Hi,

Thanks for the question.

There isn't, in fact, any inconsistency. A node drops a message if, when received, the message has a hop limit of 0 and the node is not the destination. Otherwise, the node decrements the hop limit and forwards the message. In the test, the source starts with a message with hop limit 1. Thus, the source decrements the hop limit and forwards the message.

Cristina

Picture of Reka Inovan
Re: Private Message Hop Limit
by Reka Inovan - Tuesday, 20 October 2020, 09:49
 

I see what you mean..so we first check if the hop limit value = 0, then decrements the hop limit.
Thanks for your clarification.

Best,