Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 74c2233

Browse files
Merge #4163
4163: Change network policy label for the update proposals/votes and heavyweight delegation certificates r=disassembler a=dcoutts ## Description The update proposals and votes, and the heavyweight delegation certificates are currently labelled as MsgTransaction for the purpose of the network routing policy. This means we can currently submit such objects from any node and they will be forwarded to the core nodes. They are of course validated at every hop. For the purpose of the byron/shelley transition it will be simpler if these objects are only submitted directly to the federated core nodes and not via the relays. So this patch changes the policy so that these objects are not forwarded by the relays. It does this by changing their label so that the existing network routing policy treats them differently. So rather than being labelled as `MsgTransaction` they are labelled as `MsgMPC`. The existing policy for the MPC label is that relays do not forward such messages. ## Linked issue [CBR-526](https://iohk.myjetbrains.com/youtrack/issue/CBR-526) Co-authored-by: Duncan Coutts <[email protected]>
2 parents 11c6b15 + af9a1fb commit 74c2233

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/src/Pos/Diffusion/Full/Delegation.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pskHeavyRelay
4949
:: Logic IO
5050
-> Relay
5151
pskHeavyRelay logic = Data $ DataParams
52-
MsgTransaction
52+
MsgMPC
5353
(\_ _ -> postPskHeavy logic)
5454
-- The message size limit for ProxySKHeavy: a ProxySecretKey with an
5555
-- EpochIndex.
@@ -60,4 +60,4 @@ sendPskHeavy
6060
-> EnqueueMsg
6161
-> ProxySKHeavy
6262
-> IO ()
63-
sendPskHeavy logTrace enqueue = dataFlow logTrace "pskHeavy" enqueue (MsgTransaction OQ.OriginSender)
63+
sendPskHeavy logTrace enqueue = dataFlow logTrace "pskHeavy" enqueue (MsgMPC OQ.OriginSender)

lib/src/Pos/Diffusion/Full/Update.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ proposalRelay logic =
8585
InvReqData
8686
NoMempool $
8787
InvReqDataParams
88-
{ invReqMsgType = MsgTransaction
88+
{ invReqMsgType = MsgMPC
8989
, contentsToKey = KV.toKey kv
9090
, handleInv = \_ -> KV.handleInv kv
9191
, handleReq = \_ -> KV.handleReq kv
@@ -104,7 +104,7 @@ voteRelay logic =
104104
InvReqData
105105
NoMempool $
106106
InvReqDataParams
107-
{ invReqMsgType = MsgTransaction
107+
{ invReqMsgType = MsgMPC
108108
, contentsToKey = KV.toKey kv
109109
, handleInv = \_ -> KV.handleInv kv
110110
, handleReq = \_ -> KV.handleReq kv

0 commit comments

Comments
 (0)