Commit Graph

12323 Commits (lynx)

Author SHA1 Message Date
derekpierre 5c072135b3
Update acceptance test so that its conditions don't violate nesting limits. 2024-09-18 11:50:52 -04:00
derekpierre 8abd39a372
Appease linter. 2024-09-18 11:50:52 -04:00
derekpierre dee4af36c0
Add tests for nesting of multi condition types.
Update existing tests that previously violated nesting limits.
Update acceptance test to use compound lingo that does not violate nested limits with a 'Not' is applied to it.
2024-09-18 11:50:52 -04:00
derekpierre 1220751086
Limit the nesting of multi condition types: compound and sequential, including combination nesting of each other. 2024-09-18 11:50:52 -04:00
derekpierre 7d4286a97e
Update types for conditions. 2024-09-18 11:50:52 -04:00
derekpierre f7c18364e5
Add some TODOs. 2024-09-18 11:50:52 -04:00
derekpierre 886102d0bd
Update acceptance tests based on changes to execution call logic. 2024-09-18 11:50:52 -04:00
derekpierre 180c1da55a
Add newsfragment for #3500. 2024-09-18 11:50:52 -04:00
derekpierre 627a316ae6
Rename base class for conditions that use execution calls. 2024-09-18 11:50:52 -04:00
derekpierre d21ba562ca
Cleanup documentation comments about condition grammars. 2024-09-18 11:50:52 -04:00
derekpierre 7f6740f9a7
ExecutionCalls should be their own objects without the concern of serialization i.e. better separation of execution from condition lingo. 2024-09-18 11:50:52 -04:00
derekpierre cfc0186b96
Update tests based on improved inheritance and other changes. 2024-09-18 11:50:52 -04:00
derekpierre 468aae93dc
Clean up inheritance and proper validation of conditions. 2024-09-18 11:50:50 -04:00
derekpierre 9499039d94
Code cleanup when resolving condition class. 2024-09-18 11:47:10 -04:00
derekpierre c6a3a6d72e
Update SequentialCondition to use a list of conditions instead of calls. 2024-09-18 11:47:07 -04:00
derekpierre 3f8d8f91a2
Update documentation of SequentialCondition lingo structure. 2024-09-18 11:45:42 -04:00
derekpierre 549a9387f6
Allow JsonApiCall to be an allowed call within SequentialConditions. 2024-09-18 11:45:42 -04:00
derekpierre 257c9ffcc3
Update JsonApiCondition to separate itself into a JsonApiCall and return value test - this allows for JsonApiCalls to be eventually included in SequentialConditions. 2024-09-18 11:45:38 -04:00
derekpierre 6f7bc66faa
Add sequential condition test where one of the calls fails. 2024-09-18 11:41:53 -04:00
derekpierre de9ea69033
Add sequential condition to lingo for lingo tests. 2024-09-18 11:41:53 -04:00
derekpierre 1f85461d28
Define types for serialization/deserialization of calls and variables.
Fix call schemas; some missed a post_load processing method for creating the correct type.
2024-09-18 11:41:53 -04:00
derekpierre 4e50fc1bef
Additional unit test for sequential conditions. 2024-09-18 11:41:53 -04:00
derekpierre 345a443e2d
Add TODO placeholder. 2024-09-18 11:41:53 -04:00
derekpierre 90e7ccf0ca
Add initial unit test for sequential conditions. 2024-09-18 11:41:53 -04:00
derekpierre 41485df3e4
Create generic SequentialCondition that takes a list of execution variables with one condition at the end.
Remove old SequentialContractCondition object since no longer needed and was only limited to contract calls, but provided a template to build on.
2024-09-18 11:41:53 -04:00
derekpierre ef2647f911
Introduce ExecutionVariable which includes an ExecutionCall and a variable name to store the result as. 2024-09-18 11:41:53 -04:00
derekpierre c2c3b19754
Move "name" out of rpc call.
Cleanup Condition/Schema subclassing.
2024-09-18 11:41:53 -04:00
derekpierre 5cad2e0f56
Allow "Calls" to be standalone data structures with schemas, and reused as part of base Conditions. 2024-09-18 11:41:53 -04:00
derekpierre d6b5fb9c37
Clean up validation of method value for TimeCondition. There is an implicit check by superclass that already uses _validate_method - utilize it. 2024-09-18 11:41:53 -04:00
derekpierre 8e4d62861e
Remove provider member from RPCCondition. 2024-09-18 11:41:53 -04:00
derekpierre 0dd77fc6e9
Make test pass - not sure if this is the exact spirit of the original test, but also had some questions about the original test. 2024-09-18 11:41:53 -04:00
derekpierre 5c3439a38d
Remove provider member from RPCCall since not needed. 2024-09-18 11:41:53 -04:00
derekpierre 4fdffe975f
Add SequentialContractCondition condition type, that allows contract calls to be made sequentially, and results of one contract call can be passed into a subsequent call. 2024-09-18 11:41:53 -04:00
derekpierre 9fa873630c
Move more execution logic into RPCCall/ContractCall objects. 2024-09-18 11:41:53 -04:00
derekpierre d3ca9e9261
Fix tests based on separation of rpc/contract calls from the associated condition. 2024-09-18 11:41:53 -04:00
derekpierre f0fbb69224
Separate RPC/Contract calls from the corresponding RPC/Contract Condition. It will eventually allow calls to be components for combining/sequential type of calls. 2024-09-18 11:41:52 -04:00
derekpierre 77c99ed847
Limit number of operands for CompoundAccessControlCondition - still need to handle the case of nested compound conditions. 2024-09-18 11:41:52 -04:00
Derek Pierre 33d382d9cb
Merge pull request #3554 from derekpierre/transcript-size
Use correct transcript/aggregated transcript size during acceptance tests now that transcript size is checked
2024-09-18 11:40:44 -04:00
derekpierre 26034ae6ed
Add dev newsfragment for #3554. 2024-09-18 09:59:07 -04:00
derekpierre fda956afd6
Add tests utility for generating transcripts of the correct size based on shares, threshold of ritual. 2024-09-18 09:59:06 -04:00
KPrasch e593a8bdec
Merge pull request #3553 from derekpierre/strings-whitespace-fix
Condition result that is a string needs to be quoted
2024-09-18 15:51:53 +02:00
derekpierre 963c1312dd
Apply RFC from 3553.
Co-authored-by: KPrasch <kieranprasch@gmail.com>
2024-09-17 09:57:19 -04:00
derekpierre d2c55e0c64
Modify test so that we aren't actually changing the string used; simply verify that the string is valid json already. 2024-09-17 09:56:34 -04:00
derekpierre 4bffff63bb
Properly handle the cases where the strings returned by json endpoint contain quotations. 2024-09-17 09:31:03 -04:00
derekpierre 2a48d5033d
Add dev newsfragment for #3553. 2024-09-16 13:38:38 -04:00
derekpierre a07350aa30
It's not just strings with whitespace but string results in general. Ensure that strings are appropriately quoted, if not quoted already. 2024-09-13 12:41:43 -04:00
derekpierre 2ed9f9708e
Ensure that the ReturnValueTest for JsonApiCondition resolves any context variables contained within in it before doing a condition evaluation. 2024-09-13 11:26:01 -04:00
derekpierre c81fd58a37
Handle the case where the condition execution call result returns an unquoted string value with whitespace in it which causes an Exception to be raised when passed into ast.literal_eval.
This can be especially evident for JSON API endpoints.
We never encountered this before because on-chain conditions didn't return strings.
2024-09-13 11:24:09 -04:00
Derek Pierre b00485822b
Merge pull request #3547 from derekpierre/ape-0.8
Update to Ape 0.8
2024-09-12 15:53:47 -04:00
derekpierre b15604946a
Add additional checks for acceptance test related to dkg failure due to mismatched ferveo key. 2024-09-12 15:53:46 -04:00