mirror of https://github.com/nucypher/nucypher.git
Remove second stamp substantiation. Fix #1091
parent
f969b62a09
commit
8dcf5a799d
|
@ -881,7 +881,7 @@ class Ursula(Teacher, Character, Worker):
|
|||
# Self-Ursula
|
||||
#
|
||||
# TODO: Better handle ephemeral staking self ursula <-- Is this still relevant?
|
||||
|
||||
self.log.debug(f"URSULA worker: {worker_address}, staker {checksum_address}")
|
||||
if is_me is True: # TODO: #340
|
||||
self._stored_treasure_maps = dict()
|
||||
|
||||
|
@ -889,7 +889,6 @@ class Ursula(Teacher, Character, Worker):
|
|||
# Ursula is a Decentralized Worker
|
||||
#
|
||||
if not federated_only:
|
||||
|
||||
# Prepare a TransactingPower from worker node's transacting keys
|
||||
transacting_power = TransactingPower(account=worker_address,
|
||||
password=client_password,
|
||||
|
@ -898,6 +897,8 @@ class Ursula(Teacher, Character, Worker):
|
|||
|
||||
# Use this power to substantiate the stamp
|
||||
self.substantiate_stamp()
|
||||
self.log.debug(f"Created decentralized identity evidence: {self.decentralized_identity_evidence[:10].hex()}")
|
||||
decentralized_identity_evidence = self.decentralized_identity_evidence
|
||||
|
||||
Worker.__init__(self,
|
||||
is_me=is_me,
|
||||
|
@ -969,17 +970,12 @@ class Ursula(Teacher, Character, Worker):
|
|||
certificate_filepath = self._crypto_power.power_ups(TLSHostingPower).keypair.certificate_filepath
|
||||
certificate = self._crypto_power.power_ups(TLSHostingPower).keypair.certificate
|
||||
Teacher.__init__(self,
|
||||
password=password,
|
||||
domains=domains,
|
||||
certificate=certificate,
|
||||
certificate_filepath=certificate_filepath,
|
||||
interface_signature=interface_signature,
|
||||
timestamp=timestamp,
|
||||
decentralized_identity_evidence=decentralized_identity_evidence,
|
||||
|
||||
# TODO: #1091 When is_me and not federated_only, the stamp is substantiated twice
|
||||
worker_address=worker_address,
|
||||
substantiate_immediately=is_me and not federated_only,
|
||||
)
|
||||
|
||||
#
|
||||
|
|
|
@ -873,15 +873,12 @@ class Teacher:
|
|||
__DEFAULT_MIN_SEED_STAKE = 0
|
||||
|
||||
def __init__(self,
|
||||
worker_address: str,
|
||||
domains: Set,
|
||||
certificate: Certificate,
|
||||
certificate_filepath: str,
|
||||
interface_signature=NOT_SIGNED.bool_value(False),
|
||||
timestamp=NOT_SIGNED,
|
||||
decentralized_identity_evidence=NOT_SIGNED,
|
||||
substantiate_immediately=False,
|
||||
password=None,
|
||||
) -> None:
|
||||
|
||||
#
|
||||
|
@ -914,10 +911,6 @@ class Teacher:
|
|||
self.verified_node = False
|
||||
self.__worker_address = None
|
||||
|
||||
if substantiate_immediately:
|
||||
# TODO: #1091 When is_me and not federated_only, the stamp is substantiated twice
|
||||
self.substantiate_stamp(client_password=password)
|
||||
|
||||
class InvalidNode(SuspiciousActivity):
|
||||
"""Raised when a node has an invalid characteristic - stamp, interface, or address."""
|
||||
|
||||
|
|
|
@ -529,7 +529,6 @@ def stakers(testerchain, agency, token_economics):
|
|||
@pytest.fixture(scope="module")
|
||||
def blockchain_ursulas(testerchain, stakers, ursula_decentralized_test_config):
|
||||
|
||||
# Leave out the last Ursula for manual stake testing
|
||||
_ursulas = make_decentralized_ursulas(blockchain=testerchain,
|
||||
ursula_config=ursula_decentralized_test_config,
|
||||
stakers_addresses=testerchain.stakers_accounts,
|
||||
|
|
Loading…
Reference in New Issue