Esempio n. 1
0
 def _construct_basic_reconfiguration_request(self, command):
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.additional_data = bytes(0)
     reconf_msg.sender = 1000
     reconf_msg.signature = bytes(0)
     reconf_msg.command = command
     reconf_msg.signature = self._sign_reconf_msg(reconf_msg)
     return reconf_msg
Esempio n. 2
0
 def _construct_reconfiguration_latest_prunebale_block_coammand(self):
     lpab_cmd = cmf_msgs.LatestPrunableBlockRequest()
     lpab_cmd.sender = 1000
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = lpab_cmd
     reconf_msg.signature = bytes()
     reconf_msg.additional_data = bytes()
     return reconf_msg
Esempio n. 3
0
 def _construct_reconfiguration_prune_status_request(self):
     prune_status_cmd = cmf_msgs.PruneStatusRequest()
     prune_status_cmd.sender = 1000
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = prune_status_cmd
     reconf_msg.signature = bytes()
     reconf_msg.additional_data = bytes()
     return reconf_msg
Esempio n. 4
0
 def _construct_reconfiguration_wedge_status(self):
     wedge_status_cmd = cmf_msgs.WedgeStatusRequest()
     wedge_status_cmd.sender = 1000
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = wedge_status_cmd
     reconf_msg.signature = bytes()
     reconf_msg.additional_data = bytes()
     return reconf_msg
 def _construct_reconfiguration_keMsg_coammand(self):
     ke_command = cmf_msgs.KeyExchangeCommand()
     ke_command.sender_id = 1000
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = ke_command
     reconf_msg.signature = bytes()
     reconf_msg.additional_data = bytes()
     return reconf_msg
Esempio n. 6
0
 def _construct_reconfiguration_prune_request(self, latest_pruneble_blocks):
     prune_cmd = cmf_msgs.PruneRequest()
     prune_cmd.sender = 1000
     prune_cmd.latest_prunable_block = latest_pruneble_blocks
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = prune_cmd
     reconf_msg.signature = bytes()
     reconf_msg.additional_data = bytes()
     return reconf_msg
Esempio n. 7
0
 def _construct_reconfiguration_wedge_coammand(self):
     wedge_cmd = cmf_msgs.WedgeCommand()
     wedge_cmd.stop_seq_num = 0
     wedge_cmd.bft_seq_num = 0
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = wedge_cmd
     reconf_msg.signature = bytes()
     reconf_msg.additional_data = bytes()
     return reconf_msg
Esempio n. 8
0
 def _construct_reconfiguration_wedge_coammand(self):
     wedge_cmd = cmf_msgs.WedgeCommand()
     wedge_cmd.sender = 1000
     wedge_cmd.noop = False
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = wedge_cmd
     reconf_msg.signature = bytes()
     reconf_msg.additional_data = bytes()
     return reconf_msg
Esempio n. 9
0
 def _construct_reconfiguration_addRemoveWithWedgeStatus_coammand(self):
     addRemoveStatus_command = cmf_msgs.AddRemoveWithWedgeStatus()
     addRemoveStatus_command.sender_id = 1000
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = addRemoveStatus_command
     reconf_msg.additional_data = bytes()
     reconf_msg.signature = bytes(0)
     reconf_msg.signature = self._sign_reconf_msg(reconf_msg)
     return reconf_msg
Esempio n. 10
0
 def _construct_reconfiguration_addRemove_coammand(self, new_config):
     addRemove_command = cmf_msgs.AddRemoveCommand()
     addRemove_command.reconfiguration = new_config
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = addRemove_command
     reconf_msg.additional_data = bytes()
     reconf_msg.signature = bytes(0)
     reconf_msg.signature = self._sign_reconf_msg(reconf_msg)
     return reconf_msg
Esempio n. 11
0
 def _construct_reconfiguration_wedge_status(self, fullWedge=True):
     wedge_status_cmd = cmf_msgs.WedgeStatusRequest()
     wedge_status_cmd.sender = 1000
     wedge_status_cmd.fullWedge = fullWedge
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = wedge_status_cmd
     reconf_msg.additional_data = bytes()
     reconf_msg.signature = bytes(0)
     reconf_msg.signature = self._sign_reconf_msg(reconf_msg)
     return reconf_msg
Esempio n. 12
0
 def _construct_reconfiguration_keMsg_coammand(self, target_replicas=[]):
     ke_command = cmf_msgs.KeyExchangeCommand()
     ke_command.sender_id = 1000
     ke_command.target_replicas = target_replicas
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = ke_command
     reconf_msg.additional_data = bytes()
     reconf_msg.signature = bytes(0)
     reconf_msg.signature = self._sign_reconf_msg(reconf_msg)
     return reconf_msg
Esempio n. 13
0
 def _construct_reconfiguration_addRemoveWithWedge_coammand(
         self, new_config, bft=True):
     addRemove_command = cmf_msgs.AddRemoveWithWedgeCommand()
     addRemove_command.config_descriptor = new_config
     addRemove_command.bft = bft
     reconf_msg = cmf_msgs.ReconfigurationRequest()
     reconf_msg.command = addRemove_command
     reconf_msg.additional_data = bytes()
     reconf_msg.signature = bytes(0)
     reconf_msg.signature = self._sign_reconf_msg(reconf_msg)
     return reconf_msg