Commit Graph

367 Commits (39dcab3aa137b31abfa2a85728cd223d7449cdd8)

Author SHA1 Message Date
derekpierre 2403c27370 Code cleanup based on RFCs from #2717. 2021-07-26 15:14:42 -04:00
derekpierre 39e5217d63 Use uri instead of ip_address for UrsulaInfo. 2021-07-26 15:14:42 -04:00
derekpierre 5b2984fd74 Improve treasuremap validation for rest api, and some code cleanup.
Added rpc and web control tests for porter.
2021-07-26 15:14:42 -04:00
derekpierre 34fbc058d6 Make duration_period for get_ursulas optional on the Learner object for federated mode (not changed for rest api). 2021-07-26 15:14:42 -04:00
derekpierre dbeec7f1ae Add integration and acceptance tests for porter functionality.
Remove unused 'publish_treasure_map' parameter from _enact() function.
Loosen validation on treasure map id which can be 32 bytes (federated) or 16 bytes (non-federated). Probably only care about non-federated but for ease of testing, federated really helps.
2021-07-26 15:14:42 -04:00
derekpierre 778c018593 Initial implementation of Alice.get_ursulas for Porter. 2021-07-26 15:14:42 -04:00
derekpierre 01a62eac36 Add tests for Porter Schema definitions. 2021-07-26 15:14:42 -04:00
derekpierre 589ddff4de Initial refactoring of "character control"; abstract what is now "character control" into a general "base control" from which "character control" can sub-class. 2021-07-26 15:14:42 -04:00
Kieran R. Prasch 6192c34c3d Renames relayer -> publisher. 2021-07-06 14:43:35 -07:00
Kieran R. Prasch 8f8b79aa08 Responding to RFCs in PR #2687. 2021-07-06 14:43:31 -07:00
Kieran R. Prasch 3367ac5a50 Post-rebase cleanup for PR #2701 2021-07-03 19:05:24 -07:00
Kieran Prasch c915a1b1d3 Use umbral adapter everywhere. Fixes straggler uses of umbral 0.1.x 2021-07-03 18:51:07 -07:00
Kieran Prasch 81ca745bfa Fixes incorrect splitter in map versioning and grant test assertion. 2021-07-03 18:48:54 -07:00
Bogdan Opanchuk 7642300fe0 Rebase fixes for rebased-chili-limes (#28)
* Fix PRETask serialization

* Use a constant for encrypted kfrag length

* Fix argument order in Signature.verify()

* Remove a too brittle check in test_bob_handles_frags

What exactly are we ensuring here? If we want to check that the cfrag is fine,
we need to use it for decryption.

* Remove an unnecessary check

The result of `reencrypt()` is verified by default.

* Re-raise Umbral decryption errors as DecryptionFailed

* Fix an argument of _filter_work_orders_and_capsules()

* Fix an assertion in test_federated_grant_and_revoke

Assertion fails because now UmbralMessageKit has __len__,
so a bool() call is equivalent to len() == 0
(which it is, since there are no cfrags attached).
2021-07-03 18:48:26 -07:00
Kieran Prasch 4e7ea984f0 Post-rebase integration with PR #2612 and Umbral 0.2.x 2021-07-03 18:48:24 -07:00
Kieran Prasch e13fae0526 Combating freefriders and evil Bobs with a KFrag writ authorization. 2021-07-03 18:46:36 -07:00
Kieran Prasch a22b403a08 Partial tets update for modified map and order handling; Continue handling of publisher/authorizer keys. 2021-07-03 18:40:10 -07:00
Kieran Prasch 2b299cf993 Sing-along with david - use HRAC for workorders. 2021-07-03 17:50:43 -07:00
David Núñez fed1b4aba8 Let's go for the moment with TMaps with KFrags and Arrangement IDs 2021-07-03 17:50:43 -07:00
Kieran R. Prasch 7ed52647f3 Use crypto.passwords module for handling password key derivations. 2021-06-30 16:49:31 -07:00
Kieran Prasch 8a54bd7e6d Post rebase cleanup for PR #2612; Umbral 0.2.x compatibility. 2021-06-30 15:14:10 -07:00
Kieran Prasch 3253ab9694 Index node metadata by stamp instead of checksum address. Further decouples wallet address from node identity. 2021-06-28 14:33:31 -07:00
Kieran Prasch 53db75c246 Contruct TLS certificate filenames with the interface port to avoid duplicate/invalid. 2021-06-28 14:33:31 -07:00
Kieran Prasch 0d3780466b Respond to RFCs in PR #2701 2021-06-28 14:33:31 -07:00
Kieran R. Prasch f0080b3e2e Minimally restore attachment of keystore 2021-06-28 14:33:31 -07:00
Kieran R. Prasch 4f7bdf5c46 tests respect the Keystore API 2021-06-28 14:33:31 -07:00
Kieran R. Prasch e3868df4d1 Handle TLS power derivation form keystore. 2021-06-28 14:33:31 -07:00
Kieran R. Prasch 6aef077172 bulk renaming of Keyring -> Keystore 2021-06-28 14:33:31 -07:00
Bogdan Opanchuk 2fe7c85af4 Flatten stacked context managers 2021-06-25 11:43:06 -07:00
Bogdan Opanchuk 0379a5fb37 Remove an unneeded mock 2021-06-25 11:43:06 -07:00
Bogdan Opanchuk 0c05699908 Fix highperf tests for the new Umbral
Minimal changes, for starters.
2021-06-25 11:43:06 -07:00
KPrasch 1a997cf129
Merge pull request #2612 from fjarri/new-umbral
Updates for the new Umbral API
2021-06-23 12:01:32 -07:00
Bogdan Opanchuk cd11909d4e Adjust for a slightly stricter API of Rust Umbral 2021-06-22 18:31:10 -07:00
Bogdan Opanchuk 6090a755b0 Gate the choice of Umbral implementation in a single file 2021-06-22 18:31:08 -07:00
derekpierre 2299df1a2b Added disclaimer with workaround for 'nucypher stake merge' operation. 2021-06-22 15:22:42 -04:00
derekpierre 04e7b05199 Add CLI disclaimer to 'nucypher stake increase' CLI operation outlining known bug leading to reduced rewards for one period. 2021-06-22 11:41:53 -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
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
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
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
David Núñez 6279827657 Remove stale references to PreallocationEscrow contract stuff 2021-04-30 10:23:13 +02: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
Kieran R. Prasch 5575c2c135 Improve keyring creation prompts and warnings 2021-04-28 12:07:27 -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
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