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

Commit af9a1fb

Browse files
dcouttserikd
authored andcommitted
Change network policy label for the update proposals/votes and hw deleg certs
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 polciy 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.
1 parent 84fd410 commit af9a1fb

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)