Commit Graph

3637 Commits (2b52ac133e29a3d846b9ae5f6404d1da5f9db271)

Author SHA1 Message Date
derekpierre d530733e60 Restore skipped condition tests. 2023-09-01 15:40:44 -04:00
derekpierre 03ca66b561 Utilize efficiency improvements to ThresholdMessageKit that ensures that Ciphertext is not needlessly copied between python layer and Rust later.
Allow ciphertext header to be directly obtained without needing to first get the Ciphertext.
Move decryption of ferveo encrypted data into a method on ThresholdMessageKit so that the Ciphertext data can be used directly in Rust layer, and not pulled into python to then pass
it back into the Rust layer for decryption.
2023-08-27 03:19:28 +02:00
derekpierre a75c5da251 Incorporate latest changes from ferveo and nucypher-core that exposes key encapsulation so that only encrypted symmetric key and associated data (CiphertextHeader) are included in ThresholdDecryptionRequest. 2023-08-27 03:19:28 +02:00
derekpierre ce3d399483 Remove fake python core shim, and use actual nucypher_core objects now that they are available via associated nucypher-core PR. 2023-08-27 03:19:28 +02:00
derekpierre ed4a8fbd79 Not the cleanest but mimic ciphertext header / payload from conversations in ferveo#155. 2023-08-27 03:19:28 +02:00
derekpierre 04a0c0239a Fix test affected by member variable naming change to ThresholdMessageKit. 2023-08-27 03:19:28 +02:00
derekpierre 98cbe16be3 Add the ability for Ursula to use the ACP, obtained from the modified ThresholdDecryptionRequest, to check whether the data is encrypted by an authorized party.
Stub method added to CoordinatorAgent for now.
2023-08-27 03:19:16 +02:00
derekpierre f93f1b1019 Rename DkgMessageKit to ThresholdMessageKit. 2023-08-27 03:18:08 +02:00
derekpierre a84680e6ca Update threshold_decrypt to take a DkgMessageKit instead of ciphertext and conditions. 2023-08-27 03:18:08 +02:00
derekpierre 2043b69a21 Remove redundant test. 2023-08-27 03:18:08 +02:00
derekpierre 13fe740c9a Update Enrico.encrypt_for_dkg to return DkgMessageKit shim. 2023-08-27 03:18:08 +02:00
Kieran Prasch fc543c49dc dehydrate multichain test mocks and utilities for fixture resuse in multiple suites. 2023-08-24 14:26:29 +02:00
Kieran Prasch faa9c147fb tests for /conditions_chains endpoint 2023-08-24 14:17:12 +02:00
Kieran Prasch 34b08247f9 includes a few missing 'contractType' fields in condition tests. 2023-08-24 12:13:58 +02:00
Piotr Roslaniec e07101e68b fix a failing test after a rebase 2023-08-23 20:35:58 +02:00
Piotr Roslaniec c19d97b39f apply pr suggestions 2023-08-23 20:12:22 +02:00
Piotr Roslaniec 097ffad90e feat!: add condition type to condition schemas 2023-08-23 20:07:24 +02:00
Kieran Prasch 34775ca158 run black code formatter on condition.evm.py and test_character_configuration.py, fixes ruff linting errors. 2023-08-22 15:54:56 +02:00
Kieran Prasch 57ce72ade9 use the staking and payment provider uris as default conditions providers before Ursula's construction. 2023-08-22 15:41:23 +02:00
Kieran Prasch 8a551d34ab fallback web3 provider tests 2023-08-20 16:02:39 +02:00
jMyles 280fe0d0f9 Simple test to show error for invalid chain ID. 2023-08-20 16:02:39 +02:00
Kieran Prasch 477a586b47 use pre-constructed providers, not uris. 2023-08-20 16:02:39 +02:00
Kieran Prasch 9c5038c93b Advances multichain evaluation tests coverage 2023-08-20 16:02:39 +02:00
Kieran Prasch 4c3394c309 Updates testing mocks to handle multiple RPC providers per blockchain 2023-08-20 16:02:39 +02:00
Piotr Roslaniec 7f5f35b4c9 update pre-release nucypher-core versions 2023-08-01 10:26:02 +02:00
Piotr Roslaniec 748ee2ae55 update pre-released nucypher-core version 2023-08-01 10:25:12 +02:00
derekpierre 90837df0f0 DKG params are no longer exposed/applicable; remove redundant test and commented out code which have now gone stale. 2023-07-24 08:33:34 -04:00
derekpierre f3871396ac Use FerveoVariant enum value instead of constant for test. 2023-07-24 08:33:34 -04:00
derekpierre 09b13faafd Modify test so that the different ferveo variants can still be tested. 2023-07-24 08:33:34 -04:00
derekpierre e252e78467 Add test for ActiveRitualTracker now using TTLCache for participation states and purging of stale state performed. 2023-07-21 13:42:33 -04:00
derekpierre 84f85b2049 Update ActiveRitualTracker to use TTLCache for tracking participation states; periodically purge the cache of expired entries no longer needed to be tracked. 2023-07-21 13:42:33 -04:00
derekpierre a8f2e49c76 TTL Cache utility. 2023-07-21 13:42:33 -04:00
derekpierre ed0a884e67 Code cleanup for testing. 2023-07-19 11:49:19 -04:00
derekpierre 18527588ba Add integration tests for refactored out methods, used for clean-up, in ActiveRitualTracker
Minor code clean-up.
2023-07-19 08:31:39 -04:00
derekpierre 518994301d Further simplify `_get_participation_state()` to reduce function lines and if-elif-else nesting. 2023-07-18 15:22:23 -04:00
derekpierre 2ece35c575 Provide context message if test fails - this check can fail if the relevant Coordinator contract events change without also updating this test. 2023-07-18 15:20:53 -04:00
derekpierre ff3cba7bd8 Update tests to reflect changes made to `_action_required` and `_get_participation_state` methods on ActiveRitualTracker. 2023-07-17 14:25:22 -04:00
derekpierre 83b874afd1 Add tests for checking pending tx before performing ritual duties. 2023-07-17 14:24:32 -04:00
derekpierre 9621dc1a19 Simplification of participation logic - it was probably over-engineered previously. 2023-07-16 14:30:44 -04:00
derekpierre c8c9875429 Resolve darker complaints. 2023-07-14 12:06:31 -04:00
derekpierre 5ccfc234ec Rename ActiveRitualTracker participation_states variable to indicate internal use. 2023-07-14 11:51:44 -04:00
derekpierre 628bd2cbba Modify concurrent ritual test to instead test _handle_ritual_event which is a more complete test: tests the entire flow when an event is received i.e. participation and executing actions if necessary. 2023-07-14 11:47:15 -04:00
derekpierre 4c17f570de Improve participation state logic to be cleaner and more efficient (don't get participant info more than once). 2023-07-14 11:15:29 -04:00
derekpierre 1cebcfca46 Better link "event linked to this ursula" function (_get_participation_state) and the check for "actionable event"
Improve participation state logic, and EndRitual processing.
Additional tests.
2023-07-13 19:16:41 -04:00
derekpierre a27187f061 Add test for ritual tracker when receiving unexpected events when checking for relevance that it doesn't have processing logic for. 2023-07-13 12:46:54 -04:00
derekpierre 66c0a2c16c Remove unnecessary and unused state tracking for rituals.
Minor code cleanup.
2023-07-13 12:46:40 -04:00
derekpierre 85d061cdb1 Additional tests (and fixes) for StartAggregationRound and EndRitual - special events for which we can't determine participation in ritual from event input args. 2023-07-13 09:12:06 -04:00
derekpierre e56af754d0 Add tests for updated code in Ritualist and ActiveRitualTracker - make relevant code changes for tests to pass. 2023-07-13 09:12:03 -04:00
derekpierre b0b99b24cf Allow dkg actions for the ritual rounds to check contract ritual state, before acting on an event, with respect to potentially previously already processed events. 2023-07-13 09:10:06 -04:00
derekpierre 0e2c1db2c0 Use fire_and_forget for ritual transactions for publishing transcripts/aggregated transcripts. 2023-07-13 09:08:05 -04:00