Commit Graph

3434 Commits (b2a38762eb3a6d499c30f50800dceb121b5608ff)

Author SHA1 Message Date
Bogdan Opanchuk af404677c7 Make a separately versioned EncryptedKeyFrag instead of using a MessageKit 2021-11-01 13:31:11 -07:00
Bogdan Opanchuk 238a2cfd2a Remove `hrac` from `EncryptedTreasureMap` 2021-10-29 15:06:34 -07:00
Bogdan Opanchuk 4bb6c82014 Stop bundling `publisher_verifying_key` with `EncryptedTreasureMap`
Instead:
- Add it as a parameter to `retrieve_cfrags()`
- Add it to `ReencryptionRequest`
- Remove `EncryptedTreasureMap._public_signature` and `hrac`
2021-10-29 15:06:34 -07:00
Bogdan Opanchuk cdbe0fb546 Fix _decrypt_kfrag() argument name
Kfrags are encrypted by the publisher, not by the kfrag author (Alice)
2021-10-29 15:06:34 -07:00
Bogdan Opanchuk bb14e4eef0 Do not catch UnbondedWorker in `verify_node()` and let it propagate 2021-10-29 15:06:34 -07:00
Bogdan Opanchuk e1c0335cdc Sign the whole node metadata instead of just the interface 2021-10-29 15:06:34 -07:00
Kieran R. Prasch 320eaa7de9 Reference issue #2813 2021-10-29 14:37:37 -07:00
Kieran R. Prasch 25425d55e5 Skip stale federated retrieval test. 2021-10-29 07:56:24 -07:00
Kieran R. Prasch 47d99a9f62 Respond to RFCs in PR #2808 2021-10-29 07:56:24 -07:00
Kieran Prasch 9d996ab965 Remove 'arrangement' language and naming (leaves onchain models). 2021-10-29 07:56:20 -07:00
Kieran Prasch a37e741fc8 Removes integration tests for treasure map storage. 2021-10-29 07:56:20 -07:00
Kieran Prasch 3b3ca65f9f Removes 'handpicked ursula' language. 2021-10-29 07:56:20 -07:00
Kieran Prasch 00a6a67b9a Deprecation of Arrangement datastore. 2021-10-29 07:56:20 -07:00
Kieran Prasch cf667f6522 Refactor Policy without Arrangements. 2021-10-29 07:56:20 -07:00
Kieran Prasch 6c249ab295 Split up 'ping' server endpoints. 2021-10-29 07:56:20 -07:00
Bogdan Opanchuk 130308fbf8 Use a mapping for `assigned_kfrags` in `TreasureMap.construct_by_publisher()` 2021-10-15 15:35:35 -07:00
Bogdan Opanchuk 12f601c949 Add `Ursula._decrypt_kfrag()` and dissolve `decrypt_internal()` 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk ca2ae89ba6 Get rid of passing a Callable to EncryptedTreasureMap.decrypt() 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk ffa72226f6 Remove the remainders of the separate Learning Loop versioning
All versioning is contained in the protocol objects now
2021-10-15 15:19:19 -07:00
Bogdan Opanchuk ef0e619684 Bundle policy encrypting key with TreasureMap 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 5fa56877ab Add MetadataRequest and MetadataResponse to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk e5e598952a Extract NodeMetadata into the core 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 98c78efbca Move RevocationOrder to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 01c2e9bd71 Move RetrievalKit to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 256c93db58 Move [Encrypted]TreasureMap to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 3400af3f09 Move AuthorizedKeyFrag to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk f847f9982c Move HRAC to core.py 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk a3410cadfb Move MessageKit to the temporary core module 2021-10-15 15:19:19 -07:00
Bogdan Opanchuk 18454c721e Use a single InvalidSignature exception instead of three different ones 2021-10-15 15:19:19 -07:00
Derek Pierre a161480277
Merge pull request #2807 from derekpierre/porter-nginx
Porter: Nginx, CORS support
2021-10-14 11:14:43 -04:00
derekpierre 949f3f8884 Fix failing test. 2021-10-13 14:44:48 -04:00
derekpierre 21212653f9 Allow more flexibility for CORS origins to be specified. CLI takes a comma-separated list, that can include regexes, and Porter with NGINX can configure conditionals for allowing origins. 2021-10-13 13:13:52 -04:00
derekpierre 9853509716 Make CORS allow origins opt-in by default (instead of opt-out and having '*' as the default).
Ensure that empty string for --allow-origins equates to cors not enabled.
Add tests for CORS CLI option.
2021-10-08 11:32:47 -04:00
Bogdan Opanchuk c0c2208826 Extend brands to 4 bytes 2021-09-30 12:13:46 -07:00
Kieran Prasch 894728600e Versioning test touch ups. 2021-09-27 14:32:33 -07:00
Kieran Prasch 582f6182cf Refine and test minor version resolver. 2021-09-27 14:11:33 -07:00
Kieran Prasch 62ab949306 Loosen versioning enforcement to support future minor version backwards compatibility. Respond to RFCs in PR #2767. 2021-09-27 13:51:46 -07:00
Kieran Prasch ba6a49e13c Implements enforced major.minor versioning scheme for serializable entities. 2021-09-24 15:29:20 -07:00
Kieran Prasch 5296ae334d Enforce unique branding. Additional unit testing. 2021-09-23 16:01:25 -07:00
Kieran Prasch f311d4efd3 Implement versioning for Arrangement. 2021-09-23 16:01:25 -07:00
Kieran Prasch 68df8897a5 Basic unit tests for Versioned implementations. 2021-09-23 16:01:25 -07:00
KPrasch 44b62da35a Update tests/integration/characters/test_specifications.py
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2021-09-23 16:01:25 -07:00
Kieran Prasch c90eaa76a1 Renames Revocation to RevocationOrder. 2021-09-23 16:01:25 -07:00
Kieran Prasch c6b2ace28b Correct renamed umbral signature kwarg. 2021-09-23 16:01:25 -07:00
Kieran Prasch f136696430 Implement versioning for message and policy kits. 2021-09-23 16:01:25 -07:00
Kieran Prasch 48cd97292e Implement versioning for treasure maps. 2021-09-23 16:01:25 -07:00
KPrasch 5582a9fd79
Merge pull request #2768 from derekpierre/porter-retrieval
Update Porter endpoint for retrieval
2021-09-19 14:31:47 -07:00
derekpierre a653751d13 Document cleanup regarding retrieval results format, and improve testing for mutliple retrieval kits. 2021-09-17 11:12:48 -04:00
Bogdan Opanchuk defa0e7c75 Fix deprecation warnings 2021-09-15 13:12:21 -07:00
Bogdan Opanchuk 55ef631673 Updates for umbral 0.3 API 2021-09-15 13:12:21 -07:00
derekpierre adb8f17b99 Updated Bob's RetrieveAndDecrypt schema and associated CLI to accept a list of message kits since the respective Python API was modified to accept a list of message kits.
Cleaned up Bob's retrieve_and_decrypt CLI code to account for updated required options - there was code that was based on some options not being required
Adjusted associated tests.
2021-09-14 15:58:08 -04:00
derekpierre 90408c1768 Publisher verifying key is no longer an argument for RetrievalClient - remove usage from Porter. 2021-09-14 15:58:08 -04:00
derekpierre 7f20fbdc7b Try not to use Bob python api to decrypt results of retrieve_cfrags. 2021-09-14 15:58:08 -04:00
derekpierre b0267ee9f8 Remove unnecessary decryption of treasure map in porter retrieve_cfrags tests. 2021-09-14 15:58:08 -04:00
derekpierre eb48e82fc3 VerifiedCapsuleFrag cannot be deserialized, so rename marshmallow field to CapsuleFrag.
Improve retreive_cfrags test to ensure that the cfrags are valid and can successfully be used by Bob to decrypt the data.
2021-09-14 15:58:08 -04:00
derekpierre 3fd901ebf6 Update RetrievalKit field tests to be more robust; fix duplicate decryption of treasure map for tests. 2021-09-14 15:58:08 -04:00
derekpierre 27fe5daf7d Deserialization of MessageKit field now produces a MessageKit object instead of bytes.
Minor update to Porter docs for retrieval endpoint.
2021-09-14 15:58:08 -04:00
derekpierre dfa65a2976 Code cleanup after rebase over retrieval protocol work in #2730. 2021-09-14 15:58:08 -04:00
derekpierre 4568fc1f5a Ensure that /retrieve_cfrags can be executed using url query parameters. 2021-09-14 15:58:08 -04:00
derekpierre 001dd39ac2 Improve Porter retrieve_cfrags tests to ensure that capsules match in results. 2021-09-14 15:58:08 -04:00
derekpierre d2c3b7a1f9 Make Porter Web endpoints return error status codes instead of exceptions in tests. 2021-09-14 15:58:08 -04:00
derekpierre ff6b1bae98 Encrypted and Decrypted treasure map fields. 2021-09-14 15:58:08 -04:00
derekpierre 72de21fb08 Initial tests for BobRetrieveCFrags schema. 2021-09-14 15:58:08 -04:00
derekpierre 61c0978e52 Define initial schema for /retrieve_cfrags Porter endpoint - (untested at the moment) 2021-09-14 15:58:08 -04:00
derekpierre 2cd7698da7 Fix failing tests with respect to treasure map needed for bob's retrieve endpoint. 2021-09-14 15:58:08 -04:00
derekpierre ae1e7edf43 Add RetrievalKit field for marshalling/unmarshalling of request/response data that requires a RetrievalKit - intended to be part of Bob's retrieve schema in Porter. 2021-09-14 15:58:08 -04:00
derekpierre 602f2b6d05 Modify EncryptedTreasureMap field so that deserialize produces a TreasureMap object and not bytes. 2021-09-14 15:58:08 -04:00
derekpierre aa1006ca16 Modify Key field so that deserialize produces a PublicKey object and not bytes. 2021-09-14 15:58:08 -04:00
derekpierre 2fec681e66 Skip Porter exec_work_order tests; they'll be reworked for the new retrieve protocol. 2021-09-14 15:58:08 -04:00
Bogdan Opanchuk 1a10ddf7e7 Remove `EncryptedTreasureMap` datastore model 2021-09-08 08:55:49 -07:00
Bogdan Opanchuk bb31fac083 Remove the unused Bob.matching_nodes_among() and related machinery/tests 2021-09-08 08:23:46 -07:00
Bogdan Opanchuk 66175a04da Rename Bob.retrieve_cfrags()/retrieve() to avoid confusion with RetrievalClient.retrieve_cfrags() 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 39dcab3aa1 Ensure enough Ursulas are available before retrieval 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk a9cc13e825 Move retrieval machinery to network/retrieval and revocation to policy/revocation 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 1ad868bf41 Remove internal cfrag cache from Bob 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk da816586fa Remove "enrico" as a parameter to Bob.retrieve(); make "policy_encrypting_key" mandatory. 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 0f85435ac7 Require encrypted_treasure_map in retrieve() 2021-09-08 08:21:04 -07:00
Bogdan Opanchuk 1d3642d960 Retrieval rework 2021-09-08 08:21:03 -07:00
Bogdan Opanchuk a338ff1a69 Don't return the signature along with the MessageKit from MessageKit.author() 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 41ae6dbcca Move message kits to policy submodule 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 161bb8f06d Use __bytes__ instead of to_bytes() in MessageKit 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 3ef534b812 Rename PolicyMessageKit to MessageKit 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 0b697881a1 Move TLSHostingPower to powers.py
To avoid circular dependencies
2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 3b43eac717 Remove UmbralMessageKit alias 2021-09-07 11:58:55 -07:00
Bogdan Opanchuk 9d2d36cbf3 Remove an unused parameter from TreasureMap.construct_by_publisher() 2021-09-07 11:58:55 -07:00
derekpierre 731013aa92 Add special case for WorkerPoolExceptions in WebController to handle response message - ensure WorkerPoolExceptions provide access to relevant data. 2021-08-25 19:53:30 -04:00
derekpierre 8b748dea52 Allow WorkerPool failure tracebacks to accessed directly from the exceptions raised. If callers need more context they can use the get_tracebacks() function on the exception to obtain all execution failure tracebacks. 2021-08-25 19:53:27 -04:00
derekpierre aa8df5ea2a Fixed failing concurrency tests. 2021-08-25 19:52:11 -04:00
KPrasch 3200ef05fc
Merge pull request #2780 from KPrasch/unstorage
Deprecate treasure map publication and storage
2021-08-25 15:51:20 -07:00
Kieran R. Prasch a3f8df66fc RFCs for PR #2780 pt. II 2021-08-25 12:08:35 -07:00
Kieran R. Prasch 18c9f849b7 Respond to RFCs in PR #2780; Additional map publication removals. Middleware raises detailed 400-level exceptions. 2021-08-23 20:57:18 -07:00
Kieran R. Prasch 11566990bd Respond to RFCs in PR #2742 2021-08-23 07:53:10 -07:00
Kieran R. Prasch 8e4c7c1594 Renames secret_key -> key_material for CLI BYOK. 2021-08-23 07:51:19 -07:00
Kieran R. Prasch 0d5123f8d6 Allow importing of custom keystore entroy blob by ursula init CLI and Keystore API. 2021-08-22 15:51:15 -07:00
Kieran R. Prasch f64dca21bb Introduce --treasure-map CLI flag to the Bob CLI. 2021-08-22 10:12:52 -07:00
Kieran R. Prasch fce6c3c31e Newsfragment for PR #2780 2021-08-20 16:59:00 -07:00
Kieran R. Prasch 024bcb1c5f Finish deprecation of map storage from tests. 2021-08-20 16:58:58 -07:00
Bogdan Opanchuk 6164137610 Rename m -> threshold, num_kfrags -> shares 2021-08-20 19:26:56 -04:00
Bogdan Opanchuk c595850952 RFCs, part 2 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk caf32842b3 RFCs 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk ad2ad8e3c0 Make HRAC a class and use it as a policy ID 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 509b8c1bfc Split treasure maps into decrypted and encrypted 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 5b5cd4bd84 Use HRAC as treasure map ID at all times instead of just in the blockchain case 2021-08-19 17:06:45 -04:00
Bogdan Opanchuk 2be3d727d5 Rename TreasureMap field and datastore model to EncryptedTreasureMap 2021-08-19 17:06:45 -04:00
KPrasch ed67bbcd7b
Merge pull request #2777 from KPrasch/main
Relock Dependencies
2021-08-18 15:43:09 -07:00
KPrasch 79631124b5
Merge pull request #2771 from derekpierre/aug12-hotfix
Include changes and release notes from v5.3.1 hotfix in `main`
2021-08-17 15:47:32 -07:00
Kieran R. Prasch 1f7ee94489 Update eth_account Transaction API imports. 2021-08-17 15:34:44 -07:00
Bogdan Opanchuk 279a647be0 Move ENCRYPTED_KFRAG_PAYLOAD_LENGTH into AuthorizedKeyFrag 2021-08-13 14:46:56 -07:00
Bogdan Opanchuk 8c628da9ea Extract kfrag authorization into a class 2021-08-12 16:34:05 -07:00
Bogdan Opanchuk e5c0bb079e Fix the remainders of Alice/Publisher separation 2021-08-12 16:32:02 -07:00
Bogdan Opanchuk cc156b28e3 Move retrieve() argument deserialization to `BobInterface` 2021-08-12 16:32:02 -07:00
derekpierre 9487979fae Remove problematic gas feed for now, and make gas feeds more robust against errors.
Ensure median returns an int.
2021-08-12 13:08:30 -04:00
Piotr Roslaniec 6b687b527f Fix test 2021-08-06 18:11:28 +02:00
Piotr Roslaniec e357fe2f38 Pass Path as str to CLI in tests 2021-08-06 18:11:26 +02:00
Piotr Roslaniec 7aaa5b128f Apply PR suggestions 2021-08-06 18:10:45 +02:00
Piotr Roslaniec 695cc10950 Detect paths during deserialization 2021-08-06 18:10:45 +02:00
Piotr Roslaniec 09e90d17fa Remove remaining 'str' usage 2021-08-06 18:10:43 +02:00
Piotr Roslaniec 1a3a649f23 Address PR suggestions 2021-08-06 18:10:22 +02:00
Piotr Roslaniec f710c31e30 Remove empty files 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 113a6db0ac Fix tests after rebase 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 97c6b66052 Fix tests 2021-08-06 18:10:22 +02:00
Piotr Roslaniec cb8e092ef1 Use click instead of custom wrapper 2021-08-06 18:10:22 +02:00
Piotr Roslaniec a8975ff41d Fix tests 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 662bc34439 Use Path methods instead of os module 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 9f87a5d1f5 Fix pathlib usage 2021-08-06 18:10:22 +02:00
Piotr Roslaniec 6a270c1713 Use pathlib 2021-08-06 18:10:20 +02:00
derekpierre eabe6ce325 Respond to RFCs from #2664. 2021-07-26 15:14:43 -04:00
derekpierre def9ef1116 Ensure that url query parameters in tests are url encoded. Added note about url encoding in docs.
Add unit test for Base64BytesRepresentation field.
Cleanup imports.
2021-07-26 15:14:43 -04:00
derekpierre 463078ce0d Fix issues after TMapConKFrag rebase including how work orders are created and used for tests. exec_work_order tests now actually use /reencrypt ursulas endpoints. 2021-07-26 15:14:43 -04:00
derekpierre 1baa05ba3f Initial implementation of Porter '/exec_work_order' functionality and tests.
Some code refactoring.
2021-07-26 15:14:43 -04:00
derekpierre c9c72a29ab Remove unnecessarly CLI commands for Porter. Some schema cleanup to group ursula schemas together. 2021-07-26 15:14:43 -04:00
derekpierre 25f3db3355 Use query parameters for GET methods; updated tests for stringlist and query parameters. 2021-07-26 15:14:43 -04:00
damon 0dfada8056 StringList field for flexible handling of GET/POST data close #2735 2021-07-26 15:14:43 -04:00
derekpierre da0231673c Fix lingering references to relayer_verifying_key to instead be publisher_verifying_key. 2021-07-26 15:14:43 -04:00
derekpierre d9cbee9469 Cleanup tests that use the random treasure map data to instead use a common fixture. 2021-07-26 15:14:43 -04:00
derekpierre d31f5938ca Fix imports and function calls after rebasing over latest changes (TMapConKFrags and umbral_adapter).
Fix incompatible treasure map data used in tests.
2021-07-26 15:14:43 -04:00
derekpierre e8f0e20400 Add Basic Authentication tests. 2021-07-26 15:14:43 -04:00
derekpierre 0720f7ca51 Modify --certificate-filepath option to instead be --tls-certificate-filepath. 2021-07-26 15:14:42 -04:00
derekpierre 8babb11e96 Add acceptance cli tests for porter. 2021-07-26 15:14:42 -04:00
derekpierre e83128fd91 One potential solution for contextualizing federated vs non-federated treasure maps provided as bytes in the `/publish_treasure_map` endpoint.
The context information is provided either at construction time of the TreasureMap field, or via the parent Schema context.
2021-07-26 15:14:42 -04:00
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 8de665a955 Initial unit tests for fields. 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
Bogdan Opanchuk c13b8213ec Add a more informative message to WorkerPool.OutOfValues/TimedOut 2021-07-12 16:24:35 -07: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
Bogdan Opanchuk 96749aa9cd POLICY_ID_LENGTH has been moved 2021-07-03 18:51:08 -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
jMyles 39d322909d Standardizing message signatures sizes in logic as a constant. 2021-07-03 18:46:50 -07:00
jMyles b341a139ea Changing gas augmentation - this is nearly meaningless since we'll brush it up before ever doing another WorkLock anyway. 2021-07-03 18:46:50 -07:00
jMyles 7c4cd47844 Partial restoration of the work to remove IndisputableEvidence and related concepts; it had been added back as part of a rebase to create a linear history. 2021-07-03 18:46:50 -07:00
jMyles b1ff1077cd Seems like we want to revoke the same policy that's made in this test here. 2021-07-03 18:46:50 -07:00
jMyles 993a4265c7 Needs to be 65 bytes, not 64. 2021-07-03 18:46:50 -07:00
jMyles 4c9c3d23d4 Now using both versioning and branding for maps. 2021-07-03 18:46:37 -07:00
Kieran Prasch de17e60839 TMap authorship alternate constuctor 2021-07-03 18:46:37 -07:00
Kieran Prasch 94217c43d3 tests passing 2021-07-03 18:46:37 -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 b60749d40e Nuanced handling of payment verification; Use HRAC as the authoritative method of verifying payment, deprecates usage of txhash completely. 2021-07-03 18:42:40 -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
David Núñez 9837dde869 Include encrypted KFrag in WorkOrder serialization 2021-07-03 17:50:43 -07:00
David Núñez 0f8ff08ec9 Let's keep the arrangement IDs in the TreasureMap for the moment
Careful, don't scare the unit tests...
2021-07-03 17:50:43 -07:00
David Núñez cdb825bdbc Bob includes the encrypted KFrag in the WorkOrder, which we previously used in Ursula's side to get the Kfrag from the re-encryption request 2021-07-03 17:50:43 -07:00
David Núñez 7a090c19f3 Instead of storing arrangement IDs in the TMap, stored encrypted KFrags 2021-07-03 17:48:44 -07:00
David Núñez 02608af55a How come we didn't have a basic unit test for TreasureMaps? 2021-07-03 17:47:34 -07:00
David Núñez 11052a6124 DecentralizedTreasureMaps were renamed SignedTreasureMaps a while ago 2021-07-03 17:47:32 -07:00
Kieran R. Prasch 669dd79dd7 Use KDF from umbral for keystore power derivations. 2021-07-02 20:00:06 -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 Prasch b92d04ab00 Notify and interactively confirm mnemonic generation. 2021-06-28 14:33:31 -07:00
Kieran R. Prasch efee48aaba Post-rebase cleanup; Remove stale exception. 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 Prasch 82e81fc710 Deterministic power derivation from keystore. Iterating on keystore drafting. 2021-06-28 14:33:31 -07:00
Kieran R. Prasch 11a630066e Further deprecation of nucypher.crypto.api. 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
Kieran R. Prasch d024018c3c Adapts keyring unit tests for deterministic nucypher 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
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