Skip to content

Instantly share code, notes, and snippets.

@jMyles
Created August 21, 2020 20:28
Show Gist options
  • Save jMyles/c217a17ea4695c76d8933068e75a6a75 to your computer and use it in GitHub Desktop.
Save jMyles/c217a17ea4695c76d8933068e75a6a75 to your computer and use it in GitHub Desktop.
label onto
# Branch Merging-the-revised-tests-with-the-shim-commit-31f001f2e-
reset 28cce2fcc # Reorganize tests into multiple suites.
pick 31f001f2e This will be the basis of a merge commit in the rebase of these tests. One of them reactivates Vladimir; the other fixes the method for testing the presence of Treasure Maps.
label Merging-the-revised-tests-with-the-shim-commit-31f001f2e-
# Branch jMyles-†reasure-ïsland-ss-pi®ate-ß̆çh
reset 523ea089f # Merge pull request #2098 from KPrasch/enrico
pick 811549d1b Get Alice's checksum address for a given Policy.
pick 5efde98fb Sign TreasureMap with wallet keypair... now what?
pick 5a4328f0c Begining to test to show that blockchain signature prevents duplication.
pick 995eceb7f Add blockchain signature verification call in do_store logic.
pick 7bc2ec653 Different map classes for different policy modes.
pick d155fe7fd Acquiring StakeList only if starting work now.
pick aa93a7d15 Reactivating Vladimir.
pick 8a113eaed Vladimir tries to publish a TreasureMap with his own content.
pick 6b087f77b Separate responses for different bad TreasureMap scenarios.
pick cca843d71 Test showing that Vladimir's efforts at posting a nonsense TreasureMap will fail.
pick ab6c15fee When Bob joins a policy, he needs to deserialize the proper map class.
pick db5a5888b Since we set _checksum_address in Worker, Vladimir needs to compose his fradulent address after the fact.
pick 5ffb35655 Vlad's APIs are consistent with the real deal again.
pick 1a6e3b09e Splitting test logic to show when the problem is with Bob or with Alice.
pick 9e5ee658f Major surgery on _set_checksum_address.
pick d92a8d090 Facility for Bob (or an acquaintance) to find the nodes which are supposed to have his TreasureMaps.
pick 3d54aaf0d Bob now waits to learn about new nodes if he can't immediately find the TreasureMap.
pick 5b63b670a Now Alice only PUTs the maps on the nodes where Bob will think to look. Fixes #342.
pick 7deab1242 Mocking one layer out (setting policy) for these tests.
pick e576793e4 Alice now proposes Arrangements; Ursula considers them. Fixes #1924.
pick 0d6961c33 Carving out checksum_address check. A first swing at #1930.
pick f5458fde6 Evolving the test to show how Bob can find a map much more quickly.
pick d65ad8fb9 Docstring update for Character.
pick 7ef3c0596 We no longer assume that any representation of a decentralized Character has a checksum address. Fixes #1967
pick 62c6e9c35 Let PolicyCredential make the decentralized variant of TreasureMap when necessary.
pick b2362f584 Bob figures out which type of map he needs.
pick 6ce384d57 If we try to cast a DecentralizedTreasureMap to bytes without the blockchain signature, we end up with very odd behavior.
pick 5931076f7 Including a fake signature for the test.
pick b821b81a8 Amonia needs to remember not to publish TreasureMaps, lest her gig being discovered too soon.
pick f3b159d8e Separating publishing kwargs: one for blockchain, one for TreasureMap (because you might only want to do the former and not the latter in the decentralized scenario, or not do either one in a federated scenario.
pick 2a8989aed Updated kwarg name.
pick 568541dde Decentralized Alice controller test needs, you guessed it, DecentralizedTreasureMap.
pick 414f48c92 Further down the optimization adventuref for NodeSprout.
pick 5cd3e61b3 What happens if we add a little slowness like network latency? (And here's where we'll have to add concurrency).
pick fb523765b Test using the sluggish middleware; this is the one that will require the concurrency from the last commit.
pick cc00294ee Adding a 'last chance' escape hatch for blocking node learning, so that, if the timeout is reached, we check one last time to see if we've learned about the necessary number of nodes.
pick 4488b5968 Getting a little crazy - first swing at concurrent Alice-=>Ursula connection.
pick d301da3da It's slow, but it's a start. This test passes in about 9 seconds right now; subsequent commits will tune it.
pick 96c8a7d19 A way for Alice to move on after the TreasureMap is 10% published and let the rest happen in the background.
pick f21bc0cb7 This zany test actually passes - now to get that 30 second limit down.
pick ea78f4f81 Another place with wasteful address calculation.
pick b22e6cc7b A threadpool for alice to use for policy publication network requests.
pick d2686ce84 Using the threadpool and the custom mutex - substantially faster test run.
pick 35b30d5af Putting the fake latency on either side of the endpoint gives slightly more realistic conditions.
pick 3b309bacc Cleaning up here results in faster test run exit.
pick a36c82cfe Honing in on the most important concurrent test assertions. This passes, but we can do even better.
pick 9045c3d7c Refining both test and threadpooling. Looking pretty good now.
pick b680cf296 Introducing acumen, a package for logic relating to what Characters and nodes know (and can know) about each other.
pick 41049d00a Don't try to find matching nodes until we've blocked long enough to even have that many.
pick 701070cb3 Refactor and reorg.
pick 9374947d6 Comment out this block for a moment; Character tests pass in this config.
pick 09e03d156 Stop Alice's publication threadpool at the end of fixtures; otherwise tests hang.
pick d4807654b Changing references to acumen materials.
pick 88b53fff1 Relative import as the start of the question to keep this compatible as a package.
pick be372ec0b Alice's threadpool stops when the reactor stops.
pick b0bd5165c Using 'no_less_than' kwarg.
pick acd7e4145 Fire off a learning task at the beginning of one of the blocking methods. This substantially increases the chance that the method won't need to block for multiple iterations (causes a 4.5s speedup on two tests on my laptop).
pick f84c8ab26 Map comparisons are better done just by public_id than the full bytes, since it's possible to compare maps in various states of secrecy.
pick 48362fe58 Snaking mutex through a few tests; helpful for debugging.
pick 8e7d83134 Instead of the first Ursula, choose the first Ursula who is supposed to have the map.
pick 62b7ccd9b Fixing locations and formats.
pick 365464adc Toward a more coherent depiction of 1547, and how NO_BLOCKCHAIN_CONNECTION can be understood when init'ing a Character.
pick d3c6d121d No need to reset checksum_address in Worker - let's try to set it in as few places as possible. #1547.
pick 1170c27b6 The connectivity problem will now manfiest itself as NotEnoughNodes, as Bob won't have learned in time to try to get the map.
merge -C 97de268bd Merging-the-revised-tests-with-the-shim-commit-31f001f2e- # Merging the revised tests with the shim commit 31f001f2e.
pick 9d8af8768 Adding acumen to TOC so that the apidoc builder finds it.
pick 2065262a0 Setting checksum_address to staker address, and looking up TransactingPower in the usual (albeit private) way.
pick d4ec70115 It's also now possible for checksum_address to be NO_BLOCKCHAIN_CONNECTION at this point.
pick 8697a2204 No need to catch this exception anymore; let it raise.
pick 1b5917d72 Clarifying failure message; this makes it easier to understand why this test occasionally fails.
pick b3ac5a6e3 If the port is too high, try again. Attempting to deal with #1546.
pick fd086458e Matching node floor is now 7; this will have no impact in production, but makes the tests pass.
pick 263aa1fab The first node in the fixture might not always be among the matching nodes.
pick a9c1763e1 Exception tuple needs to be unpacked here; TypeError otherwise.
pick b491a613a Allow other Characters to be --lonely.
pick 65607953d All sorts of out-comments to get the lonely thing kickin'.
pick 61b87f93b Getting --lonely through each Character where it's used.
pick 4ca6688a8 Moving hardcoded seednodes to middleware.
pick 3c58a0ce6 Moving seednode loading logic inward.
pick e845dc3b5 We're not connecting to seednodes at this stage anymore.
pick f708b77a5 Going back to defined ports in the hopes of working out #1546 / #1689.
pick b277436cc Note here that this fails sometimes. Perhaps needs to become an Issue.
pick 03a4bcd75 Moving lonely up to the main config instead of each Character config.
pick e8e3e9ab4 Fixing up fixtures to fail fast and delete Ursulas when done.
pick 33f71f6e5 The number of known nodes might be a bit variable at this point; we're really concerned that he has only connected to 2.
pick 935ac06d2 A Character created from blank config will try to connect to seednodes without lonely.
pick 1d75ced04 We need to fetch the actual Ursula from the cache to get the bytestring; this will be a sprout nowadays.
pick e7387352b Reworked logic to determine good serials for mocks.
pick 3a2191248 We no longer need to lower the parameter here; this test can pass in time with all 5000.
pick 52564b446 No need to verify announced nodes anymore, since we do this lazily now. Fixes #555.
pick fa927115f Removing fail-slow logic from seednode resolution.
pick dbf910696 Longer time allowance for this test; it will still almost certainly pass in the faster times on CI, but it's a pain to have it fail locally.
pick 81a4c623b This is a more acute test with a nonstandard domain, as it assures that the actual seednode logic is used.
pick 169fffd41 This entire test (and part of another) is no longer relevant, as Alice and Bob will learn about seednodes form their hardcoded domain list in such a scenario.
pick ca2e84eb2 Only simulate hardcoded domain nodes for TEMPORARY_DOMAIN, not nonstandard test domains.
pick 2df24bb29 Loading seednodes is now one-and-done. No more retry attempts. Retry by starting the process over.
pick 7c177121f Record proper fleet state at seednode time.
pick 086ff1c3b This test is no longer relevant; the seednode tests cover this logic equally well.
pick 179bd4ae3 Clarify each fleet state (because one of them is the result of the seednode loading).
pick 80ec42844 Don't try to remember nodes of an unknown version; we don't want to learn from them anyway.
pick 091074cd9 This node might be an unknown version; if so, just move on.
pick 0d6185e90 Fixturizing lonely_ursula_maker for cleanup purposes.
pick 10b8b13b9 Ursula maker fixtures now raise if the cache is unclean.
pick d1025e9d1 Using lonely_ursula_maker in all the right places.
pick 31856340a This test needs to look for the checksum_address specifically, since this will be a stranger node or sprout now.
pick 8c6cdf514 Moving federated tests into their own module to keep the cache cleaner.
pick 07b1c8eda Appropriate response for a map that is already stored.
pick 42cf16a0e Fixed imports for acumen.
label branch-point
pick a5c31da1d Handles the --lonely CLI option for alice and bob command.
pick 8cf42aab0 Separating lifecycle tests for fixture hygiene.
pick 92fb447c0 We no longer need to connect to default domains, and removing it saves us an otherwise circular import with...
pick 9ae5c88aa ...the config.node module, where it's nice to be able to be able to set a default known node class.
pick 1c7fc6884 Minimal disenchantment logic. #2127.
pick 5f1c8f30e Felix needs to not learn.
pick 05abdb6d8 Reimplementing --teacher-uri in simpler form.
pick b026c120e Only try to find canonical seednode urls if we have a learning domain.
pick ae74bc81e This error handling no longer makes sense; sprouts don't have these exceptions.
pick fb119720b Divide cli lifecycle tests into federated and decentralized in order to keep Ursula cache separated.
pick e20a7a3a7 Felix doesn't use a network domain.
pick a7303702a Skipping this test until we get the DB (#2099) worked out.
pick 86398eb43 Don't ship blockchain_bob with known_nodes; he can use his domain hardcoded nodes. Also, don't start his learning loop after the fact. This caused this test to pass even when he was unable to actually find the nodes in join_policy.
pick f82e9f123 Moving stop_character upward to capture other controller cases.
pick d103664d4 We only want to record one fleet state per iteration; this loop previously recorded two.
pick fe908a1e8 Add a measure of maturation time; if this increases dramatically, that will represent a breakage.
pick 679022c42 Another test that was passing for the wrong reason. It now works regardless of whether the future Ursula is a hardcoded seednode or a user-specified one.
pick 9ba8e1dd3 Lifecycle logic - shared in federated and blockchain modules.
label jMyles-†reasure-ïsland-ss-pi®ate-ß̆çh
# Branch Merging-2128-2137-2155-into-a-rebase-over-main-instead-of-three-separate-github-generated-merge-commits-which-caused-a-conflict-
reset branch-point # Fixed imports for acumen.
merge -C 1d93de9ce jMyles-†reasure-ïsland-ss-pi®ate-ß̆çh # Merge pull request #2128 from jMyles/†reasure-ïsland-@ss-pi®ate-ß̆çh
pick 7f032152d Ensuring that Enrico doesn't have to deal with known_node class.
pick eaa6b94a4 Starting Bob's learning loop here (which is in keeping with reality) is needed now that we don't hardcode Bob's fixture nodes.
pick 52a7bf3a8 Lookup transacting_power in the typical public way.
pick a2123b512 Return of demo fleet Ursulas spinup script.
pick 1672160fd This log message was confusing.
pick 96100bcd3 This race condition no longer exists.
pick ad672d751 Crash more quickly on learning errors in seednode resolution.
pick c68af1de9 It makes more sense to force this off into a thread. We're not eager anyway, so there's no reason to chance blocking the main thread.
pick 85806613f Allow worker to attempt period commitment as part of it's initialization.
pick 9f6fb79c8 Reducing density; this line was crazy.
pick 1cddc60e9 Fixing blunderous percentage error - thanks @fjarri.
pick e1c522ff2 use 12 ursulas for circle docker demo integration tests
pick 7e964fe4e Stop Alice's publication threadpool in disenchant().
pick 9d5f18ee0 Crash more quickly, and with better error, if unable to get cert during seednode instantiation.
pick 78abb8f6e Yanking some autouses in favor of usefixtures. [skip ci]
pick 1a9883831 Still need to set known_node_class here.
pick e8fb74132 More useful division of error situations where a signature from a Teacher appears to be invalid.
pick 12ba86947 No need for the if here - this function checks if it's running.
pick e741a96ff Another deprecated federated_only.
pick c5e95fc2c Stopping here breaks RPC and other long-running CLI. Need to put it elsewhere.
pick 426174359 Adding cancellation to keep_learning logic.
pick 4a616d143 Flagging test bob's origins for inspection on other threads.
pick 1534bc07a Stopping Bob and Ursula at appropriate times.
pick 790719f41 Moving the canceller to a top-level class and re-using it.
pick 695c1c4bd Struggling with some ALreadyCalled issues - turning debugging on for the defer module gives some useful insight.
pick d06deba74 Some debugging breadcrumbs for Ursula.
pick 9c577a5b9 Loading seednodes here is enough.
pick ad05f4a09 This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request.
pick 513dbdfe3 This might happen to a stranger who isn't a node and doesn't have a rest_url.
pick ff044297b make_federated_ursulas gets called from a few places of varying depths in the stack - accounting for that.
pick 7bea1de3c Tests were hanging.
pick d18b2e083 Big fixup for the remaining errors blocking integration.learning.
pick a3baea560 Cleaning logged message for #724 / #2156.
pick 7d7608086 Slow, debugger-friendly version of the instantiation of our discovery looping call.
pick fbc4d58c3 Temporary tweaks and out-comments to get cancellation working on a (logically) sub-optimal way.
pick 50ddae77a Lots of Character stoppages; these continually running loops went unnoticed before.
pick 029da78b0 Much more leeway in the number of nodes that have the map when we unblock (as this varies widely just on my laptop, depending on what else I'm running in the background.
pick be71b934d master -> main
pick 39f0dc4d6 Some more debug-level logs instead of prints.
pick bf4e8adb2 Making mature() a bit safer against reentrancy situations. Might still need a mutex.
pick 424ed29ab Stopping character after CLI action.
label Merging-2128-2137-2155-into-a-rebase-over-main-instead-of-three-separate-github-generated-merge-commits-which-caused-a-conflict-
# Branch vzotova-even-more-stakes
reset 76eea579a # Merge pull request #2099 from tuxxy/datastore-more-like-history-store
pick 0d39b8a7b Flag to create and increase sub-stakes without deposit (using unlocked tokens)
pick ada682473 Command to merge stakes in agent, actor and CLI
pick a74bb794d Updates docs with `merge` command
pick 21cf90276 Apply suggestions from code review #2158
label vzotova-even-more-stakes
# Branch fjarri-sampling
reset onto
pick 32371761e Implement RFCs, part 3
pick 449139e0a Fix a logical mistake in sample()
label fjarri-sampling
# Branch KPrasch-pizza-factory
reset 76eea579a # Merge pull request #2099 from tuxxy/datastore-more-like-history-store
merge -C ae371611e vzotova-even-more-stakes # Merge pull request #2158 from vzotova/even-more-stakes
merge -C 697a6d3d0 fjarri-sampling # Merge pull request #2056 from fjarri/sampling
label branch-point-2
pick 1b93ca47f Add Snetry SDK to ursula's pip extra.
pick 83f44fda0 rework capsule/signature serialization to avoid using msgpack
pick 629081418 Fix wrong kwarg name in PRETask
pick 4797476ad When serializing CFrags in PRETask, use a VariableLengthBytestring, as it may contain arbitrary metadata
pick ef692f347 Basic unit tests for PRETask
pick 52dec3203 Continue formalization of PRETask splitters
pick 6dd02d270 Minor face-lifting for WorkOrder
pick 74757a9ab Fixed size for decentralized identity evidence (it's 65, btw)
pick 13c636f26 Improve input validation of PRETask.get_specification() and add test
pick 5f4cfe9f0 Fix wrong logic for error messages in Teacher.verify_node(). Code cleaning in lawful.py
pick 57d976c4d Get rid of unnecessary digest of capsules in WorkOrder generation
pick 52e21bbb6 Fix mock_ursula_reencrypts so it produces expected output types
pick 0d9f95ee8 Unit tests for WorkOrder
pick 42ae16112 WorkOrder.tasks is a dict keyed by capsules. This was working by coincidence
pick 622aff5ce Some improved log messages when retrieving
pick e1d53f123 Improve transaction failed console error reporting.
pick c9b4f0de5 Use exception chaining duing transaction failed handling
pick 833530f58 import PolicyArrangement for metrics collection
label KPrasch-pizza-factory
# Branch fjarri-fixed-rng-in-sampling-test
reset branch-point-2 # Merge pull request #2056 from fjarri/sampling
merge -C 226e49a21 KPrasch-pizza-factory # Merge pull request #2164 from KPrasch/pizza-factory
label branch-point-3
pick 1a08b9029 Fix RNG seed in the sampling test to avoid low-probability random fails
label fjarri-fixed-rng-in-sampling-test
# Branch Mege-commit-uniting-fjarri-sampling-work-and-the-rest-of-the-async-branch-of-TI-Done-in-order-to-provide-a-surface-for-blocking-when-sampling-See-https-ptb-discordapp-com-channels-411401661714792449-411401661714792451-744248303528575037-
reset branch-point-3 # Merge pull request #2164 from KPrasch/pizza-factory
merge -C b1b3c933b fjarri-fixed-rng-in-sampling-test # Merge pull request #2181 from fjarri/fixed-rng-in-sampling-test
label Mege-commit-uniting-fjarri-sampling-work-and-the-rest-of-the-async-branch-of-TI-Done-in-order-to-provide-a-surface-for-blocking-when-sampling-See-https-ptb-discordapp-com-channels-411401661714792449-411401661714792451-744248303528575037-
reset 76eea579a # Merge pull request #2099 from tuxxy/datastore-more-like-history-store
#
#
# DEDUPLICATE
#
#
drop e1cded468 Get Alice's checksum address for a given Policy.
drop 8cd2b9eed Sign TreasureMap with wallet keypair... now what?
drop 358c219b3 Begining to test to show that blockchain signature prevents duplication.
drop f4fc313a4 Add blockchain signature verification call in do_store logic.
drop 6e163a1ba Different map classes for different policy modes.
drop 0abe1eaa5 Acquiring StakeList only if starting work now.
drop f1984d446 Reactivating Vladimir.
drop a8f8e61fb Vladimir tries to publish a TreasureMap with his own content.
drop 5b21e9fd5 Separate responses for different bad TreasureMap scenarios.
drop 45b906225 Test showing that Vladimir's efforts at posting a nonsense TreasureMap will fail.
drop cdc94cda0 When Bob joins a policy, he needs to deserialize the proper map class.
drop 383492ee3 Since we set _checksum_address in Worker, Vladimir needs to compose his fradulent address after the fact.
drop 5e494a910 Vlad's APIs are consistent with the real deal again.
drop 3e9cf8038 Splitting test logic to show when the problem is with Bob or with Alice.
drop bc99fff62 Major surgery on _set_checksum_address.
drop dd0cc66ad Facility for Bob (or an acquaintance) to find the nodes which are supposed to have his TreasureMaps.
drop bcd0d77bd Bob now waits to learn about new nodes if he can't immediately find the TreasureMap.
drop e0491fa74 Now Alice only PUTs the maps on the nodes where Bob will think to look. Fixes #342.
drop 106b60f3f Mocking one layer out (setting policy) for these tests.
drop 6d60c66ec Alice now proposes Arrangements; Ursula considers them. Fixes #1924.
drop 73e52ee68 Carving out checksum_address check. A first swing at #1930.
drop 7a599d2c5 Evolving the test to show how Bob can find a map much more quickly.
drop 252a063e6 Docstring update for Character.
drop ef01dd0ea We no longer assume that any representation of a decentralized Character has a checksum address. Fixes #1967
drop dcce04872 Let PolicyCredential make the decentralized variant of TreasureMap when necessary.
drop fcfea5e8a Bob figures out which type of map he needs.
drop bdfa05876 If we try to cast a DecentralizedTreasureMap to bytes without the blockchain signature, we end up with very odd behavior.
drop 1a20bbb15 Including a fake signature for the test.
drop 8f248100f Amonia needs to remember not to publish TreasureMaps, lest her gig being discovered too soon.
drop 8e4b60e4f Separating publishing kwargs: one for blockchain, one for TreasureMap (because you might only want to do the former and not the latter in the decentralized scenario, or not do either one in a federated scenario.
drop ec01301cc Updated kwarg name.
drop fc3e105e5 Decentralized Alice controller test needs, you guessed it, DecentralizedTreasureMap.
drop 28ac095d1 Further down the optimization adventuref for NodeSprout.
drop 192356816 What happens if we add a little slowness like network latency? (And here's where we'll have to add concurrency).
drop 60b9ad9c2 Test using the sluggish middleware; this is the one that will require the concurrency from the last commit.
drop aabc49097 Adding a 'last chance' escape hatch for blocking node learning, so that, if the timeout is reached, we check one last time to see if we've learned about the necessary number of nodes.
drop b42f6da1d Getting a little crazy - first swing at concurrent Alice-=>Ursula connection.
drop 05b589121 It's slow, but it's a start. This test passes in about 9 seconds right now; subsequent commits will tune it.
drop 4ebfa5789 A way for Alice to move on after the TreasureMap is 10% published and let the rest happen in the background.
drop c1cc0395e This zany test actually passes - now to get that 30 second limit down.
drop 274c12bf3 Another place with wasteful address calculation.
drop 6d111bede A threadpool for alice to use for policy publication network requests.
drop 717d901a3 Using the threadpool and the custom mutex - substantially faster test run.
drop f2b8daa1f Putting the fake latency on either side of the endpoint gives slightly more realistic conditions.
drop 359980288 Cleaning up here results in faster test run exit.
drop 230bcdc26 Honing in on the most important concurrent test assertions. This passes, but we can do even better.
drop 295518033 Refining both test and threadpooling. Looking pretty good now.
drop cfc9485df Introducing acumen, a package for logic relating to what Characters and nodes know (and can know) about each other.
drop ad964c90f Don't try to find matching nodes until we've blocked long enough to even have that many.
drop 5b9e5e871 Refactor and reorg.
drop 94bf759aa Comment out this block for a moment; Character tests pass in this config.
drop 18993022e Stop Alice's publication threadpool at the end of fixtures; otherwise tests hang.
drop fdc69cd0e Changing references to acumen materials.
drop c031536ec Relative import as the start of the question to keep this compatible as a package.
drop 328a899a5 Alice's threadpool stops when the reactor stops.
drop fdcafb4ec Using 'no_less_than' kwarg.
drop a32eb189a Fire off a learning task at the beginning of one of the blocking methods. This substantially increases the chance that the method won't need to block for multiple iterations (causes a 4.5s speedup on two tests on my laptop).
drop 15a0bc95c Map comparisons are better done just by public_id than the full bytes, since it's possible to compare maps in various states of secrecy.
drop 9a055de83 Snaking mutex through a few tests; helpful for debugging.
drop 14165eb4d Instead of the first Ursula, choose the first Ursula who is supposed to have the map.
drop 836ee7d95 Toward a more coherent depiction of 1547, and how NO_BLOCKCHAIN_CONNECTION can be understood when init'ing a Character.
drop babcd9174 No need to reset checksum_address in Worker - let's try to set it in as few places as possible. #1547.
drop b19983094 This will be the basis of a merge commit in the rebase of these tests. One of them reactivates Vladimir; the other fixes the method for testing the presence of Treasure Maps.
drop b800a3fa9 Adding acumen to TOC so that the apidoc builder finds it.
drop 86b24373a Setting checksum_address to staker address, and looking up TransactingPower in the usual (albeit private) way.
drop ae9715c2a It's also now possible for checksum_address to be NO_BLOCKCHAIN_CONNECTION at this point.
drop 090772379 No need to catch this exception anymore; let it raise.
drop 76649704a Clarifying failure message; this makes it easier to understand why this test occasionally fails.
drop 645533421 If the port is too high, try again. Attempting to deal with #1546.
drop 05d93a5cb Matching node floor is now 7; this will have no impact in production, but makes the tests pass.
drop 1101dd3bd The first node in the fixture might not always be among the matching nodes.
drop d7f7b2444 Exception tuple needs to be unpacked here; TypeError otherwise.
drop c6e004b87 Allow other Characters to be --lonely.
drop 486247f3d All sorts of out-comments to get the lonely thing kickin'.
drop 858345a58 Getting --lonely through each Character where it's used.
drop e85acfcca Moving hardcoded seednodes to middleware.
drop 98c63a2b5 Moving seednode loading logic inward.
drop 3db10ae5f We're not connecting to seednodes at this stage anymore.
drop 4ffecd85f Going back to defined ports in the hopes of working out #1546 / #1689.
drop 1e75e3e22 Note here that this fails sometimes. Perhaps needs to become an Issue.
drop 6f40df75a Moving lonely up to the main config instead of each Character config.
drop a69705475 Fixing up fixtures to fail fast and delete Ursulas when done.
drop a3a21ff49 The number of known nodes might be a bit variable at this point; we're really concerned that he has only connected to 2.
drop 9f117ebc6 A Character created from blank config will try to connect to seednodes without lonely.
drop 21ed54097 We need to fetch the actual Ursula from the cache to get the bytestring; this will be a sprout nowadays.
drop 046c8e398 Reworked logic to determine good serials for mocks.
drop 2c4c7a0b1 We no longer need to lower the parameter here; this test can pass in time with all 5000.
drop 9a9ba547b No need to verify announced nodes anymore, since we do this lazily now. Fixes #555.
drop 4b5dbd937 Removing fail-slow logic from seednode resolution.
drop 0a52a8edb Longer time allowance for this test; it will still almost certainly pass in the faster times on CI, but it's a pain to have it fail locally.
drop 392d51f71 This is a more acute test with a nonstandard domain, as it assures that the actual seednode logic is used.
drop cc7e96f67 This entire test (and part of another) is no longer relevant, as Alice and Bob will learn about seednodes form their hardcoded domain list in such a scenario.
drop 6faadb775 Only simulate hardcoded domain nodes for TEMPORARY_DOMAIN, not nonstandard test domains.
drop 547c3c650 Loading seednodes is now one-and-done. No more retry attempts. Retry by starting the process over.
drop bace84eb4 Record proper fleet state at seednode time.
drop eebf26e33 This test is no longer relevant; the seednode tests cover this logic equally well.
drop 0b318c286 Clarify each fleet state (because one of them is the result of the seednode loading).
drop ecac5a933 Don't try to remember nodes of an unknown version; we don't want to learn from them anyway.
drop d40e68869 This node might be an unknown version; if so, just move on.
drop fde4d9049 Fixturizing lonely_ursula_maker for cleanup purposes.
drop ea092fd4d Using lonely_ursula_maker in all the right places.
drop d6d9fb4b6 This test needs to look for the checksum_address specifically, since this will be a stranger node or sprout now.
drop a0db5ffb1 Moving federated tests into their own module to keep the cache cleaner.
drop 7b31d0635 Appropriate response for a map that is already stored.
drop 27b1f8fff Fixed imports for acumen.
drop 9a5ea68db Handles the --lonely CLI option for alice and bob command.
drop 16a7f90e2 Separating lifecycle tests for fixture hygiene.
drop 0dc3f1464 We no longer need to connect to default domains, and removing it saves us an otherwise circular import with...
drop 29e050385 ...the config.node module, where it's nice to be able to be able to set a default known node class.
drop 69840fcdc Minimal disenchantment logic. #2127.
drop fddc95687 Felix needs to not learn.
drop 6b33e5819 Reimplementing --teacher-uri in simpler form.
drop fb0550d38 Only try to find canonical seednode urls if we have a learning domain.
drop 702aa80ee This error handling no longer makes sense; sprouts don't have these exceptions.
drop 5f3eca5b4 Divide cli lifecycle tests into federated and decentralized in order to keep Ursula cache separated.
drop 4e68f532b Felix doesn't use a network domain.
drop 866e0e2e0 Skipping this test until we get the DB (#2099) worked out.
drop 784814c4b Don't ship blockchain_bob with known_nodes; he can use his domain hardcoded nodes. Also, don't start his learning loop after the fact. This caused this test to pass even when he was unable to actually find the nodes in join_policy.
drop 6e2687254 Moving stop_character upward to capture other controller cases.
drop 5b6c57932 We only want to record one fleet state per iteration; this loop previously recorded two.
drop 9437009ff Add a measure of maturation time; if this increases dramatically, that will represent a breakage.
drop 16bc34754 Another test that was passing for the wrong reason. It now works regardless of whether the future Ursula is a hardcoded seednode or a user-specified one.
drop dcbd882a9 Lifecycle logic - shared in federated and blockchain modules.
drop 3d5c9d356 Ensuring that Enrico doesn't have to deal with known_node class.
drop a2b04a00a Starting Bob's learning loop here (which is in keeping with reality) is needed now that we don't hardcode Bob's fixture nodes.
drop 2daa4a28e Lookup transacting_power in the typical public way.
drop 3351af943 Return of demo fleet Ursulas spinup script.
drop 488357b3c This log message was confusing.
drop bab9c03b6 This race condition no longer exists.
drop 8b3b04f3d Crash more quickly on learning errors in seednode resolution.
drop ac4117485 It makes more sense to force this off into a thread. We're not eager anyway, so there's no reason to chance blocking the main thread.
drop 041622c40 Allow worker to attempt period commitment as part of it's initialization.
drop 9f6c72a64 Reducing density; this line was crazy.
drop ff9977796 Fixing blunderous percentage error - thanks @fjarri.
drop c9d176e97 use 12 ursulas for circle docker demo integration tests
drop e7e710bb3 Stop Alice's publication threadpool in disenchant().
drop b23e46d51 Crash more quickly, and with better error, if unable to get cert during seednode instantiation.
drop 266eea23c Yanking some autouses in favor of usefixtures. [skip ci]
drop 92e56069f Still need to set known_node_class here.
drop 0106e0a73 More useful division of error situations where a signature from a Teacher appears to be invalid.
drop b73475a87 No need for the if here - this function checks if it's running.
drop 438b24e0c Another deprecated federated_only.
drop 74483ba59 Stopping here breaks RPC and other long-running CLI. Need to put it elsewhere.
drop 7362b4bfe Adding cancellation to keep_learning logic.
drop 78eb904c1 Flagging test bob's origins for inspection on other threads.
drop 8cd182e26 Stopping Bob and Ursula at appropriate times.
drop e23e968eb Moving the canceller to a top-level class and re-using it.
drop a34196215 Struggling with some ALreadyCalled issues - turning debugging on for the defer module gives some useful insight.
drop eaf7fbca3 Some debugging breadcrumbs for Ursula.
drop 3fa81deb0 Loading seednodes here is enough.
drop a448903bb This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request.
drop 924435ee3 This might happen to a stranger who isn't a node and doesn't have a rest_url.
drop 5fd14a710 make_federated_ursulas gets called from a few places of varying depths in the stack - accounting for that.
drop 7b0e8110b Tests were hanging.
drop e0918764d Big fixup for the remaining errors blocking integration.learning.
drop 838f08789 Cleaning logged message for #724 / #2156.
drop aeb8fa47f Slow, debugger-friendly version of the instantiation of our discovery looping call.
drop ea22e7ef0 Temporary tweaks and out-comments to get cancellation working on a (logically) sub-optimal way.
drop 663b7de3c Lots of Character stoppages; these continually running loops went unnoticed before.
drop cf196f2c7 Much more leeway in the number of nodes that have the map when we unblock (as this varies widely just on my laptop, depending on what else I'm running in the background.
drop fdb726095 Some more debug-level logs instead of prints.
drop 7bdc86a9c Making mature() a bit safer against reentrancy situations. Might still need a mutex.
drop 11e4694df Stopping character after CLI action.
#
#
# END DEDUPLICATE
#
#
merge -C a6a873482 Merging-2128-2137-2155-into-a-rebase-over-main-instead-of-three-separate-github-generated-merge-commits-which-caused-a-conflict- # Merging #2128, #2137, #2155 into a rebase over main (instead of three separate github-generated merge commits, which caused a conflict).
pick b92330f2c Stray name change.
pick a4679e6b8 Reversion of 296617131, yanking autouse from fixtures. See https://ptb.discordapp.com/channels/411401661714792449/411401661714792451/739866441154822234.
pick 5547f397b Cleaning up some warts that were causing occasional failures.
pick e069e8f55 Changing short-circuit logic to a Queue to use as a mutex.
pick 5a4220d4e We always want to crash_right_now if there aren't enough Teachers. This is a quintessential failfast situation.
pick 632427fb1 Track created Characters per test.
pick 4795a32ba Examine remaining Characters when crashing gracefully.
pick 65b3666d6 Couple of fixes on top to get things to run - most notably, 10M lmdb map size (obviously this needs a legit patch or whatever).
pick bf1993b6d Adding global state dictionary for running test Characters.
pick 81b761d8b Unlock Ursula keyring in windingdown test.
pick da582908c Use exception chaining duing transaction failed handling
pick 533a003a9 Restores exception handling around eager node learning (needs follow up)
pick c6b56ed5e Skip geth integration alltogether until #2074
pick 73d1022c9 bifurcate 'network actors' tests.
pick e594ff5e8 Test fixes: another manual tpower activation and attempt to fix tmap reference.
pick 6dd188a6d Skip treasure map duplication test for now.
pick 4057608e6 Checking for zombified Characters and failing modules that leave them in state.
pick d92f386c0 Maybe we don't want to learn at the beginning of the loop, since it can have already stopped. (Is there a better way?)
pick 448a54df8 Also fail if a node crashed.
pick 262938455 Handle shutdown or partially initialized Ursulas; Adjust cli test to reflect.
pick 0a52158b5 Annotate several TODOs.
pick fc859440c Eh, unit test reflecting incorrect LMDB_MAP_SIZE.
pick d60976870 Let's see what happens if we have a general Queue and comment-out the treadpool...
pick 23792bf87 OK, now we can wait in an async method to get a new threadpool for each Policy.
pick ceb29308e Revising here so that we round up the number of responses to unblock.
pick 21b333909 Get Alice's threadpool and pass it *into* the methods.
pick 5c877db1e Logic to use the injected ThreadPool.
pick e913b2e43 Need to get the values of the dict instead of trying to slice the whole object. Fixes #2174.
pick db1f7e51e Transforming and generalizing the mutex.
pick 048436002 Eck. An async shim until we make middleware async.
pick 3e80655d0 Simplified enactment using new mutex.
pick 37ebca4af Reflecting type hint in refactor.
pick b18dfd9a6 Evolving test.
pick 8bdfa02db Separate into... two queues.
pick 8077685df Use the completion queue instead of yielding.
pick fe8e799be Typically we probably want grant() to block until things look like they're going OK.
pick ef691986c Fixing up a couple of hanging issues for the mutex, added two more in TODOs.
pick fc7960193 Need to block here in order to assert later.
pick 3b79e39ee Don't want to block if we're not publishing.
pick b25beaee3 Added some guardrails.
pick 2a76f5fe2 Making sure tests block in the right places.
pick c74bdcb6f Prints -=> logs.
pick 1d367c944 Ensure that created ursula is stopped once local keystore test is completed.
pick 311fccfb8 Ensure that a dry-run Ursula is stopped.
pick d4ea8a5e8 Safer stoppage.
merge -C 0336e4d6e Mege-commit-uniting-fjarri-sampling-work-and-the-rest-of-the-async-branch-of-TI-Done-in-order-to-provide-a-surface-for-blocking-when-sampling-See-https-ptb-discordapp-com-channels-411401661714792449-411401661714792451-744248303528575037- # Mege commit uniting @fjarri sampling work and the rest of the async branch of TI. Done in order to provide a surface for blocking when sampling. See https://ptb.discordapp.com/channels/411401661714792449/411401661714792451/744248303528575037.
pick 56ddc0c83 Outcommenting debugging utils.
pick cd0d88a73 Finnegan's now blocking until enactment is complete (which is essentially zero anyway). This stops the threadpool.
pick 64d6e1ec1 Moving demo Ursula DBs to APP_DIRS.
pick afb6bb0b9 Commenting out pytest-specific bits in Policy.
pick 69c655a61 Ensuring that threadpool is stopped after blocking is complete, even if reactor isn't running.
pick 58c8f07dc Heartbeat also using block_until_complete().
pick 589dacb0d One wonders if War and Peace would have been as highly acclaimed as it was, had it been published under its original title 'War, What Is It Good For.'
pick 34a5ad910 Removing stale debugging tooling.
pick d7b8254b3 Since this doens't block, it's possible that Bob hasn't actually connected to *any* nodes yet.
pick beb3301d9 Removing extraneous code per RFCs.
pick c75519637 More descriptive name to suit @derekpierre's fancies.
pick a178e4483 Use Pathlib for example Ursula launch.
# pick aaa2d817f8bcaa9cbf7fa295abc412929a791308 Force-pushing #2177 to Treasure Island. See conversation there.
pick 2b9a34d39 We no longer get threadpools in this fashion.
pick d93c8f7f0 This makes more sense outside the loop.
pick 2a901559d We remove these elsewhere now.
# Rebase f8c562ac5..2a901559d onto a178e4483 (444 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment