@api_request
@peer_required
async def signed_values(self, farmer_request: farmer_protocol.SignedValues, peer: ws.WSChiaConnection) -> Optional[Message]:
    '\n        Signature of header hash, by the harvester. This is enough to create an unfinished\n        block, which only needs a Proof of Time to be finished. If the signature is valid,\n        we call the unfinished_block routine.\n        '
    candidate_tuple: Optional[Tuple[(uint32, UnfinishedBlock)]] = self.full_node.full_node_store.get_candidate_block(farmer_request.quality_string)
    if (candidate_tuple is None):
        self.log.warning(f'Quality string {farmer_request.quality_string} not found in database')
        return None
    (height, candidate) = candidate_tuple
    if (not AugSchemeMPL.verify(candidate.reward_chain_block.proof_of_space.plot_public_key, candidate.foliage.foliage_block_data.get_hash(), farmer_request.foliage_block_data_signature)):
        self.log.warning('Signature not valid. There might be a collision in plots. Ignore this during tests.')
        return None
    fsb2 = dataclasses.replace(candidate.foliage, foliage_block_data_signature=farmer_request.foliage_block_data_signature)
    if candidate.is_transaction_block():
        fsb2 = dataclasses.replace(fsb2, foliage_transaction_block_signature=farmer_request.foliage_transaction_block_signature)
    new_candidate = dataclasses.replace(candidate, foliage=fsb2)
    if (not self.full_node.has_valid_pool_sig(new_candidate)):
        self.log.warning('Trying to make a pre-farm block but height is not 0')
        return None
    request = full_node_protocol.RespondUnfinishedBlock(new_candidate)
    try:
        (await self.full_node.respond_unfinished_block(request, None, True))
    except Exception as e:
        self.full_node.log.error(f'Error farming block {e} {request}')
        candidate_tuple = self.full_node.full_node_store.get_candidate_block(farmer_request.quality_string, backup=True)
        if (candidate_tuple is not None):
            (height, unfinished_block) = candidate_tuple
            self.full_node.full_node_store.add_candidate_block(farmer_request.quality_string, height, unfinished_block, False)
            assert (unfinished_block.foliage.foliage_transaction_block_hash is not None)
            message = farmer_protocol.RequestSignedValues(farmer_request.quality_string, unfinished_block.foliage.foliage_block_data.get_hash(), unfinished_block.foliage.foliage_transaction_block_hash)
            (await peer.send_message(make_msg(ProtocolMessageTypes.request_signed_values, message)))
    return None
Signature of header hash, by the harvester. This is enough to create an unfinished
block, which only needs a Proof of Time to be finished. If the signature is valid,
we call the unfinished_block routine.
@api_request
@peer_required
async def signed_values(self, farmer_request: farmer_protocol.SignedValues, peer: ws.WSChiaConnection) -> Optional[Message]:
    '\n        Signature of header hash, by the harvester. This is enough to create an unfinished\n        block, which only needs a Proof of Time to be finished. If the signature is valid,\n        we call the unfinished_block routine.\n        '
    candidate_tuple: Optional[Tuple[(uint32, UnfinishedBlock)]] = self.full_node.full_node_store.get_candidate_block(farmer_request.quality_string)
    if (candidate_tuple is None):
        self.log.warning(f'Quality string {farmer_request.quality_string} not found in database')
        return None
    (height, candidate) = candidate_tuple
    if (not AugSchemeMPL.verify(candidate.reward_chain_block.proof_of_space.plot_public_key, candidate.foliage.foliage_block_data.get_hash(), farmer_request.foliage_block_data_signature)):
        self.log.warning('Signature not valid. There might be a collision in plots. Ignore this during tests.')
        return None
    fsb2 = dataclasses.replace(candidate.foliage, foliage_block_data_signature=farmer_request.foliage_block_data_signature)
    if candidate.is_transaction_block():
        fsb2 = dataclasses.replace(fsb2, foliage_transaction_block_signature=farmer_request.foliage_transaction_block_signature)
    new_candidate = dataclasses.replace(candidate, foliage=fsb2)
    if (not self.full_node.has_valid_pool_sig(new_candidate)):
        self.log.warning('Trying to make a pre-farm block but height is not 0')
        return None
    request = full_node_protocol.RespondUnfinishedBlock(new_candidate)
    try:
        (await self.full_node.respond_unfinished_block(request, None, True))
    except Exception as e:
        self.full_node.log.error(f'Error farming block {e} {request}')
        candidate_tuple = self.full_node.full_node_store.get_candidate_block(farmer_request.quality_string, backup=True)
        if (candidate_tuple is not None):
            (height, unfinished_block) = candidate_tuple
            self.full_node.full_node_store.add_candidate_block(farmer_request.quality_string, height, unfinished_block, False)
            assert (unfinished_block.foliage.foliage_transaction_block_hash is not None)
            message = farmer_protocol.RequestSignedValues(farmer_request.quality_string, unfinished_block.foliage.foliage_block_data.get_hash(), unfinished_block.foliage.foliage_transaction_block_hash)
            (await peer.send_message(make_msg(ProtocolMessageTypes.request_signed_values, message)))
    return None