Blue oyster mushrooms: Evolving node validity, optimization, domain separation, and migration.#1881
Blue oyster mushrooms: Evolving node validity, optimization, domain separation, and migration.#1881
Conversation
dfb1e5d to
e8338e9
Compare
|
I'd like to suggest that we use the "scope hammer" for Issues regarding migration and include them in another PR. |
21179e3 to
7f39e90
Compare
7fba47c to
0fa885a
Compare
0fa885a to
cf8913f
Compare
cf8913f to
395135f
Compare
d2a6ec6 to
100175c
Compare
| uris.extend(hardcoded_uris) | ||
|
|
||
| return uris | ||
| # TODO: This module seems unused |
KPrasch
left a comment
There was a problem hiding this comment.
Turned into a very nice cleanup. 🤠
In it goes.
| __DEFAULT_MIDDLEWARE_CLASS = RestMiddleware | ||
|
|
||
| LEARNER_VERSION = LEARNING_LOOP_VERSION | ||
| LOWEST_COMPATIBLE_VERSION = 2 # Disallow versions lower than this |
There was a problem hiding this comment.
Feels like a semantic version tuple would be more intuitively understandable here.
There was a problem hiding this comment.
YES! I though something like that but also had second thoughts regarding how to encode this efficiently.
There was a problem hiding this comment.
This raises two questions from me:
- What does a minor vs major bump mean?
- How and when does the version get updated?
There was a problem hiding this comment.
Both good questions. The current design in main implicitly assumes all versions are going to be back-wards compatible, in the sense that if you detect a node from a past version, no special handling of the metadata is performed. There are cases, like our particular bump from version 1 to version 2, where this is not desirable (as this is a "major" change in semver parlance), but I certainly can imagine other cases where we bump the version and at the same time try to maintain compatibility with the old version (a "minor" change). The approach taken in this PR is very simplistic, and I think there's room for improvement, but at least ensures that no metadata from version 1 will linger on the network.
There was a problem hiding this comment.
🤔 Interesting - I suggest we open an Issue to track and leave it for a future PR
There was a problem hiding this comment.
How can we keep a whole other Ursula class accessible? What's the mechanism here?
There was a problem hiding this comment.
Kind of like what's happening in this test:
https://github.com/nucypher/bytestringSplitter/blob/master/tests/test_kwargifiers.py#L127
The "EnergyDrink" class, in this case being the "future Ursula with new methods and attributes"
There was a problem hiding this comment.
What I meant is that you'll have to have the V1 Ursula class defined somewhere. Which is huge, and has links to other parts of the codebase. Feels like it would be easier to convert whatever you deserialized to the current Ursula.
There was a problem hiding this comment.
Well yeah... it depends on where the future takes us. If the V1 can be the super class of the V2, then it's not so bad, we just change/add some methods.
If it's a total brand new distinct class, then it's less fun.
There was a problem hiding this comment.
I just realized, something similar to this situation is already happening in the case of TreasureMaps vs SignedTreasureMaps.
Two distinct classes with different bytestring de/serializations, one a subclass of the other.
…rent domain Demonstrates #1843
… nodes from other domains
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
… class with lower-level crypto.api
2254ee3 to
47e01d6
Compare
| # The number of nodes having the map is approximately the number you'd expect from full utilization of Alice's publication threadpool. | ||
| # TODO: This line fails sometimes because the loop goes too fast. | ||
| assert len(nodes_that_have_the_map_when_we_unblock) == pytest.approx(policy.publishing_mutex._block_until_this_many_are_complete, .2) | ||
| # assert len(nodes_that_have_the_map_when_we_unblock) == pytest.approx(policy.publishing_mutex._block_until_this_many_are_complete, .2) |
There was a problem hiding this comment.
Do we want to do any follow-up here?
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Contains the following PRs:
Closes issues:
nucypher.datastore.keypairs.pytonucypher.crypto#2236: Relocate keypairs.py from datastore to crypto.Issues to address: