Commit Graph

3637 Commits (2b52ac133e29a3d846b9ae5f6404d1da5f9db271)

Author SHA1 Message Date
derekpierre 6fb61bacec Remove use of threshold decryption request when encrypting data - should not be returned when encrypting - it's use is for decrypting (variant and context).. 2023-07-09 10:41:02 -04:00
jMyles 8ae0cb08e7 Test showing both success and failure tooling. 2023-07-06 13:19:33 +02:00
jMyles 92f143c1be Test showing the 'always decrypts' variant. 2023-07-06 13:19:33 +02:00
jMyles b4fab45eb1 Simple test showing the 'always decrypts' tool. 2023-07-06 13:19:33 +02:00
jMyles 3bf02094a0 Adding classes for tools the Bobs who always decrypt and always fail. 2023-07-06 13:19:33 +02:00
Owen Campbell a4de8a882e
Make the use of string literal type hints compatible with PEP 484
Because:
- Not doing so causes F821 linting errors

https://peps.python.org/pep-0484/#forward-references
https://www.flake8rules.com/rules/F821.html
2023-06-27 12:41:53 +01:00
Kieran Prasch a6a265675d Caracters (config) are blockchainy 2023-06-26 20:42:51 +02:00
Kieran Prasch 7fc2112b45 apply black code formatting to lawful.py and conditions/conftest.py 2023-06-26 20:42:51 +02:00
Kieran Prasch 74c18f33d7 passing test suite with internal cache supporting multichain. 2023-06-26 20:42:51 +02:00
Kieran Prasch c895d24ba9 use TEST_ETH_PROVIDER_URI in favor of PYEVM_DEV_URI 2023-06-26 20:42:51 +02:00
Kieran Prasch 1dd541725f another step in the direction of formalized internal multichain routing 2023-06-26 20:42:51 +02:00
Kieran Prasch fdb28dd21e Improves multichain provider internal routing correctness. 2023-06-26 20:42:51 +02:00
Piotr Roslaniec ee1691e879 fix tests 2023-06-22 11:48:52 +02:00
Piotr Roslaniec 44d1e81b8f feat: remove dependency on DkgPublicParams 2023-06-21 14:56:17 +02:00
Kieran Prasch 10c0ccd603 removes 'nucypher bond' CLI command. 2023-06-16 11:37:00 +02:00
derekpierre b0dd6ac569 Additional testing clean up. 2023-06-15 08:54:31 -04:00
derekpierre 1268fe498d Skip test for now to get CI passing. 2023-06-15 08:54:31 -04:00
derekpierre 53955cb80b Use semver for lingo versioning. Ensure that major version changes are recognized as incompatible. 2023-06-15 08:54:31 -04:00
derekpierre d69b62d8b3 Initial musing about versioned condition lingo i.e. overall condition language; will add semver functionality later. 2023-06-15 08:54:31 -04:00
derekpierre 13db8d225e Fix comments based on feedback from #3145. 2023-06-14 19:38:30 -04:00
derekpierre c4b217e223 Ensure that the underlying marshmallow schema ValidationError is not propagated but gets reraised as InvalidConditionLingo. 2023-06-14 19:38:30 -04:00
derekpierre 45a420a9db Localize condition lingo handling/processing to one function - `evaluate_condition_lingo`. 2023-06-14 19:38:30 -04:00
derekpierre 4214a9b009 Add tests/fixes for compound conditions. 2023-06-14 19:38:30 -04:00
derekpierre 610f7436f0 Initial work that replaces infix notiation with prefix notation for logical conditions. 2023-06-14 19:38:30 -04:00
derekpierre 26aaf775e3 Change TimeCondition method name to "blocktime" from "timelock". 2023-06-08 11:03:48 -04:00
derekpierre 66f26c032c Change TimeCondition to use block time instead of Ursula system time.
Rename ReencryptionCondition to AccessControlCondition.
2023-06-08 11:03:22 -04:00
derekpierre a2884dfea1 Relock dependencies now that `nucypher-core` v0.9.0 has been released. 2023-06-07 09:35:58 -04:00
derekpierre c2edb1ceb1 Update code to use newly named Session key objects in `nucypher-core`.
Modify ape-config to use `nucypher-contracts:main` now that associated PR was merged.
2023-06-07 08:07:18 -04:00
derekpierre 7c79a76296 Update changes to include changing `RequestSecretKey.diffie_hellman()` to `RequestSecretKey.derive_shared_secret()`. 2023-06-07 08:07:18 -04:00
derekpierre d3bab657f3 Make updates based on latest Coordinator contract changes. 2023-06-07 08:07:18 -04:00
derekpierre 71604f251f Use new request keys in `nucypher-core` that use curve 25519 instead of Umbral for decryption request/response encryption.
E2EThresholdDecryptionRequest object is no longer needed as an intermediary since a DH shared secret key is created/used.
2023-06-07 08:07:18 -04:00
KPrasch bc54e11948
Merge pull request #3130 from KPrasch/development
Polygon ecosystem DKG coordination (Alpha 4)
2023-06-07 12:30:58 +02:00
Piotr Roslaniec 32cfe08481 fix tests and linter 2023-06-02 11:14:39 +02:00
derekpierre 10caec7406 More testing confirmation that algorithm is checking the expected blocks. 2023-06-01 14:04:32 -04:00
Piotr Roslaniec d8b51b6c07 replace ferveo package usage with nucypher core module export 2023-06-01 19:18:05 +02:00
derekpierre fa667785fe Fix failing test: test_ursula_operator. 2023-05-31 18:30:49 -04:00
derekpierre 5eeb7738d5 Fix failing test. 2023-05-31 16:04:58 -04:00
derekpierre be25a3d595 Remove constructor parameter redundancy from ActiveRitualTracker and add tests for first scan block functionality. 2023-05-31 14:18:03 -04:00
derekpierre 376e34073d Harden event scanner tests. 2023-05-25 11:25:04 -04:00
derekpierre bff763185f Remove EventScanner web3 retry functionality. 2023-05-24 20:45:45 -04:00
derekpierre c980046afb Fix issue with chunk size not being corrected for when it goes past the end block. 2023-05-24 17:00:44 -04:00
derekpierre b8b70220fa Additional event scanner tests. 2023-05-24 15:19:09 -04:00
Kieran Prasch 0c6e52c4ea hacking 2023-05-24 20:22:57 +02:00
derekpierre f57616cdd8 Cleanup of chain reorg code - push to underlying EventScanner. Add initial test for estimating chunk size. 2023-05-24 20:22:57 +02:00
Kieran Prasch 7f2abd101e Ritualist uses the same web3 instsance as the coordinator agent. 2023-05-24 20:22:57 +02:00
Kieran Prasch f0040c2e83 add polygon to POA default 2023-05-24 20:22:57 +02:00
Kieran Prasch 24d7f77e74 routing th correct registry to ritualists 2023-05-24 20:22:57 +02:00
Kieran Prasch 24908aa80c mock payment provider for Vladimir 2023-05-24 20:22:57 +02:00
derekpierre 871f09b203 Update dependencies now that required changes from other repos are merged/released. 2023-05-23 15:13:54 -04:00
derekpierre d989445ffc Accomodate latest changes to `nucypher-core`. 2023-05-23 14:59:42 -04:00
derekpierre b5aa20e602 Add tests for use of ThresholdRequestDecryptingPower. 2023-05-23 14:59:42 -04:00
derekpierre 303efa2185 Relock dependencies so that proper ape-solidity can be used and acceptance tests can run. 2023-05-23 14:59:42 -04:00
derekpierre b9f0f0838a Obtain request encrypting keys from Ritual object; don't convert object to bytes (transcript, agg transcript) before passing to Coordinator agent.
Update tests.
2023-05-23 14:59:42 -04:00
derekpierre 787d7d3e56 Update code to handle E2EE changes to Coordinator contract, and use ThresholdRequestDecryptingPower to perform E2EE decryption requests. 2023-05-23 14:59:42 -04:00
derekpierre bc8cb48c70 Add tests for BatchValueFactory, and fix issues. 2023-05-11 10:44:05 -04:00
derekpierre 3e498a3751 Some initial refactoring so that Bob and Porter can use the same code for making threshold decryption requests (akin to PRE retrieval). 2023-05-11 10:44:05 -04:00
derekpierre ae3f267fb6 Use ferveo 0.1.11 so that DkgPublicKey.serialized_size() can be used. Updated some typehints. 2023-05-08 09:14:30 -04:00
derekpierre de926000b4 Update code to handle DkgPublicKey now being 48 bytes. 2023-05-06 13:15:48 -04:00
derekpierre 048a8ea3fc Link to ferveo issue due to incorrect public key bytes length. 2023-05-05 14:41:15 -04:00
Kieran Prasch e18a3470a0 only test rituals with dkg size < 10 for now 2023-05-05 10:18:23 -07:00
Kieran Prasch b3090be689 support ferveo==0.1.9, bugfix: enables threshold decryption via simple variant. 2023-05-05 10:05:15 -07:00
Kieran Prasch d0a8f6065e attempt to enable both the simple/precomputer variants in tests. 2023-05-04 15:23:40 -07:00
derekpierre 149d16c0b3 Ensure that start block for DKG event scanning is never negative.
Stop RitualTracker when Ursula stops.
Cleanup test.
2023-05-04 17:35:53 -04:00
derekpierre 782f65691e Use FAKE_TRANSCRIPT constant for unit tests. 2023-05-04 17:35:52 -04:00
derekpierre 87d8b40a57 Update and move test_ritualist to unit tests.
Co-authored-by: KPrasch <kieran@nucypher.com>
2023-05-04 17:35:52 -04:00
derekpierre 20fadaa0d8 Cleanup of tests. 2023-05-04 17:35:52 -04:00
Kieran Prasch 6ffd1a8217 updates for ferveo==0.1.8 (really tho) 2023-05-04 17:35:49 -04:00
derekpierre 88046fc3bc Updated use of ferveo 0.1.8. Note: public key bytes are still not 48 bytes. 2023-05-04 17:34:27 -04:00
derekpierre eda1fc1a50 Initial changes to conform to latest changes to Coordinator contract in nucypher-contracts. 2023-05-04 17:34:27 -04:00
Kieran Prasch 4f5a220ea4 fix missing imports 2023-05-04 13:35:40 -07:00
Kieran Prasch ec48a96532 Improves testerchain deploy configuraion YML support. 2023-05-04 10:15:17 -07:00
Kieran Prasch 78b18863d4 removes nightly pytest markers 2023-05-04 10:15:17 -07:00
jMyles bce2ed8607 Replacing pysha3 with keccak implementations from eth-hash and eth-utils. 2023-05-02 10:23:24 -07:00
Kieran Prasch e55bafe6db all tests passing 2023-05-02 10:23:24 -07:00
derekpierre 2b492ffd20 Add pytest options for ape_test to run successfully. Update testpath values. 2023-05-02 10:23:24 -07:00
Kieran Prasch a6d5335449 Reorganizes tests betweeen acceptance/integration. Ape project is now /tests/acceptnace. 2023-05-02 10:23:24 -07:00
Kieran Prasch cfba9be307 simple in-memory test regitry for unit tests, mock out middleware for mock clients. 2023-05-02 10:23:24 -07:00
Kieran Prasch dc51407c0f relocates ursulas fixture (is uses transparently in different scopes) 2023-05-02 10:23:24 -07:00
Kieran Prasch c85f1f2f59 assorted bugfixes related to fixtures and testerchain arising from the migration to ape. 2023-05-02 10:23:24 -07:00
Kieran Prasch 6617e08527 disable ape test plugin during unit and integration tests. 2023-05-02 10:23:24 -07:00
Kieran Prasch 93e45bc612 get ape contract ABIs from an in-memory vs. on-disk source. 2023-05-02 10:23:24 -07:00
Kieran Prasch 39929d0aa3 relocates ape fixtures to local conftest 2023-05-02 10:23:24 -07:00
derekpierre d42b445d63 Fix use of ape project fixture. 2023-05-02 10:23:24 -07:00
Kieran Prasch df86485efa removes several unused pytest fixtures 2023-05-02 10:23:24 -07:00
Kieran Prasch 21fa6edc7b new ape testing utils module 2023-05-02 10:23:24 -07:00
derekpierre 67a7bb7da6 Code testing cleanup. 2023-05-02 10:23:24 -07:00
derekpierre c157c8ccf7 Fix some tests; ERC721 contract needs to be deployed on APE, and MockContractAgency import is now inlined. 2023-05-02 10:23:24 -07:00
derekpierre e0286d13c5 Get `nucypher-contracts` dependency from github by default. 2023-05-02 10:23:24 -07:00
Kieran Prasch a19c50ec69 ape checkpoint 1 2023-05-02 10:23:24 -07:00
derekpierre ba766100b0 bugfix: sync coordinator mocks, use StartRitual event instead of StartTranscriptRound for signalling posting of transcripts. 2023-05-02 10:23:24 -07:00
derekpierre a4798e3a6a bugfixes: ensure poiive start block number, MockCoordinatorAgent to be in line with latest logic in Coordinator contract. 2023-05-02 10:23:24 -07:00
Kieran Prasch 25d4efd870 improves logging and error handling during tdec req/res. 2023-05-02 10:23:24 -07:00
Kieran Prasch 4a9c59a055 bugfixes: pertaining to tdec request/response cycle 2023-05-02 10:23:24 -07:00
Kieran Prasch 19229ab08c exposes ferveo keypair derivation from secre randomness on the ritual power 2023-05-02 10:23:24 -07:00
Kieran Prasch 08be039e42 start the event scanner from a block estimation based on on-chain ritual timeout 2023-05-02 10:23:24 -07:00
derekpierre 3b990e38b4 Make DKG failing tests pass. 2023-05-02 10:23:24 -07:00
derekpierre a3f039e13c Nodes post the dkg public key when posting their aggregated transcripts. 2023-05-02 10:23:24 -07:00
Kieran Prasch e20cc7f96f public exposure of per-request ferveo variant, ferveo==0.1.7 and nucypher-core integration of ThresholdDecryptionRequest and Response 2023-05-02 10:23:24 -07:00
derekpierre b4673ac39f Got some dkg unit and integration tests passing. There are more tests to make pass. 2023-05-02 10:23:24 -07:00
Kieran Prasch c654e45367 updates for web3.py 6+ 2023-05-02 10:23:24 -07:00