Skip to content
Permalink
Browse files

Change network policy label for the update proposals/votes and hw del…

…eg 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.
  • Loading branch information...
Duncan Coutts
Duncan Coutts committed Jun 12, 2019
1 parent 57a0d23 commit 02ced1b7e9b5c653ba2590ab2e3a1e37acef7ded
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/src/Pos/Diffusion/Full/Delegation.hs
  2. +2 −2 lib/src/Pos/Diffusion/Full/Update.hs
@@ -49,7 +49,7 @@ pskHeavyRelay
:: Logic IO
-> Relay
pskHeavyRelay logic = Data $ DataParams
MsgTransaction
MsgMPC
(\_ _ -> postPskHeavy logic)
-- The message size limit for ProxySKHeavy: a ProxySecretKey with an
-- EpochIndex.
@@ -60,4 +60,4 @@ sendPskHeavy
-> EnqueueMsg
-> ProxySKHeavy
-> IO ()
sendPskHeavy logTrace enqueue = dataFlow logTrace "pskHeavy" enqueue (MsgTransaction OQ.OriginSender)
sendPskHeavy logTrace enqueue = dataFlow logTrace "pskHeavy" enqueue (MsgMPC OQ.OriginSender)
@@ -85,7 +85,7 @@ proposalRelay logic =
InvReqData
NoMempool $
InvReqDataParams
{ invReqMsgType = MsgTransaction
{ invReqMsgType = MsgMPC
, contentsToKey = KV.toKey kv
, handleInv = \_ -> KV.handleInv kv
, handleReq = \_ -> KV.handleReq kv
@@ -104,7 +104,7 @@ voteRelay logic =
InvReqData
NoMempool $
InvReqDataParams
{ invReqMsgType = MsgTransaction
{ invReqMsgType = MsgMPC
, contentsToKey = KV.toKey kv
, handleInv = \_ -> KV.handleInv kv
, handleReq = \_ -> KV.handleReq kv

0 comments on commit 02ced1b

Please sign in to comment.
You can’t perform that action at this time.