Commit Graph

3946 Commits (72fd462878235c7fb2bc4a4ca2449b7b467273d2)

Author SHA1 Message Date
KPrasch 2cbf9f9ddb
skip tests use live network requests 2024-03-25 13:32:14 -04:00
derekpierre 9f8dfffd11 Allow EventScanner to obtain different events as part of the same call to reduce overall rpc calls. Multiple events can be obtained by one call, instead of making one getLogs call per event.
EventScanner will no longer take specified filters since more than one event type can be obtained at a time. We don't utilize event specific filters currently anyway - and we probably won't need to.
2024-02-13 10:53:03 -05:00
derekpierre 4c42344785 Update test to use updated name for cache member variable. 2024-02-13 10:53:03 -05:00
derekpierre 755cbd1511 Don't reuse the same SSL context. Use a new SSL context per connection so that the ca data can be updated accordingly. 2024-02-13 10:53:03 -05:00
derekpierre c4019d165e Add test that ensures that when ursula restarts and its tls certificate changes, that a P2PSession can reconnect to it and update its cache.
Co-authored-by: Kieran Prasch <kieranprasch@gmail.com>
2024-02-13 10:53:03 -05:00
derekpierre d4b257fc66 Add test regarding already having an invalid cert and it getting refreshed as part of retry. 2024-02-13 10:53:03 -05:00
derekpierre 6545dc3e88 Make start chunk size optional and default to min chunk size unless specified otherwise. Having 20 as the default negates the initial use of min chunk size which seems like a waste. I can see a potential usage for not wanting to use the min chunk size for a specific case of scanning a large number of blocks but seems unnecessary otherwise. 2024-02-13 10:53:03 -05:00
derekpierre 19caae9a2d Fix SimpleTask to actually use class INTERVAL value instead of its own - caused EventScannerTask to use 60s instead of the 120s it had defined. 2024-02-13 10:53:03 -05:00
derekpierre ab738805cb Re-inforce scanner test that larger chunk sizes do result in lower rpc calls. 2024-02-13 10:53:03 -05:00
derekpierre a4d759ba7a Add tests for auto migration scenarios for select_config_file. 2024-02-13 10:53:03 -05:00
derekpierre c5b86572c9 Actor now uses cached Ritual object whenever available which has aggregated transcript bytes on it - this saves more RPC calls for already completed/active Ritual whose values (that we care about) don't change at the moment.
Aggregated transcript is no longer cached separately (but as part of cached Ritual object) so update code/tests accordingly.
2024-02-13 10:53:03 -05:00
derekpierre abd6549dad Re-inforce decryption test that relies on caching but raising and exception if a function call is made to not use the cache for validators. 2024-02-13 10:53:03 -05:00
derekpierre 611445f80e Don't cache derived decryption shares - what in the hell was I thinking, they are ciphertext specific at the moment. 2024-02-13 10:53:03 -05:00
derekpierre f5eb270e90 Add integration and acceptance test to ensure that cached values work for decryption, and that even without a populated cache decryption can still occur. 2024-02-13 10:53:03 -05:00
derekpierre 0c23e1727f Update tests now that transcript bytes are no longer stored in dkg storage - it was only used in tests. 2024-02-13 10:53:03 -05:00
derekpierre ddc1b454e5 Use `nucypher-contracts:main` as the canonical source for contract registries.
Add test to ensure github raw path is actually correct.
2024-02-13 10:53:03 -05:00
KPrasch 2a4d99cb1f Update tests/acceptance/ape-config.yaml 2024-02-13 10:53:03 -05:00
derekpierre f8609a3d01 Add test for updated tx receipt processing logic which removes the txhash from dkg storage whenever the pending tx hash is determined to have been actually mined, either successfully (status=1) or not.
If the tx is already mined then the Coordinator contract should be the source of truth for how to proceed.
2024-02-13 10:53:03 -05:00
derekpierre 00788e9001 Remove use of index within Participant struct - we don't specifically use it. 2024-02-13 10:53:03 -05:00
derekpierre c84060b2bd Include 0 as a value for testing participant pagination - a page size of 0 indicates that all participants should be returned without needing to know the number of participants there are. 2024-02-13 10:53:03 -05:00
derekpierre e1a74366a0 Don't obtain entire ritual when only specific participant information is needed for determining participation state. 2024-02-13 10:53:03 -05:00
derekpierre 6c56dd2d9b Simplify search for participant for post_aggregation in MockCoordinatorAgent. 2024-02-13 10:53:03 -05:00
derekpierre 9709ad7466 Fix inner function names to make linter happy. 2024-02-13 10:53:03 -05:00
derekpierre fad20719fc Add acceptant test for various pagination combinations for obtaining participants for a ritual. 2024-02-13 10:53:03 -05:00
derekpierre 6df1c037b7 Reduce public scope of rituals object on MockCoordinatorAgent. We don't really want anything changing state directly. 2024-02-13 10:53:03 -05:00
Kieran Prasch eabc61deaa relocates the remaining Coordinator models to eth/models.py 2024-02-13 10:53:03 -05:00
KPrasch 5f8d68fe08 bugfix: always handle transaction hashes instead of transcripts for dkg tracking. Updates mocks to return txhash instead of receipt for transcript and aggregation posting. 2024-02-13 10:53:03 -05:00
KPrasch e5782c65f8 agent layer: isolates coordinator function interface exposure (abstracting page management to actors) 2024-02-13 10:53:03 -05:00
derekpierre 399497befc Modified the MockCoordinatorAgent to separate state from values returned or else it gives a false sense of validated tests. For example, `get_ritual` should adhere to its API by returning Participant objects with/without transcripts.
Consequently, only transactions are allowed to modified state, and get calls only return copies of objects.
Update associated test accordingly that needed to mock return from underlying object and not copy.
2024-02-13 10:53:03 -05:00
derekpierre c64e4bfc42 Have Ritual struct store ritual id instead of passing both of them together. 2024-02-13 10:53:03 -05:00
KPrasch 6fc96d3352 sync _UpAndDownInTheWater mocks 2024-02-13 10:53:03 -05:00
KPrasch 6dfe7f9953 Updates ritual and participant mocks; sync MockCoordinator 2024-02-13 10:53:03 -05:00
KPrasch 96cac14fd5 handle shared coordinator reads and dkg artifact preperation logic between ursula and decryptors. 2024-02-13 10:53:03 -05:00
KPrasch 8cd51eebf5 temp. use a fork to contract dependencies. 2024-02-13 10:53:03 -05:00
KPrasch c1495b66a7 updates mocks to sync with coordinator agent updates 2024-02-13 10:53:03 -05:00
KPrasch 2c26384c39 removes business logic from coordinator agent, plainly exposes participant views without mutation. 2024-02-13 10:53:03 -05:00
Kieran Prasch ca0ca483de with_participants=False by default 2024-02-13 10:53:03 -05:00
Kieran Prasch 9632f97737 include index in the nucypher-local model of participants 2024-02-13 10:53:03 -05:00
KPrasch 0d04902ea1 skip a test that is planned for removal 2024-02-13 10:53:03 -05:00
KPrasch 4d06ad441d linting 2024-02-13 10:53:03 -05:00
KPrasch 1fcf3c84a8 fully deprecates the node storage API 2024-02-13 10:53:03 -05:00
Kieran Prasch 2c1183bbce apply black code formatting and ruff import sorting to select modules 2024-02-13 10:53:03 -05:00
Kieran Prasch 9e6bc1dbc7 preserve node storage dependency injection for ursulas. 2024-02-13 10:53:03 -05:00
Kieran Prasch 0f05d3d4f5 customizes certificate handling request session adapter for ursula p2p services 2024-02-13 10:53:03 -05:00
Kieran Prasch 7ad2635b83 use NodeStorage as the implcit default, removes storage confiuration abilities. 2024-02-13 10:53:03 -05:00
Kieran Prasch 2a6c6a2b35 isolate cert caching from memory adapter 2024-02-13 10:53:03 -05:00
Kieran Prasch 1b6b61e334 Makes network middleware loally certificate agnostic 2024-02-13 10:53:03 -05:00
Kieran Prasch 13758d14a0 removes certificate filepath handling 2024-02-13 10:53:03 -05:00
KPrasch 6bc2d4bad2 include block height in the node's html status web page. 2024-01-24 11:45:21 +01:00
Kieran Prasch 8af8133c2d utilize the flask test client on Ursula to integration test ipv4 resolution from flask request headers. 2024-01-23 19:21:26 +01:00