Commit Graph

3313 Commits (2948a198c077ba506c443814f4a33b85763b833e)

Author SHA1 Message Date
Kieran R. Prasch c3827779b1 Rollback to solc v0.8.7 for platform compatibility 2022-02-08 11:01:23 -08:00
vzotova 3aa2e9b576 Methods to access Threshold token staking contract from StakingInterface 2022-02-08 11:01:23 -08:00
vzotova 9fb51c6f29 Tests for new methods in StakingEscrow 2022-02-08 11:01:23 -08:00
vzotova 02de9e7563 Adjust tests for contracts 2022-02-08 11:01:23 -08:00
vzotova 5ced61f337 Solidity 0.7.x -> 0.8.x, integration StakingEscrow with Threshold Network, updated OpenZeppelin library 2022-02-08 11:01:23 -08:00
vzotova 4dda3141ed Apply suggestions from code review #2831
Co-authored-by: David Núñez <david@nucypher.com>
2022-02-08 11:01:23 -08:00
vzotova c454c0cc5e `totalStakedForAt` and `totalStakedAt` return 0 except when upgrading, removes snapshots flag 2022-02-08 11:01:23 -08:00
vzotova 01dd86bd79 Remove check for totalStakedForAt and totalStakedAt in StakingEscrow.verifyState 2022-02-08 11:01:23 -08:00
vzotova dccc76418a Some fixes for deployers and tests 2022-02-08 11:01:23 -08:00
vzotova ff2802c399 Fix upgradeability and tests 2022-02-08 11:01:23 -08:00
vzotova 001913c380 Adjust several contract tests 2022-02-08 11:01:23 -08:00
vzotova 08d56157ee Draft of StakingEscrow for stop inflation 2022-02-08 11:01:23 -08:00
Kieran Prasch 8052585d2a Removes Felix 2022-02-07 12:11:28 -08:00
KPrasch e8f174e6f0
Merge pull request #2828 from xela7/keystore-generate-mnemonic-id
Keystore.generate can return optional mnemonic words
2022-01-14 12:32:43 -08:00
Bogdan Opanchuk 01179c5df5 [temporary] Check to see how long do performance tests take now 2022-01-09 15:25:04 -08:00
Bogdan Opanchuk a276cfec25 Disband umbral_adapter 2022-01-08 15:29:22 -08:00
Bogdan Opanchuk 8cb8f16370 Clean up Python parts moved to Rust
And some unused imports
2022-01-08 15:29:22 -08:00
Bogdan Opanchuk e5620c3155 Changes to make the tests pass 2022-01-08 15:29:22 -08:00
Bogdan Opanchuk 02bb2e2f76 Import the standalone package instead of nucypher.core 2022-01-08 15:29:22 -08:00
Alex Tokar 2d1b37f9aa return tuple when interactive=False 2021-11-29 14:03:30 -08:00
Alex Tokar 55d009b667 fixing tests with argument change 2021-11-29 13:44:07 -08:00
xela7 deeba59c78
make test more strict
Co-authored-by: KPrasch <kieranprasch@gmail.com>
2021-11-29 13:39:24 -08:00
Alex Tokar 2415436229 Keystore.generate can return optional mnemonic words 2021-11-24 11:56:26 -08:00
Bogdan Opanchuk 181e6bd3f1 Scrap `suspicious_activities_witnessed` from Ursula
We're not doing anything with it (until #567 is implemented),
and it's clogging the memory over time.
2021-11-06 00:03:37 -07:00
Bogdan Opanchuk 944d3373e7 Normalize the usage of VariableLengthBytestrings
Allow for every Versioned type to be able to deserialize itself from the bytestring.
2021-11-01 13:31:31 -07:00
Bogdan Opanchuk 7197d853d7 Move `signer` to the first position in the parameter list in various core constructors 2021-11-01 13:31:12 -07:00
Bogdan Opanchuk fe02c30fc7 Making names uniform throughout the codebase: policy_key -> policy_encrypting_key
Also change recipient_key to policy_encrypting_key in MessageKit.author(),
now that MessageKit is only used for reencryptable messages.
2021-11-01 13:31:12 -07:00
Bogdan Opanchuk 70b2a1d57b Remove `alice_verifying_key` from `ReencryptionRequest` 2021-11-01 13:31:12 -07:00
Bogdan Opanchuk 004aa312f3 Remove signing from MessageKit
Now it's the user's responsibility
2021-11-01 13:31:12 -07:00
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