derekpierre
869ef1fbda
Remove EconomicsFactory/Economics.
2023-09-21 12:31:21 -04:00
derekpierre
ea9b350093
Clean up tests. Ensure TACo child matches taco root.
2023-09-21 09:51:17 -04:00
derekpierre
bc3ff31449
Add tests for Operator.block_until_ready.
2023-09-21 09:51:17 -04:00
derekpierre
d4d5183ceb
Test renaming to exclude federated. Remove test for alice performing encryption.
2023-09-21 09:51:17 -04:00
derekpierre
6f08f937de
Update tests for TACoChildApplicationAgent.staking_provider_info call for non-existent staking provider.
2023-09-21 09:51:16 -04:00
derekpierre
86131ccdc1
Clean up types file. PolicyInfo is no longer used from there, and StakingProviderInfo should be localized to TACoApplicationAgent which is the only user of it.
2023-09-21 09:51:16 -04:00
derekpierre
215eee3c3d
Remove use of economics on TACoApplicationAgent acceptance tests.
2023-09-21 09:51:16 -04:00
derekpierre
349348c90e
Tests for TACoChildApplicationAgent.
2023-09-21 09:51:16 -04:00
derekpierre
a022473203
Fix failing prometheus test.
2023-09-21 09:51:16 -04:00
derekpierre
33306a9d79
Rename root/child application agent integration fixtures.
2023-09-21 09:51:16 -04:00
derekpierre
47df768e14
Add banner after unauthorized decryption test to match format of other tests.
2023-09-21 09:51:16 -04:00
derekpierre
e8cea675ea
Mark test to implicitly use fixture via usefixtures(...) macro.
2023-09-21 09:51:16 -04:00
derekpierre
48e6977dbd
Update integration tests to properly mock operator bonding based on new logic to check bonding for cli tests.
2023-09-21 09:51:16 -04:00
Manuel Montenegro
0da1397f56
Rename integration tests
...
These tests have the same name than other tests in `unit` and
`acceptance` folder.
VS Code IDE in unable to do the discovery process of the tests when:
1. There is different sources of tests (different folders)
2. Some names are duplicated in tests of different folders.
This causes the discovery process to crash, so tests are not shown in
Test Explorer.
Renaming the tests with duplicated names works and let the developers
that uses VS Code to keep working with this IDE.
2023-09-21 10:59:49 +02:00
Manuel Montenegro
f3e81ea798
Format integration test_block_confirmations code
...
This change applies darker and ruff code style rules.
2023-09-21 10:37:29 +02:00
Manuel Montenegro
700a5e4134
Format integration test test_concurrency.py code
...
This change applies darker and ruff code style rules.
2023-09-21 10:20:50 +02:00
Manuel Montenegro
083ba2e4ad
Format integration test test_dkg_ritual code
...
This change applies darker and ruff code style rules.
2023-09-21 10:18:04 +02:00
derekpierre
86c53fd7a9
Remove previously added code to work around newer ape version usage of chain id 1337 instead of the default eth-tester chain id (131277322940537).
...
The chain id can be properly configured in the ape configuration file, and no longer needs a workaround for acceptance tests.
2023-09-20 13:54:59 -04:00
derekpierre
f4e34f6593
Address RFCs in #3227 . Utilize pytest usefixtures for implicit/dependeny fixture parameters, comment cleanups.
2023-09-18 12:15:22 -04:00
derekpierre
0081ee1ce6
Don't migrate configurations from v4->v6, but instead do v4->v5->v6 to ensure proper changes are enacted.
...
Migration from v4->v5 missed deprecation of "db_filepath" configuration parameter.
Add tests for configuration migration.
2023-09-15 10:53:23 -04:00
Kieran Prasch
5d5261a5a7
Acceptance tests target nucypher/nucypher-contracts@main
2023-09-15 16:20:48 +02:00
derekpierre
8757889c15
Remove invalid Ursula.run parameter.
2023-09-14 16:26:05 -04:00
derekpierre
5cf5f2426c
Use existing ursula operator address so that funding/bonding does not need to be mocked.
2023-09-14 16:26:05 -04:00
derekpierre
bf4ebeeb3f
Ursula must call set_provider_public_key before it can be considered as being confirmed by the application contract.
2023-09-14 16:26:05 -04:00
derekpierre
1eb86c13e3
Vladimir no longer needs eth for test - set provider public key is no longer called in Ursula (superclass) constructor.
2023-09-14 16:26:05 -04:00
derekpierre
e1eb8cb0c1
Ensure that test Ursulas set their provider public key after being initialized.
2023-09-14 16:26:05 -04:00
Kieran Prasch
7689cc0769
removal and reorg of 'trackers' in preperation for publishing ofprovider public key to Coordinator.
2023-09-14 16:26:05 -04:00
Kieran Prasch
499f903976
Adapt tests and exmaples to merged Operator, without Ritualist.
2023-09-14 16:26:05 -04:00
derekpierre
f58d7675a3
Fix usage of ape fixtures in acceptance cli tests.
2023-09-14 16:26:05 -04:00
derekpierre
ab0ab5cbec
Properly manage ape dependencies for acceptance tests contract deployment.
2023-09-14 16:26:05 -04:00
derekpierre
6a09fdfc3a
Modify transacting power tests to use setProviderPublicKey() instead of confirmOperatorAddress().
2023-09-14 16:26:05 -04:00
derekpierre
3f1f40f2c8
Fix use of various fixtures and contracts for test.
2023-09-14 16:26:05 -04:00
derekpierre
958c222679
Ensure that SubscriptionManager is one of the deployed contracts for acceptance tests.
2023-09-14 16:26:05 -04:00
derekpierre
8bb1faf5eb
Update ursula operator acceptance tests to accomodate shift to set_provider_public_key() from confirm_operator_address().
2023-09-14 16:26:05 -04:00
derekpierre
acb89db902
Update dkg ritual acceptance test to use updated fixtures and contracts.
2023-09-14 16:26:05 -04:00
derekpierre
681e3b1061
Add get_ritual_initiation_cost to MockCoordinatorAgent - although not needed for integration tests.
2023-09-14 16:26:05 -04:00
derekpierre
59da3dffcf
Remove unused method from ape utils.
2023-09-14 16:26:05 -04:00
derekpierre
7dc8aa3aad
Fix acceptance/agents tests based on latest fixtures and contracts.
2023-09-14 16:26:05 -04:00
derekpierre
f5ca66b317
Only use proxy contracts for root/child applications (instead of actual contracts) as part of acceptance tests contract deployments
2023-09-14 16:26:05 -04:00
derekpierre
d86ad57351
Initialize taco_child_application fixture with coordinator contract address.
2023-09-14 16:26:05 -04:00
derekpierre
9fae50b916
Ensure that staking_providers fixture can be correctly configured.
...
TACoApplicationChild should reference root application via proxy contract.
2023-09-14 16:26:05 -04:00
derekpierre
b8b8fc0c38
Remove special logic for using ape config for deployments, and instead use ape pytest fixtures for contract deployment/management.
2023-09-14 16:26:05 -04:00
derekpierre
cf00cdd05b
Update version of openzeppelin contracts dependency.
2023-09-14 16:26:05 -04:00
derekpierre
209fee38fc
Modify nucypher-contracts dependency being used for alpha-13 support to point to alpha-13 EPIC.
2023-09-14 16:26:05 -04:00
derekpierre
0d587f0295
Remove over-aggressive rename of `stake_info`.
2023-09-14 16:26:05 -04:00
derekpierre
75be004564
Update acceptance tests contract deployment / fixtures; StakeInfo is no longer a contract.
2023-09-14 16:26:05 -04:00
derekpierre
894dc5ac81
Apply suggestions from review for #3213 .
2023-09-14 09:22:41 -04:00
Kieran Prasch
4fc0176a96
handle integration and unit mocking of ad-hoc ursula account bonding.
2023-09-12 18:28:52 +02:00
Kieran Prasch
570e3574b3
utility mock for is_provider_public_key_set
2023-09-12 18:03:03 +02:00
derekpierre
382029d055
Add Enrico authorization testing to test_dkg_ritual acceptance test.
2023-09-12 10:12:25 -04:00
derekpierre
ba002cc4e7
Use isEncryptionAuthorized() function on Coordinator agent itself via Coordinator agent, instead of trying to call access controller for ritual directly.
...
Pass ciphertext_header to is_encryption_authorized() function and not the hash of it.
2023-09-12 10:11:37 -04:00
Kieran Prasch
eb56131888
remove unused ape config
2023-09-11 19:06:24 +02:00
Kieran Prasch
783f2dcd76
Enrico uses a web3 wallet to encrypt-then-sign.
2023-09-11 19:06:24 +02:00
derekpierre
243448d015
Bob no longer needs ritual id as a parameter for decrypting the threshold message kit since the Coordinator contract can be used for obtaining the ritual id from the dkg public key which is already stored in the threshold message kit.
2023-09-11 11:50:54 -04:00
derekpierre
e943ca7b8f
Rename PREApplicationAgent to TACoApplicationAgent; also rename associated variables/comments etc.
2023-09-08 09:27:04 -04:00
derekpierre
4b8f6d95f2
Cleanup testing blockchain utilities imports.
2023-09-07 20:58:17 -04:00
derekpierre
f925bc423e
Vladimir needs ETH to set provider public key for tests.
...
Cleanup Vladimir code to not depend on test.contants.
2023-09-07 20:57:18 -04:00
derekpierre
22dee9b3b8
Ensure ConditionNFT contract is actually deployed for acceptance/conditions tests.
2023-09-07 20:05:16 -04:00
derekpierre
526fb779fa
Move APE_TEST_CHAIN_ID to tests constants file.
2023-09-07 19:35:34 -04:00
derekpierre
5aba218dff
Add getRitualInitiationCost to CoordinatorAgent and update acceptance tests accordingly; this way we don't care about fee values.
2023-09-07 19:22:02 -04:00
derekpierre
9aa1e31424
Substitute address index for actual deployer test account at index 0 based on test mnemonic.
2023-09-07 18:43:29 -04:00
derekpierre
3a98c38b6a
Add required arguments for tests using MockCoordinator given the new values stored by the Ritual struct.
2023-09-07 18:35:00 -04:00
Kieran Prasch
0c69c142b6
handle fees, authority, and access controller in several tests
2023-09-07 18:35:00 -04:00
Kieran Prasch
92278352f3
setStakes -> authorizationIncreased
2023-09-07 18:35:00 -04:00
Kieran Prasch
56486f74df
assorted 'initiator' -> 'authority'
2023-09-07 18:35:00 -04:00
Kieran Prasch
c005ee86ac
deployer account fixture
2023-09-07 18:35:00 -04:00
Kieran Prasch
c7b19902ca
use RitualToken for ritual init
2023-09-07 18:35:00 -04:00
derekpierre
81121bc4c5
Accomodate obtaining dkg threshold from Coordinator contract/Ritual object.
...
MockCoordinatorAgent simply uses a class method to determine threshold (allows for both simple/precomputed) to still be tested in integration tests.
2023-09-07 18:35:00 -04:00
derekpierre
f0e64f23e7
Fix MockCoordinatorAgent to properly handle setting/getting provider public keys.
...
Move G2Point out of Ritual in CoordinatorAgent.
2023-09-07 18:35:00 -04:00
derekpierre
dc68949b15
Use random global allow list value for ritualist unit test.
2023-09-07 18:35:00 -04:00
derekpierre
4534a5a292
Modifications to make some coordinator agent acceptance tests pass.
2023-09-07 18:35:00 -04:00
derekpierre
f0908d580b
Fix parameters to Coordinator contract in ape configuration file.
2023-09-07 18:35:00 -04:00
derekpierre
2e255a78cd
Update StakeInfo contract with operator address and authorized amount.
2023-09-07 18:35:00 -04:00
derekpierre
1cd23c2c9c
Modify nucypher-contracts repos being used so that concurrent changes can be made while testing.
2023-09-07 18:35:00 -04:00
derekpierre
2e47626c90
Fix mispelled constant.
2023-09-07 18:35:00 -04:00
Kieran Prasch
d121b1cbf3
Pathfinding an entry point for ferveo publick key commitments in Ursula; Supporting G2 point class
2023-09-07 18:35:00 -04:00
Kieran Prasch
2342f7f1ef
initial steps to establish on-chain ritual access control via GlobalAllowList in tests
2023-09-07 18:34:58 -04:00
Kieran Prasch
c0c77b3eb6
re-establish staking providers authorization
2023-09-07 18:33:06 -04:00
Kieran Prasch
0e96f5c76c
modifies ape -> nucypher registry adapter function to handle both local and dependency contract ABI entries.
2023-09-07 18:33:06 -04:00
Manuel Montenegro
fe75f75998
Update tests to new TACo nucypher contracts
...
This commit is aimed to update test to the following changes on
nucypher-contracts repo:
- Update SimplePREApplication with TACoApplication
- Replace ThresholdStakingForPREApplicationMock contract with
ThresholdStakingForTACoApplicationMock
- Use the new Coordinator contract
- Add the deployment of StakeInfo contract
The use of these new contracts made necessary the following changes:
- Add the deployment of a new Token for ritual fees: RitualToken. This
contract has been added as local deployment.
- Add the deployment of local contract ConditionNFT
Additionally, this commit updates the key character for arguments in
ape-config.yaml. From '::variable::' to <variable>, which results in a
more legible code.
Finally, this commit solves some linting and formatting issues.
Co-authored-by: LunarBytes <kieran@nucypher.com>
2023-09-07 18:32:58 -04:00
derekpierre
f9b3babd69
Updated acceptance tests to use the correct chain id since it seems that the latest version of ape uses a default chain id of 1337.
...
Some fixtures needed to move to conftest in acceptance folder.
2023-09-05 16:41:23 -04:00
derekpierre
ccbabde014
Use specific test account since we derive test accounts from a mnemonic - index of `0` is always the same account, so just use it.
2023-09-05 13:36:35 -04:00
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