Commit Graph

3084 Commits (e7ab67448ffee47742b721ff3b5f2a867575282c)

Author SHA1 Message Date
derekpierre 54e9b18a9e Rename duplicate test name. 2021-06-22 11:31:49 -04:00
derekpierre 4acbc59e3b Skip stake increase tests that are expected to fail - see #2691. 2021-06-22 11:31:49 -04:00
derekpierre 1500a29682 Added test for theory that creating a sub-stake and then merging 2 period later should resolve issues with rewards. 2021-06-22 11:32:03 -04:00
derekpierre 4efcc503ee Add test to show that same problem occurs when increasing stake via creating a sub-stake and then merging.
Refactor code so that same function can be used for testing increase via direct increase of sub-stake and increase via merging of two sub-stakes.
2021-06-22 11:31:49 -04:00
derekpierre fab50fad04 Test showing first period after increase has incorrect reward amount. 2021-06-22 11:31:49 -04:00
Bogdan Opanchuk 15333ddca2 Dissolve umbral_adapter 2021-06-17 14:38:51 -07:00
Bogdan Opanchuk e6fcdbbff6 Minimal fixes to make CI pass, using an adapter for Umbral 2021-06-17 14:38:51 -07:00
Bogdan Opanchuk aceb20a3c0 Update for coincurve>=15 2021-06-17 14:33:56 -07:00
Bogdan Opanchuk 2bec0a2b60 A fix for CI failure due to updated py-evm, taken from #2719 2021-06-17 14:33:56 -07:00
derekpierre e61cec703a Fix stray prometheus imports/tests that should only be performed when prometheus_client is installed; prometheus is an optional dependency. 2021-05-21 14:27:33 -04:00
David Núñez 520a648c96
Merge pull request #2699 from fjarri/adjudicator-delenda-est
Remove IndisputableEvidence and related machinery
2021-05-20 15:33:38 +02:00
KPrasch 0b49f6a437
Merge pull request #2689 from piotr-roslaniec/fix-test
Fix an acceptance test not being run
2021-05-18 13:46:14 -07:00
Bogdan Opanchuk b52036bab2 Move get_signature_recovery_value() to the test where it is used 2021-05-18 13:14:04 -07:00
Bogdan Opanchuk 26076b1d98 Remove IndisputableEvidence and related functions and tests 2021-05-18 13:14:04 -07:00
David Núñez ee2b6ed459 Resurface failing test that was shadowed and fix it. 2021-05-17 10:20:50 +02:00
David Núñez ae4f63aa24 Introduce boost display in CLI tests. Improve tests a bit
Test actual sub-stake display logic instead of duplicating that code in tests
2021-05-17 10:20:50 +02:00
Piotr Roslaniec 85252edf13 Properly skip test 2021-05-14 09:22:06 +02:00
Piotr Roslaniec dc7f067bb0 Skip a long-running test 2021-05-12 21:33:34 +02:00
Piotr Roslaniec 9c8ac9ab45 Fix test 2021-05-12 14:40:30 +02:00
Piotr Roslaniec c65b96b7a6 Rename test file 2021-05-12 08:37:34 +02:00
KPrasch 751c05cff5
Merge pull request #2673 from piotr-roslaniec/check-allowance#2636
Check allowance value before transactions
2021-05-07 14:17:08 -07:00
David Núñez db4ee7c0df
Merge pull request #2662 from KPrasch/prompter
Improve keyring creation prompts and warnings
2021-05-07 11:58:12 +02:00
KPrasch 7e9cbcaac8
Merge pull request #2680 from piotr-roslaniec/events-timestamp#2652
Add timestamp column to csv output
2021-05-07 00:50:02 -07:00
David Núñez 9b83852a4e
Merge pull request #2616 from cygnusv/dao-cli
Logic that deployed Proposal #1 to NuCypher DAO
2021-05-06 11:54:19 +02:00
Piotr Roslaniec 3ef02699df Fix bad contract method 2021-05-03 09:26:34 +02:00
Piotr Roslaniec 3bd14cad19 Update allowance validation 2021-05-03 09:26:34 +02:00
Piotr Roslaniec 1a91011693 Update allowance validation 2021-05-03 09:26:34 +02:00
Piotr Roslaniec feafbc219a Check allowance before increasing it 2021-05-03 09:26:34 +02:00
Piotr Roslaniec b6c1a31b5e Fix cli test 2021-04-30 21:57:52 +02:00
David Núñez 6279827657 Remove stale references to PreallocationEscrow contract stuff 2021-04-30 10:23:13 +02:00
derekpierre d0c876acbd Make expiration date of grant test relative to on chain time. 2021-04-29 15:21:14 -04:00
piotr-roslaniec 66ad917b28
Merge pull request #2657 from piotr-roslaniec/teacher-fallback#2481
Fallback chain of teacher nodes
2021-04-29 10:17:19 +02:00
David Núñez 4466ea068d
Merge pull request #2634 from piotr-roslaniec/rewards-cmd#2509
Improve Rewards command
2021-04-28 22:03:44 +02:00
Kieran R. Prasch 5575c2c135 Improve keyring creation prompts and warnings 2021-04-28 12:07:27 -07:00
Piotr Roslaniec c98fbc43cd Implicitly remove whitespaces from character nicknames 2021-04-28 11:31:59 +02:00
vzotova a5430621d6 Tests for multiple policies creation 2021-04-28 12:24:10 +07:00
vzotova 787fe2ffc7 PolicyManager: multiple policies in one tx 2021-04-28 12:24:10 +07:00
Piotr Roslaniec ee9f6708c8 Calculate date from blocktime 2021-04-27 13:58:54 +02:00
Piotr Roslaniec eee2264ca1 Rename flags 2021-04-23 15:53:51 +02:00
Piotr Roslaniec a8f1e55cd8 Set token reward decimal place 2021-04-23 10:34:55 +02:00
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
KPrasch d00512f62c
Merge pull request #2650 from KPrasch/policy
Improve policy expiration validation
2021-04-22 11:42:51 -07: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 58f37da94a Move TEACHER_NODES to nodes.py 2021-04-21 18:04:51 +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
KPrasch 70f525dec3
Merge pull request #2632 from piotr-roslaniec/refactor-queries#2153
Refactor queries into a separate file
2021-04-16 12:44:51 -07:00
Kieran Prasch 7c33d6f1ba Expand protecion for policy creation with expiration in the past. 2021-04-16 11:42:15 -07:00
vzotova 73dfe7ea4c Fix upgradeability test 2021-04-16 20:21:58 +03: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
Piotr Roslaniec c640345ea4 Fix queries failing silently 2021-04-15 08:05:11 +02:00
Piotr Roslaniec 269c7c2fc2 Refactor queries into a separate file 2021-04-15 08:05:11 +02:00
Kieran Prasch 7b41ea00fd Temporary skip for contract upgradeability test 2021-04-14 14:31:24 -07: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
KPrasch b548db3b31
Merge pull request #2609 from KPrasch/manual-migration
Manual migration CLI command
2021-04-14 07:35:34 -07:00
Kieran Prasch 712adb0be0 Verbose failure output for failing CI test, shorted poliy duration in lifecycle test to accmodate end of probationary period. 2021-04-13 16:57:57 -07:00
KPrasch fed186975b
Merge pull request #2628 from piotr-roslaniec/nickname-delim#2471
Change nickname delimiter in card filename
2021-04-08 13:29:57 -07:00
KPrasch 05ab5d38d4
Merge pull request #2629 from piotr-roslaniec/loopback-addr#2538
Use constant for loopback address
2021-04-08 13:18:26 -07:00
Piotr Roslaniec ec757bf4a9 Use constant for loopback address 2021-04-08 13:33:34 +02:00
Piotr Roslaniec 8edd343ab8 Test qr code output 2021-04-08 11:57:02 +02:00
Piotr Roslaniec f43ad5d055 Change nickname delineation 2021-04-08 11:56:39 +02:00
vzotova 62576f12e7 Apply RFCs from #2596
Co-authored-by: David Núñez <david@nucypher.com>
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2021-04-07 17:20:54 +03:00
vzotova 7dfe82fb6e Change lifecycle for pool: new rules for deposit() and withdrawAll() 2021-04-07 17:20:54 +03:00
vzotova 7d47d3bc76 Refinements for pool staking contract 2021-04-07 17:20:53 +03: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 4af5ae8169 Fix bug with merged sub-stake and migration (when last period is 1) 2021-03-30 22:37:01 +03:00
vzotova 3136a97aa6 Fix other tests 2021-03-22 11:37:27 -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 9284e5e63f Fix after rebasing 2021-03-22 11:37:27 -07:00
vzotova ec7d44b4bd Apply suggestions from code review #2549
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
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 452b75ed45 Gas estimates of migration 2021-03-22 11:37:27 -07:00
vzotova fe5c362961 Test for deployers during migration 2021-03-22 11:37:27 -07:00
vzotova dc889f9092 Intercontract migration test 2021-03-22 11:37:27 -07:00
vzotova ff627e89ec Migration test for StakingEscrow 2021-03-22 11:37:27 -07:00
vzotova 4d6df51a98 Migration test for PolicyManager 2021-03-22 11:37:27 -07:00
vzotova dc09d98c58 Fix StakingEscrow and PolicyManager initialization step 2021-03-22 11:37:27 -07:00
vzotova e7e7895433 Migration test for Issuer 2021-03-22 11:37:27 -07:00
vzotova 727a27689a PolicyManager: ignore old policies after migration 2021-03-22 11:37:27 -07:00
vzotova 98b63da822 Separated parameter for former hours per period in BaseEconomics 2021-03-22 11:37:27 -07:00
vzotova b0a605ab25 Draft of period extension 2021-03-22 11:37:27 -07:00
vzotova c5816b7e95 Fix small unreachable bug in PolicyManager 2021-03-22 11:37:27 -07:00
KPrasch 4828dbabd8
Merge pull request #2595 from vzotova/fix-statistics-test
Fix sampling distribution test
2021-03-17 12:57:01 -07:00
vzotova 1e22c4287d Fix sampling distribution test 2021-03-15 16:49:52 +03:00
Kieran Prasch 116e89074b Deprecates worker IP address as enviorment variable. 2021-03-10 12:00:44 -08:00
derekpierre 120320a049 Additional testing of event metrics collectors, and extra sanity check for all collectors. 2021-03-08 19:31:13 -05:00
derekpierre f148c08127 Initial tests for prometheus collectors. 2021-03-08 19:31:13 -05:00
Kieran Prasch 84240b4f07 remove_unused -> remove_inactive 2021-03-05 09:56:23 -08: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
Bogdan Opanchuk 03bab50289 Minor RFC 2021-03-02 18:20:48 -08:00
Bogdan Opanchuk c0a303a783 Help nucypher-monitor get the info it needs 2021-03-02 18:20:48 -08:00
Kieran Prasch 06d89fef07 ContractAdministrator is a BaseActor subclass. Respond to RFCs in PR #2572 2021-03-02 10:24:41 -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 dcd8c9b12f Handle CLI-launched character unocking pre-init. 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 acfa1cad71 Do not return agents from agency fixture 2021-02-26 13:25:17 -08:00
Kieran Prasch b91359f3ba Bulk deprecation of Preallocation tooling. 2021-02-26 13:25:17 -08:00
derekpierre 397e872b1d Add some tests. 2021-02-26 13:07:26 -05: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 cbe03d9dc1 Add unit tests for (de)serialization if keys from/to files. 2021-02-18 18:08:40 -08:00
derekpierre bcfbf3e683 Fix failing unit tests. 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 a4885c8fed Advance tests along with API changes and code touch ups 2021-02-18 18:07:43 -08:00
Kieran Prasch 0b164b6df7 Test adjustments and code touch ups 2021-02-18 18:07:43 -08:00
derekpierre ab30f1f497 Improve serialization/deserialization logic of private keys. 2021-02-18 18:07:43 -08:00
Kieran Prasch 6574836699 Additional cleanup and commentary 2021-02-18 18:07:43 -08:00
Kieran Prasch c6e402a12a Handle Vladimir stamp substantiation and missing asserts in test. 2021-02-18 18:07:41 -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
KPrasch 7c6094f951
Merge pull request #2557 from fjarri/self-destruct-worker-pool
Stop the threadpool when all the worker results are processed
2021-02-15 11:47:47 -08:00
Kieran Prasch 9c649c6915 Ensures that banners are only logged when is_me is True for Alice, Bob, and Enrico. 2021-02-13 18:39:20 -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
Bogdan Opanchuk 09c476e2da Propagate the actual exception from the producer thread instead of serializing it into string 2021-02-09 16:01:58 -08:00
Bogdan Opanchuk 7b4ab2a412 Stop the threadpool when all the worker results are processed 2021-02-07 15:11:03 -08:00
Kieran Prasch d30b162208 Better support for CLI JSON responses and pretty printing. 2021-02-07 09:43:19 -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
K Prasch 0e29a6ab67
Merge pull request #2544 from vzotova/pool
Modification of WorkLockPoolingContract (without worklock part)
2021-02-05 14:36:39 -08:00
Victoria 36e47153df Apply suggestions from code review #2518
Co-authored-by: K Prasch <kieranprasch@gmail.com>
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2021-02-02 19:24:29 +03: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
vzotova 61d8dc1ec0 New deployment order: StakingEscrow dispatcher, then PolicyManager+Dispatcher -> Adjudicator+Dispatcher -> WorkLock and only after this StakingEscrow itself 2021-02-02 19:24:28 +03:00
vzotova 9815440464 New order of contracts deployment, StakingEscrow uses other addresses of main contracts in constructor 2021-02-02 19:24:28 +03:00
vzotova 19a2315fbe Combine setters for linked contracts in StakingEscrow 2021-02-02 19:24:27 +03:00
vzotova 546e84a653 Remove test mode from StakingEscrow 2021-02-02 19:24:27 +03:00
vzotova b384911e5d Remove batch deposits 2021-02-02 19:24:27 +03:00
vzotova 08e2098dc2 Solidity 0.7.5 -> 0.7.6 2021-02-02 19:24:27 +03:00
vzotova 436ae0f134 New modification of WorkLockPoolingContract - without worklock part 2021-01-30 16:27:38 +03:00
K Prasch f0c068eef3
Merge pull request #2534 from derekpierre/one-liner
Fixed blocking call waiting for number of known nodes which could infinite loop
2021-01-21 14:29:32 -08:00
K Prasch 6b2a9ecdbb
Merge pull request #2533 from cygnusv/fast-unit
Fixes to unit tests. Fix for #2484
2021-01-21 10:26:58 -08:00
derekpierre 9a886fa031 Fix invalid import for grant availability script. 2021-01-20 14:54:16 -05:00
David Núñez 0b2eb927be We were incorrectly using net_version to identify the EthereumClient chain in certain places
Fixes #2484
2021-01-20 13:05:23 +01:00
David Núñez d7e45d2959 Unskip cards unit tests 2021-01-20 12:36:27 +01:00
David Núñez d02f0ead7f Disable solidity compilation for MockBlockchain 2021-01-20 12:36:10 +01:00