Closed shreyan-gupta closed 1 month ago
Attention: Patch coverage is 56.31068%
with 45 lines
in your changes missing coverage. Please review.
Project coverage is 71.51%. Comparing base (
541c84a
) to head (4c12d11
). Report is 7 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
...hain/network/src/peer_manager/network_state/mod.rs | 59.18% | 40 Missing :warning: |
chain/network/src/network_protocol/mod.rs | 0.00% | 5 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR builds the basis to enable the network layer to redirect network messages to self.
Currently, any network message that is sent to self, i.e. sent to our own account id, is dropped. This can lead to some complications in the logic of dealing with sending chunk endorsement and partial witness messages.
For example, we send the chunk endorsement to the next 5 block producers, but since messages to self are dropped, we need to special case in to check if we are the block producer and handle that case separately.
For partial witness, we need to be careful about managing parts for which we are the owner, i.e. bypass the
PartialEncodedStateWitnessMessage
message and directly sendPartialEncodedStateWitnessForwardMessage
.In subsequent PRs, we would remove these special cases.
Changes
receive_routed_message
from peer_actor to network_statereceive_routed_message
async insend_message_to_account
function if we are the recipient.allow_sending_to_self
which we allow to send to ourselves.