Commit Graph

466 Commits (a0bbfa0f59ee67dd6db80f8d764171519912fb65)

Author SHA1 Message Date
Piotr Roslaniec a32a691395 Properly format NU 2021-04-23 09:24:44 +02:00
Piotr Roslaniec 1cd3dd5f8d Fix missing key 2021-04-23 09:00:14 +02:00
Piotr Roslaniec 3a57704bf1 Revert accidental code change 2021-04-22 16:48:40 +02:00
Piotr Roslaniec 06930cbfba Moves "stake collect-reward" to "stake rewards withdraw" command 2021-04-22 16:26:21 +02:00
Piotr Roslaniec 621b6c7a84 Fix number formatting 2021-04-22 16:08:47 +02:00
Piotr Roslaniec 9669280639 Test fallback behaviour 2021-04-22 12:36:37 +02:00
Piotr Roslaniec 1303076a76 Refactor and fix style 2021-04-22 09:38:53 +02:00
Piotr Roslaniec 603c403ef9 Add richer rewards output 2021-04-21 12:23:30 +02:00
Piotr Roslaniec 0c30b5fe86 Print historical rewards 2021-04-21 12:23:28 +02:00
Piotr Roslaniec dcfa50ea0e Test rewards CLI 2021-04-21 12:23:12 +02:00
derekpierre 571407084a Improve UX for character CLI when there are multiple configuration files - prompt if > 1, or use singular configuration if only one available.
Fix failing tests.
2021-04-15 08:24:41 -04:00
derekpierre 5415d55b39 Fixed issue where ursula configuration files with signing key suffix were not being listed/used as valid configuration files.
Fix failing tests.
2021-04-15 08:24:41 -04:00
KPrasch 5d03fb7d76
Merge pull request #2625 from KPrasch/cli
Fixes intermittently failing CLI test on CI
2021-04-14 08:18:18 -07:00
KPrasch 74c986e53b
Merge branch 'main' into dao-proposal-1 2021-04-14 08:16:40 -07:00
Kieran Prasch 1ba789ca20 Mature all known nodes in node storage test assertions. 2021-04-14 08:09:50 -07:00
derekpierre 34e7d269b6 Fixed calculation of periods for Alice CLI grant.
Fix test due to modification of output when sub-stake is INACTIVE.
2021-03-31 11:14:35 -07:00
derekpierre 1bb9290c34 Fix CLI/UX issues related to change of period length. 2021-03-31 11:14:35 -07:00
vzotova fc2ff03e35 Fix economics calculation and tests 2021-03-22 11:37:27 -07:00
Kieran Prasch ed032de9e8 Translating economic parameters to handle 7 day periods. 2021-03-22 11:37:27 -07:00
vzotova 5ba91aef2c StakingEscrow: renames formerSecondsPerPeriod/formerHoursPerPeriod -> genesisSecondsPerPeriod/genesisHoursPerPeriod 2021-03-22 11:37:27 -07:00
vzotova fe5c362961 Test for deployers during migration 2021-03-22 11:37:27 -07:00
vzotova b0a605ab25 Draft of period extension 2021-03-22 11:37:27 -07:00
Kieran Prasch 8f041bda04 Allow replacement of rewards collection transactions. 2021-03-04 14:02:45 -08:00
Kieran Prasch 381ded5f8a Second round of improvements for handling invalid passwords. 2021-03-04 13:58:01 -08:00
Kieran Prasch fd005b3ff7 Relocates CharacterConfiguration to nucypher.config.base 2021-02-26 13:38:37 -08:00
Kieran Prasch ba464989ba Actors accept a transacting power or an address but not both + Cleanup. 2021-02-26 13:38:37 -08:00
Kieran Prasch 7e07bd267e Handle injected transacting power in tests. 2021-02-26 13:38:37 -08:00
Kieran Prasch b91359f3ba Bulk deprecation of Preallocation tooling. 2021-02-26 13:25:17 -08:00
Kieran Prasch 2ac8d276aa Respond to RFCs for PR #2536; Holdover for future work; Post rebase cleanup. 2021-02-18 18:35:56 -08:00
derekpierre 305bf0a7fb Added unit and integration tests for keyring. 2021-02-18 18:08:40 -08:00
derekpierre 6f25d57971 Better organize serialization/deserialization functions.
Use loopback address functions.
Respond to RFCs for #2536.
2021-02-18 18:08:40 -08:00
Kieran Prasch 6574836699 Additional cleanup and commentary 2021-02-18 18:07:43 -08:00
Kieran Prasch 37774897bc Understand Ursula.run as the coordinated single point of service startup. 2021-02-18 18:06:31 -08:00
Kieran Prasch 212abcc145 Handle power derivation from keyring, or ad-hoc usage of TLSHostingPower. 2021-02-18 18:06:31 -08:00
Bogdan Opanchuk 37929b36a8 Implement changes from the review 2021-02-16 22:45:55 -08:00
Bogdan Opanchuk 4de9b91d2a Refactor FleetSensor 2021-02-16 22:45:55 -08:00
Kieran Prasch 4c0f679c7e Removes client_password from character init where possible, require signer to init a TransactingPower, removing default web3 signer. 2021-02-13 18:35:31 -08:00
Kieran Prasch 289078191d Ensure that client password is optional in character's init. 2021-02-13 18:35:31 -08:00
Kieran Prasch d4616416e7 Disables probationary period checking in tests. 2021-02-07 09:08:26 -08:00
Kieran Prasch dc0932ab79 Temporary test skip for regarding issue #2552; Cleanup Imports. 2021-02-07 08:42:10 -08:00
vzotova 7c77aa65d0 Remove locking restake flag, throw error when node tries to commit twice in a row 2021-02-02 19:24:28 +03:00
damon c e907a598a2
Merge pull request #2462 from KPrasch/automagic
IP address checks on worker startup
2021-01-14 20:47:32 -08:00
Bogdan Opanchuk bbc4390f68 Generalize NodeEngagementMutex 2021-01-14 11:19:35 -08:00
Bogdan Opanchuk a2b99daa1d Merge proposals and enactment into a single method, return EnactedPolicy 2021-01-14 11:19:35 -08:00
Bogdan Opanchuk de0f933118 Make Arrangement stateless and get rid of BlockchainArrangement 2021-01-14 11:19:35 -08:00
Kieran Prasch f35f2fcef3 Accmodate rest_host as a required Ursula init parameter for live nodes in test. 2021-01-12 13:10:15 -08:00
Bogdan Opanchuk 2e0efe451e Use in-memory mock LMDB environment for most tests 2021-01-02 17:19:13 -08:00
Bogdan Opanchuk 61253968fc Simplify the reencryption loop 2020-12-18 15:19:43 -08:00
Bogdan Opanchuk 08c7f83548 Remove an unnecessary alternative of passing a treasure map via map_id
Every time it happens the actual map object is also available.
2020-12-15 14:04:32 -08:00
Bogdan Opanchuk 60c0f4412f Turn `construct_hrac_and_map_id()` into `construct_map_id()` (hrac is not used anywhere) 2020-12-15 13:36:20 -08:00
Kieran R. Prasch 912e2b1c46
Revert signed treasure map changes for federated policies. 2020-12-09 00:13:38 -08:00
K Prasch af1c11b0d4
Merge pull request #2460 from KPrasch/probation
Complete grant CLI policy interactons and probationary period enforcement
2020-12-08 14:08:53 -08:00
Kieran Prasch fcdfdda58b Test demonstrating AccessDenied on invalid or incorrect keystore signer password 2020-12-08 10:56:42 -08:00
Kieran R. Prasch acdcf8c16e Resolves TODO regarding none value as software signer password; Raise AccessDenied. 2020-12-08 10:41:27 -08:00
Kieran Prasch 2cecfb3cfd Rewords keyring decryption console messages. 2020-12-08 10:40:42 -08:00
David Núñez 6d112dbeec Use decimal token values in CLI tests for `nucypher stake` commands 2020-11-30 16:13:16 +01:00
David Núñez 35af6a3a07 When mocking the StakingEscrowAgent, handle the special case of commit_to_next_period, which returns a txhash due to the fire_and_forget option
Also, improves type hints related to the special case of commitment TXs, that result in txhashes instead of receipts.
2020-11-06 12:32:51 +01:00
David Núñez 3b70b06a8a Support for user-provided gas price via a fixed-price gas strategy 2020-11-06 12:19:34 +01:00
jMyles ef29bec8e7 Neatening formatting, also pursuant to RFC. 2020-11-04 14:04:32 -07:00
jMyles 9e009805fd Ursulas and NodeSprouts now share a common API, with domain as str. 2020-11-03 18:13:15 -07:00
jMyles d1313581ef Even when including nodes as seednode metadata, the domain is checked before remembering the resulting Sprout. 2020-11-03 18:13:15 -07:00
jMyles 0aa33c3f1e Can't just plunk federated_ursulas into known_nodes anymore if they aren't on the same domain. 2020-11-03 18:13:15 -07:00
jMyles 8bfa31b11b Test showing that the cross-domain pollution via POST is no longer possible. 2020-11-03 18:13:15 -07:00
jMyles 6cb3feae86 Making this test way better now that domains are tightened up> 2020-11-03 18:13:15 -07:00
jMyles c4786f551a No longer are there 'serving' domains and 'learning' domains. Everybody just has a domain. 2020-11-03 18:13:15 -07:00
jMyles c9118d1f02 FleetSensor is now domain-aware. 2020-11-03 18:13:08 -07:00
Kieran Prasch ba8cae96eb Respond to RFCs in PR #2389 2020-10-19 15:56:14 -07:00
David Núñez 7e644b0770 Be sure we're using the MockBlockchain in integration tests 2020-10-19 21:57:45 +02:00
David Núñez 145ebdf8ef When sending TXs, allow to specify if we want to use a pending nonce or not 2020-10-19 18:59:28 +02:00
derekpierre 4ed221e880 Add unit test for allowing minimum stake when equals available balance. 2020-10-16 16:37:29 -04:00
K Prasch 9707ac4b8b
Merge pull request #2347 from fjarri/nicer-status-page
Nickname refactoring & changing nickname symbols to more common ones
2020-10-13 12:09:20 -07:00
tuxxy 38d0fccefd Truncate hracs to 16 bytes 2020-10-13 10:01:37 +02:00
tuxxy 622b4ed1ba Fix test_mass_treasure_map_placement (thanks @jmyles) 2020-10-13 10:01:37 +02:00
tuxxy c965f72c2e Fix DoS vector on nodes through map storage 2020-10-13 10:01:37 +02:00
tuxxy 86c2744dae Add test_bob_retrieves_treasure_map_from_decentralized_node 2020-10-13 10:01:37 +02:00
tuxxy 5962cd4c05 Prune expired treasure maps in __prune_datastore (formerly __prune_arrangements) 2020-10-13 10:01:37 +02:00
tuxxy 828a630c0e Remove treasure_map_id param from receive_treasure_map API endpoint
Fix up logic and add tests. Additionally, skip test_mass_treasure_map_placement
2020-10-13 10:01:37 +02:00
tuxxy 4b128d871e The NodeEngagementMutex should expect a 201 not a 202. 2020-10-13 10:01:37 +02:00
tuxxy f87e088dec Implement TreasureMap storage in the Datastore 2020-10-13 10:01:37 +02:00
tuxxy 46e1fdd4c1 Create a TreasureMap datastore record and move model tests to test_datastore_models
Move test_datastore_models to unit tests
2020-10-13 10:01:37 +02:00
Bogdan Opanchuk 725eae1738 Pass nicknames around as a class instead of unstructured data 2020-10-12 16:11:01 -07:00
derekpierre c04ef09d24 Use --from-unlocked to indicate the use of uncollected staking rewards and unlocked sub-stakes to fund stake. 2020-10-09 11:26:31 -04:00
derekpierre 388dd3734a Allow --use-rewards flag to specify when only uncollected staking rewards should be used for creating/increasing a stake.
If value is provided then user not prompted, but if it isn't and --use-rewrads is specified, user is prompted to confirm.
2020-10-08 13:57:13 -04:00
jMyles 28c8f87684 Test showing that #1735 was apparently untrue. Fixes #1735. 2020-09-29 10:23:39 +02:00
David Núñez df06e3e1ee Pending change to single-domain from the Trezor PR 2020-09-25 11:53:08 +02:00
David Núñez f96e82d95e Utility test to obtain versioned Ursulas' metadata hexstrings 2020-09-24 20:28:31 +02:00
David Núñez 3d6502468d Comment flaky assertion on test_discovery_phases. See #2016 2020-09-24 20:28:31 +02:00
David Núñez 279f07c9e4 Handle invalid metadata bytes in node storage. Unit tests. 2020-09-24 20:28:31 +02:00
David Núñez d4ac7ce351 Failing test showing that currently we learn about nodes from a different domain
Demonstrates #1843
2020-09-24 20:28:31 +02:00
David Núñez f42de3ae11 Some janitorial stuff 2020-09-24 20:28:31 +02:00
David Núñez 064972e800 Some unit tests reorganization 2020-09-24 20:27:13 +02:00
David Núñez 14c6307645 Include test for hardcoded version 2 node metadata bytestrings 2020-09-24 20:27:13 +02:00
David Núñez 148ba39698 Adapt Learning Loop version 1 test due to new incompatibility with current version. 2020-09-24 20:27:13 +02:00
David Núñez 84a53a790f Allow to define a sort of "compatibility range" for LL versions: anything outside it's either from the future or the past 2020-09-24 20:27:13 +02:00
jMyles 8d18272d77 Some syntactic cleanup suggested by @michwill in comments on #1868. 2020-09-24 20:27:13 +02:00
David Núñez 4cf7dcadc3 We're done with multiple domains, for the moment.
Closes #2144. Closes #1580.
2020-09-24 20:27:13 +02:00
David Núñez 7e21280a12 Include test for hardcoded version 1 node bytestrings. See #1869 2020-09-24 20:27:13 +02:00
David Núñez 2d2a7a7cde Janitorial stuff 2020-09-24 20:27:13 +02:00
K Prasch 1f5407e7d5
Merge pull request #2220 from KPrasch/signer
Trezorlib Transaction Signing
2020-09-24 08:06:54 -07:00
Kieran Prasch c89fa91eef Adjust integration test for trezor signing testnet flag. 2020-09-23 15:37:25 -07:00
Kieran Prasch f526b72790 SLIP44 support and EIP-155 compliance for trezor testnet derivation paths 2020-09-22 21:19:24 -07:00
Bogdan Opanchuk 7be50030aa Remove the reduced LMDB size fixture
It is not the cause of the bug, and it doesn't really test anything.
2020-09-22 16:55:37 -07:00
Kieran R. Prasch 8f6def2851
Respond to RFCs - Returns filesystem integration tests to thier home. 2020-09-17 13:26:38 -07:00
Kieran Prasch 6a0e1eeb17
Accomodate basic trezor signer URI scheme; Fixturize mocked trezorlib components 2020-09-17 13:26:38 -07:00
Kieran Prasch 9677b25fb3
Consolodate web3 signer unit tests; Improvements to trezor method decoration. 2020-09-17 13:26:38 -07:00
Kieran Prasch 148528b24c
Signers is now a package 2020-09-17 13:26:33 -07:00
tuxxy 3ac32cd7ea Move the thread lock to a class variable 2020-09-15 12:56:33 +02:00
tuxxy 8cd9bccfef Respond to requests 2020-09-11 16:29:22 +02:00
tuxxy 423ed05a3a Add thread lock to MockLMDB 2020-09-11 14:42:19 +02:00
Kieran R. Prasch bee1f7f5f8
Adds missing newline to mainnet registry 2020-09-08 13:09:27 -07:00
jMyles 64d76046ca Unused blocks, formatting, spelling - responses to the latest batch of RFCs. 2020-09-06 22:37:37 -07:00
jMyles 8dead4d333 In the fixture we trust. 2020-09-05 18:13:01 -07:00
jMyles ce0684c037 Admist reports from others on the team of having to code these values up... coding these values up. 2020-08-31 14:39:54 -07:00
jMyles 3f07bb8b33 Use default value (5 percent) instead of overriding. 2020-08-31 14:28:47 -07:00
jMyles 670ac3b122 Better to just pass a tuple of nodes here; we don't need the living dict. 2020-08-31 13:48:48 -07:00
jMyles 4269150974 Using signal flag to check queue. Fixes #2190. 2020-08-31 12:41:44 -07:00
jMyles d1b2257797 This test actually performs better with random values - when every node takes the same amount of time to return, there's a much more likely chance of all of them returning at the same moment, and thus overshooting the mutex requirement for unblocking. 2020-08-31 10:10:43 -07:00
jMyles de266be0cf Resolving import conflicts with main. 2020-08-31 01:07:27 -07:00
David Núñez 7d5646e2f5 Fixing wrong provider URI in an ursula test 2020-08-28 18:00:19 +02:00
David Núñez 920ae58bc3 Setting a free gas strategy in tests that create a new blockchain interface 2020-08-28 18:00:19 +02:00
jMyles 24bc71be6e Give Bob a chance to hit seednodes before bailing. 2020-08-27 13:16:36 -07:00
jMyles e63d250597 We'll bring this assertion back later, with more precision. 2020-08-26 01:02:13 -07:00
jMyles 255a4cb67c Reworking test to assure that assertions are evaluated. While we're at it, also use verified open ports for the other tests. 2020-08-25 22:49:47 -07:00
Kieran R. Prasch 19f438c277
Move the slowest unit test to integration tests since it hits the disk. 2020-08-25 07:09:59 -07:00
jMyles 6498992f61 Deduplicating test; moving json validation utils to utils. 2020-08-24 09:42:15 -07:00
jMyles 0de8e25132 Merge commit from main (and merge candidate into main.) 2020-08-21 20:32:45 -07:00
jMyles c75519637a More descriptive name to suit @derekpierre's fancies. 2020-08-20 17:50:53 -07:00
vzotova bfa2da251f Apply suggestions from code review #2170
Co-authored-by: K Prasch <kieranprasch@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-08-20 00:49:20 +03:00
vzotova 434b7c677b `nucypher stake list`: show sub-stake status, rename `--all` option to `--show-all` 2020-08-20 00:46:04 +03:00
vzotova bb6cee4613 Removed NO_WORKER_BONDED constant from `Staker.worker_address`, used NULL_ADDRESS instead 2020-08-20 00:46:03 +03:00
Bogdan Opanchuk 6ad9a65d1a Fix pytest discovery error - make the names of test files different 2020-08-18 22:28:56 -07:00
jMyles d7b8254b36 Since this doens't block, it's possible that Bob hasn't actually connected to *any* nodes yet. 2020-08-18 12:05:58 -07:00
jMyles 34a5ad910d Removing stale debugging tooling. 2020-08-18 12:05:55 -07:00
jMyles 0336e4d6e9 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. 2020-08-18 05:14:05 -07:00
jMyles c74bdcb6f8 Prints -=> logs. 2020-08-18 05:10:44 -07:00
jMyles 2a76f5fe2a Making sure tests block in the right places. 2020-08-18 05:10:44 -07:00
jMyles 8077685df6 Use the completion queue instead of yielding. 2020-08-18 05:10:44 -07:00
jMyles b18dfd9a69 Evolving test. 2020-08-18 05:10:44 -07:00
Kieran Prasch e594ff5e8c Test fixes: another manual tpower activation and attempt to fix tmap reference. 2020-08-18 05:10:43 -07:00
Kieran Prasch 73d1022c94 bifurcate 'network actors' tests. 2020-08-18 05:10:43 -07:00
Victoria 21cf902764 Apply suggestions from code review #2158
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: K Prasch <kieranprasch@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-08-12 22:51:30 +03:00
jMyles 65b3666d67 Couple of fixes on top to get things to run - most notably, 10M lmdb map size (obviously this needs a legit patch or whatever). 2020-08-10 16:38:40 -07:00
vzotova ada6824739 Command to merge stakes in agent, actor and CLI 2020-08-10 23:22:13 +03:00
vzotova 0d39b8a7b0 Flag to create and increase sub-stakes without deposit (using unlocked tokens) 2020-08-10 23:21:19 +03:00
jMyles a4679e6b86 Reversion of 296617131, yanking autouse from fixtures. See https://ptb.discordapp.com/channels/411401661714792449/411401661714792451/739866441154822234. 2020-08-10 13:02:11 -07:00
jMyles a6a873482f Merging #2128, #2137, #2155 into a rebase over main (instead of three separate github-generated merge commits, which caused a conflict). 2020-08-10 13:01:47 -07:00
jMyles fdb726095a Some more debug-level logs instead of prints. 2020-08-10 12:55:29 -07:00
jMyles cf196f2c72 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. 2020-08-10 12:55:29 -07:00
jMyles 663b7de3c8 Lots of Character stoppages; these continually running loops went unnoticed before. 2020-08-10 12:55:27 -07:00
jMyles e0918764d8 Big fixup for the remaining errors blocking integration.learning. 2020-08-10 12:54:35 -07:00
jMyles a448903bbb This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request. 2020-08-10 12:54:05 -07:00
jMyles 3fa81deb00 Loading seednodes here is enough. 2020-08-10 12:54:05 -07:00
jMyles eaf7fbca37 Some debugging breadcrumbs for Ursula. 2020-08-10 12:54:04 -07:00
jMyles 8cd182e26d Stopping Bob and Ursula at appropriate times. 2020-08-10 12:53:33 -07:00
jMyles 78eb904c10 Flagging test bob's origins for inspection on other threads. 2020-08-10 12:53:33 -07:00
jMyles 266eea23ca Yanking some autouses in favor of usefixtures. [skip ci] 2020-08-10 12:53:03 -07:00
Kieran R. Prasch 041622c40d Allow worker to attempt period commitment as part of it's initialization. 2020-08-10 12:52:31 -07:00
jMyles 16bc34754d 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. 2020-08-10 12:52:31 -07:00
jMyles 9437009ffd Add a measure of maturation time; if this increases dramatically, that will represent a breakage. 2020-08-10 12:52:31 -07:00
jMyles a0db5ffb15 Moving federated tests into their own module to keep the cache cleaner. 2020-08-10 12:52:30 -07:00
jMyles d6d9fb4b62 This test needs to look for the checksum_address specifically, since this will be a stranger node or sprout now. 2020-08-10 12:51:49 -07:00
jMyles ea092fd4d3 Using lonely_ursula_maker in all the right places. 2020-08-10 12:51:49 -07:00
jMyles 0b318c2866 Clarify each fleet state (because one of them is the result of the seednode loading). 2020-08-10 12:51:11 -07:00
jMyles eebf26e334 This test is no longer relevant; the seednode tests cover this logic equally well. 2020-08-10 12:51:11 -07:00
jMyles cc7e96f671 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. 2020-08-10 12:51:11 -07:00
jMyles 392d51f711 This is a more acute test with a nonstandard domain, as it assures that the actual seednode logic is used. 2020-08-10 12:51:11 -07:00
jMyles 0a52a8edb7 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. 2020-08-10 12:51:11 -07:00
jMyles 2c4c7a0b15 We no longer need to lower the parameter here; this test can pass in time with all 5000. 2020-08-10 12:51:10 -07:00
jMyles 21ed54097c We need to fetch the actual Ursula from the cache to get the bytestring; this will be a sprout nowadays. 2020-08-10 12:49:53 -07:00
jMyles 9f117ebc6a A Character created from blank config will try to connect to seednodes without lonely. 2020-08-10 12:49:26 -07:00
jMyles a3a21ff49e The number of known nodes might be a bit variable at this point; we're really concerned that he has only connected to 2. 2020-08-10 12:49:26 -07:00
jMyles 1101dd3bde The first node in the fixture might not always be among the matching nodes. 2020-08-10 12:49:26 -07:00
jMyles 76649704ae Clarifying failure message; this makes it easier to understand why this test occasionally fails. 2020-08-10 12:49:26 -07:00
jMyles b199830947 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. 2020-08-10 12:49:25 -07:00
jMyles babcd9174e No need to reset checksum_address in Worker - let's try to set it in as few places as possible. #1547. 2020-08-10 12:49:23 -07:00
jMyles 14165eb4db Instead of the first Ursula, choose the first Ursula who is supposed to have the map. 2020-08-10 12:48:31 -07:00
jMyles 295518033e Refining both test and threadpooling. Looking pretty good now. 2020-08-10 12:45:22 -07:00
jMyles 230bcdc26d Honing in on the most important concurrent test assertions. This passes, but we can do even better. 2020-08-10 12:45:22 -07:00
jMyles c1cc0395e5 This zany test actually passes - now to get that 30 second limit down. 2020-08-10 12:45:22 -07:00
jMyles 05b589121b It's slow, but it's a start. This test passes in about 9 seconds right now; subsequent commits will tune it. 2020-08-10 12:45:22 -07:00
jMyles 60b9ad9c2b Test using the sluggish middleware; this is the one that will require the concurrency from the last commit. 2020-08-10 12:45:21 -07:00
jMyles 106b60f3f7 Mocking one layer out (setting policy) for these tests. 2020-08-10 12:42:15 -07:00
jMyles 3e9cf80386 Splitting test logic to show when the problem is with Bob or with Alice. 2020-08-10 12:39:59 -07:00
tuxxy d033c0b318 Respond to review changes 2020-08-10 15:38:59 +02:00
tuxxy c6d229c2bf Fix typo in comment (thanks @fjarri) 2020-08-10 15:38:59 +02:00
tuxxy 530dc3439a Respond to change requests 2020-08-10 15:38:59 +02:00
tuxxy 71f8b914e0 Instead of mocking a LMDB env, we just manage them appropriately 2020-08-10 15:38:59 +02:00
tuxxy b1817cc9f2 Remove Ursula.work_orders and replace its use with queries to the datastore 2020-08-10 15:38:13 +02:00
tuxxy 52038e36dc Create a MockLMDBEnv w/ fixture and fix up some tests
Patch the PolicyArrangement model to fix discovery phase tests
2020-08-10 15:38:12 +02:00
tuxxy 846625d917 Replace as much old datastore logic as possible 2020-08-10 15:37:30 +02:00
tuxxy 17920cd4ca Add 'DatastoreRecord.delete' method w/ tests
Remove the unused '_fields' instance var on DatastoreRecord
2020-08-10 15:37:30 +02:00
tuxxy 662fddbeb7 Add basic skeleton for 'Datastore.query_by' method with tests
Ensure that queries only iterate over keys and not values

Query will now only process keys for unique records
2020-08-10 15:37:30 +02:00
tuxxy cc0ca2ef91 Add a basic first implementation of the datastore with tests
Add tests for the datastore models, and change 'NotFound' to 'RecordNotFound'
2020-08-10 15:37:30 +02:00
tuxxy 184b3bf563 Create a base 'DatastoreRecord' class and models with tests
Move the base models to base.py and add more datastore tests
Change key structure to 'RecordType:RecordField:RecordID'
Eliminate the db module
2020-08-10 15:37:30 +02:00
Victoria 43718a49d5 Apply suggestions from code review #2142
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-07-30 23:50:14 +03:00
vzotova f2acc2adda New command in CLI to increase value of specified sub-stake 2020-07-30 22:45:58 +03:00
vzotova 883f5350e4 Makes `Stake` validation stateless, new methods in `StakingEscrowAgent`, methods for increasing stake in `Staker` 2020-07-30 22:45:58 +03:00
jMyles 39f0dc4d6b Some more debug-level logs instead of prints. 2020-07-26 19:20:47 -07:00
jMyles 029da78b04 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. 2020-07-26 17:59:16 -07:00
jMyles 50ddae77a1 Lots of Character stoppages; these continually running loops went unnoticed before. 2020-07-26 17:58:39 -07:00
jMyles d18b2e0834 Big fixup for the remaining errors blocking integration.learning. 2020-07-24 19:29:38 -07:00
jMyles ad05f4a09a This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request. 2020-07-22 16:18:29 -07:00
jMyles 9c577a5b96 Loading seednodes here is enough. 2020-07-22 16:17:49 -07:00
jMyles d06deba742 Some debugging breadcrumbs for Ursula. 2020-07-22 16:16:30 -07:00
jMyles 1534bc07a9 Stopping Bob and Ursula at appropriate times. 2020-07-22 15:55:31 -07:00
jMyles 4a616d143d Flagging test bob's origins for inspection on other threads. 2020-07-22 15:55:31 -07:00
jMyles 78abb8f6ed Yanking some autouses in favor of usefixtures. [skip ci] 2020-07-18 13:09:08 -07:00
Kieran R. Prasch 85806613f1 Allow worker to attempt period commitment as part of it's initialization. 2020-07-17 12:30:11 -07:00
David Núñez f5bee795d8
Merge pull request #2121 from mswilkison/worklock-terminology
Update WorkLock terminology
2020-07-15 17:46:44 +02:00
Victoria e717b6d030 Apply suggestions from code review #2117
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: K Prasch <kieran@nucypher.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-07-14 12:04:35 +03:00
jMyles 679022c42a 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. 2020-07-09 22:26:10 -07:00
jMyles fe908a1e83 Add a measure of maturation time; if this increases dramatically, that will represent a breakage. 2020-07-09 22:25:23 -07:00
vzotova 073cbf345e Refactor sub-stake status and selecting sub-stake 2020-07-09 16:33:25 +03:00
David Núñez 10ef0a1d62 Rename WorkLock commands and options 2020-07-08 17:13:05 +02:00
vzotova 8f598f0df6 More integration tests for stake selection 2020-07-07 17:21:06 +03:00
vzotova 796f297e93 Refactor `StakeHolder.assimilate()`, now `StakeHolder` instances from configuration and from interactive mode are the same 2020-07-07 17:19:02 +03:00
vzotova 2d0be22dec Apply suggestions from code review #2097
Co-authored-by: MacLane S Wilkison <maclane@nucypher.com>
Co-authored-by: David Núñez <david@nucypher.com>
Co-authored-by: K Prasch <kieran@nucypher.com>
2020-06-27 19:36:51 +03:00
jMyles 8c6cdf5145 Moving federated tests into their own module to keep the cache cleaner. 2020-06-25 23:18:14 -07:00
jMyles 31856340ad This test needs to look for the checksum_address specifically, since this will be a stranger node or sprout now. 2020-06-25 19:29:27 -07:00
jMyles d1025e9d15 Using lonely_ursula_maker in all the right places. 2020-06-25 19:29:03 -07:00
jMyles 179bd4ae37 Clarify each fleet state (because one of them is the result of the seednode loading). 2020-06-25 15:19:47 -07:00
jMyles 086ff1c3bb This test is no longer relevant; the seednode tests cover this logic equally well. 2020-06-25 15:19:11 -07:00
vzotova 6c68fba65c Small docs update for collecting reward
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2020-06-25 20:57:21 +03:00
vzotova 0e46140e8f Added `mint` command to CLI, added some warnings in `collecting-reward` command 2020-06-25 20:13:42 +03:00
vzotova 9897c0f93c Fix agent mocking: use instance to hold mocked method instead of class 2020-06-25 20:08:27 +03:00
jMyles 169fffd41e 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. 2020-06-24 19:27:52 -07:00
jMyles 81a4c623b3 This is a more acute test with a nonstandard domain, as it assures that the actual seednode logic is used. 2020-06-24 19:27:08 -07:00
jMyles dbf910696a 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. 2020-06-24 19:26:42 -07:00
jMyles 3a2191248a We no longer need to lower the parameter here; this test can pass in time with all 5000. 2020-06-24 14:38:44 -07:00
jMyles 1d75ced045 We need to fetch the actual Ursula from the cache to get the bytestring; this will be a sprout nowadays. 2020-06-23 16:00:35 -07:00
jMyles 935ac06d2c A Character created from blank config will try to connect to seednodes without lonely. 2020-06-23 16:00:05 -07:00
jMyles 33f71f6e52 The number of known nodes might be a bit variable at this point; we're really concerned that he has only connected to 2. 2020-06-23 15:59:39 -07:00
jMyles 263aa1fab5 The first node in the fixture might not always be among the matching nodes. 2020-06-22 20:31:34 -07:00
jMyles 1b5917d728 Clarifying failure message; this makes it easier to understand why this test occasionally fails. 2020-06-22 20:31:34 -07:00
jMyles 97de268bd3 Merging the revised tests with the shim commit 31f001f2e. 2020-06-22 20:31:33 -07:00
jMyles 1170c27b63 The connectivity problem will now manfiest itself as NotEnoughNodes, as Bob won't have learned in time to try to get the map. 2020-06-22 18:30:21 -07:00
jMyles 62b7ccd9bb Fixing locations and formats. 2020-06-22 18:30:21 -07:00
jMyles 9045c3d7c1 Refining both test and threadpooling. Looking pretty good now. 2020-06-22 18:30:20 -07:00
jMyles a36c82cfed Honing in on the most important concurrent test assertions. This passes, but we can do even better. 2020-06-22 18:30:20 -07:00
jMyles f21bc0cb72 This zany test actually passes - now to get that 30 second limit down. 2020-06-22 18:30:20 -07:00
jMyles d301da3dae It's slow, but it's a start. This test passes in about 9 seconds right now; subsequent commits will tune it. 2020-06-22 18:30:20 -07:00
jMyles fb523765b8 Test using the sluggish middleware; this is the one that will require the concurrency from the last commit. 2020-06-22 18:30:20 -07:00
jMyles 7deab1242d Mocking one layer out (setting policy) for these tests. 2020-06-22 18:30:20 -07:00
jMyles 1a6e3b09ed Splitting test logic to show when the problem is with Bob or with Alice. 2020-06-22 18:30:20 -07:00
Kieran Prasch 5909c37dd1 Apply API and interface updates to for enrico file handling. 2020-06-18 08:55:21 -07:00
damon 6d79d8db7b test fixes resulting from change in keys 2020-06-17 11:31:48 -07:00
damon 9d65b242e8 message -> plaintext 2020-06-17 00:08:48 -07:00
derekpierre 89911a87ab Code cleanup. Fix typo in test 2020-06-09 08:50:18 -04:00
David Núñez 993b70d19a Address RFCs to #2059 2020-06-01 16:45:09 +02:00
David Núñez 968a5979ed Make test refund interactive to increase coverage. Fix a bug along the way! 2020-06-01 04:16:42 +02:00