Skip to content

Hibiscus (closure of all remaining jMyles' activation issues)#2355

Merged
KPrasch merged 9 commits intonucypher:mainfrom
jMyles:hibiscus
Oct 14, 2020
Merged

Hibiscus (closure of all remaining jMyles' activation issues)#2355
KPrasch merged 9 commits intonucypher:mainfrom
jMyles:hibiscus

Conversation

@jMyles
Copy link
Contributor

@jMyles jMyles commented Oct 13, 2020

Fixes #1714
Fixes #2186
Fixes #1075

Adds logs to help track down #2345 / #1698

first_matching_ursula = matching_ursulas[0]

with first_matching_ursula.datastore.describe(TreasureMap, policy.treasure_map._hrac.hex()) as saved_map_record:
assert saved_map_record.treasure_map == bytes(policy.treasure_map)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is nice.

@jMyles jMyles changed the title [WIP] Hibiscus Hibiscus Oct 13, 2020
@jMyles jMyles changed the title Hibiscus Hibiscus (closure of all remaining jMyles' activation issues) Oct 13, 2020
self.additional_nodes_to_track = []
self.updated = maya.now()
self._nodes = OrderedDict()
self._marked = defaultdict(list) # Beginning of bucketing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, feels about right IMO.

self._learning_deferred.addCallback(_discover_or_abort)
self._learning_deferred.addErrback(self.handle_learning_errors)

# def clear_learning_deferred(result_of_last_learning_cycle):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the basic motive for removing these two blocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just never really worked. The RELAX pattern (which in compsci terms is, I believe, a "callback cancellation" pattern) more-or-less renders this obsolete. Though I may take a swing at it when we get around to optimizing high-throughput retrieve.


try:
requesting_ursula = Ursula.from_bytes(request.data, registry=this_node.registry)
requesting_ursula = Ursula.from_bytes(request.data)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 - This has been disabled for now but - how does a stranger get verified against the registry if not injected here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First let me say: this change is utterly extemporaneous; I did it only to get a green check (this test had apparently been failing for a while, but went unnoticed because we weren't running this module).

Second: the simplest vision I can think to express is, I guess:

requesting_ursula = Ursula.from_bytes(request.data)
requesting_ursula.mature()
requesting_ursula.verify_node(registry=this_node.registry)

...though in calmer times, I might also even ask why verification is important here.

def propose_arrangement(self, network_middleware, ursula, arrangement) -> bool:
negotiation_response = network_middleware.propose_arrangement(arrangement=arrangement)
def propose_arrangement(self, network_middleware, arrangement) -> bool:
negotiation_response = network_middleware.propose_arrangement(arrangement=arrangement) # Wow, we aren't even passing node here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that approval or disapproval 😅 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hahaha; in these crazy times, they feel exactly the same



@pytest.mark.skip("See Issue #1075") # TODO: Issue #1075
def test_vladimir_illegal_interface_key_does_not_propagate(blockchain_ursulas):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see good ol' Vlad coming back.

BTW, what's missing for closing #1075?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right - this closes it.

Copy link
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

@KPrasch KPrasch merged commit 9d20a5c into nucypher:main Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants