Commit Graph

367 Commits (25d4efd870b9e6b332eb537ed184d8a1af06ce35)

Author SHA1 Message Date
Kieran Prasch 19229ab08c exposes ferveo keypair derivation from secre randomness on the ritual power 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
Kieran Prasch 35baaad87c fervero/node integration test with mocked blockchain 2023-05-02 10:23:00 -07:00
Kieran Prasch 33bcea650d DKG encryption functionality for Enrico 2023-05-02 10:23:00 -07:00
Kieran Prasch fff6728a32 three-layered testing of DKG rituals 2023-04-20 07:10:45 -07:00
Kieran Prasch 3d16cecaa5 updates nucypher-core and umbral usage 2023-04-20 07:10:45 -07:00
Kieran Prasch a08ca63eef ferveo usage unit tests 2023-04-20 07:10:45 -07:00
Kieran Prasch 59e14cc2e2 dkg node protocol early prototype v1. 2023-04-20 07:10:45 -07:00
KPrasch b739e79b80
Merge pull request #3049 from fjarri/umbral-serde
Updates for nucypher-core 0.6 and umbral 0.9
2023-04-11 10:23:17 -07:00
Manuel Montenegro 4d25e97d67
Use fixed binary value for test
The use of randomly generated values for pytest parameters may cause
errors in test explorer in Visual Studio Code. Specifically,
`test_return_value_serialization` test returns the following error when
a random parameter is used:

```
Test result not found for:
./tests/unit/conditions/test_return_value.py::test_return_value_serialization
[\xbd\x01\t\xecV\x05\x04\xe2\x9b(\xb6\xcef\xea\xa4\xfa]
```

Since the rest of values used in this test are fixed, there is no reason
to use a random value for bytes parameter.
2023-03-21 12:56:25 +01:00
Bogdan Opanchuk aa779c6557 Fixes for the new nucypher-core/umbral-pre API 2023-02-18 13:32:19 -08:00
derekpierre 889cc58a88 Remove code/tests that still reference the legacy notion of periods. 2022-12-22 15:05:50 -05:00
KPrasch f2f8b27f88
Merge pull request #3030 from KPrasch/unfederated
Retire Federated Runtime
2022-12-22 11:53:31 -08:00
Kieran Prasch 0222a17c6b Restores unit tests to not compile solidity. 2022-12-07 11:29:26 +00:00
Kieran Prasch fda5c86db2 Removes "decentralized" and "blockchain" differentiation from "federated" 2022-12-07 11:29:26 +00:00
Kieran Prasch 7b7f2f071f Atomically unfederate (most of) the tests; Restores "federated" functionality by way of mocking. Takes advantage of fixture overriding to intercept testerchain. 2022-12-07 11:28:40 +00:00
James Campbell 19a1c4e7b3 Rename key to index in Return Value Test 2022-12-06 14:53:30 +00:00
James Campbell 4250e9f314 Restrict return value `key` to only be an integer 2022-12-05 16:58:57 +00:00
derekpierre 37ef40f482 Fixed incompatibility between Schema and their associated objects leading to invalid json being allowed, and valid json sometimes not being allowed.
Added tests.
2022-11-21 12:37:42 -05:00
derekpierre d540846163 Add additional tests for ConditionLingo, and empty rust Conditions on MessageKits. 2022-11-18 14:52:49 -05:00
derekpierre 2e0a1e5782 Add tests for conditions lingo validation. Use InvalidConditionLingo exception for invalid lingo grammar. 2022-11-18 13:42:25 -05:00
derekpierre 4cf9c7c70a Enrico now provides condition as actual None with no conditions are provided instead of an empty Conditions object.
Utilize better typing of condition dictionaries and its values.
Allow validation of conditions data without instantiation.
2022-11-18 10:33:15 -05:00
Kieran Prasch 023494f4a2 respond to RFCs in PR #3021 2022-11-17 15:27:24 +00:00
Kieran Prasch 24b4b33265 post-rebase cleanup 2022-11-17 15:25:00 +00:00
Kieran Prasch ff3f414331 Sort fixtures that compile to localized acceptance/unit conftest respectively; Faster unit test suite. 2022-11-17 15:22:55 +00:00
Kieran Prasch fbfe0c8bc6 Fixturize test module constants 2022-11-17 15:22:53 +00:00
Kieran Prasch 15b98e5479 de-duplicate condition fixture definition 2022-11-17 15:20:43 +00:00
James Campbell b7f23c7c16 Investigate types changing in condition parameters 2022-11-17 15:20:41 +00:00
derekpierre 7a389e2c39 Improve OperatorBondedTracker coverage. 2022-11-16 12:28:17 -05:00
derekpierre b2f71dd5c6 Add more conditions/lingo tests. 2022-11-16 12:28:17 -05:00
derekpierre dc488624e8 Improve testing for ConditionLingo, utils. Remove unceessary check for function_abi. 2022-11-16 12:28:15 -05:00
derekpierre ceee8bd2e9 Add tests for evaluate_condition() utils method. Fix incorrect type in method. 2022-11-16 12:27:12 -05:00
Kieran Prasch 6ca73c2849 remove lisence header from tests 2022-11-16 13:27:47 +00:00
James Campbell bdaaafd9c3 Fix newsfragment and ensure conditions test has a valid method 2022-11-15 14:58:56 +00:00
James Campbell 4c5dadbad4 Resolve `function_abi` AFTER condition is initialized
Fixes #3012

Problem
-------
- when specifying a `standard_contract_type`, the `function_abi` is resolved
  immediately
- when this condition is serialized, it contains both `standard_contract_type`
  and `function_abi`, which we are trying to prevent

Solution
--------
- call `_resolve_abi` after the condition is initialized
2022-11-15 14:47:11 +00:00
James Campbell 656ff8071c Improve error types raised by Return Values 2022-11-14 18:27:48 +00:00
James Campbell 775d890d3b Allow returnValueTest key to be None in serialization 2022-11-14 14:32:29 +00:00
Kieran Prasch 2c5db8e1f8 snake case t staking data fixture. 2022-11-14 14:32:29 +00:00
Kieran Prasch 38283661b1 Strict typing for _resolve_abi; Simplifies enforcement of single-function ABI for condition definition. 2022-11-14 14:32:27 +00:00
James Campbell 48cc132580 Use web3 to find functions from contract abi in return value test 2022-11-14 14:32:13 +00:00
James Campbell 52038237ad Add test to ensure eval can't run on context variable in return key 2022-11-14 14:32:13 +00:00
James Campbell e36b958912 Allow return value to be tuple and use modern `isinstance` over `type` 2022-11-14 14:32:13 +00:00
James Campbell 417c8b0fd4 Fix mocking of tester chain 2022-11-14 14:32:13 +00:00
James Campbell beec9958d1 Add test for method not in standard contract abi 2022-11-14 14:32:13 +00:00
James Campbell 6b2b072e12 Include tests for handling list index in ReturnValue 2022-11-14 14:32:13 +00:00
James Campbell b6f422ff4e Add basic tests for Return Value key 2022-11-14 14:32:10 +00:00