Commit Graph

2274 Commits (fed0f362b10fcbe5aab1ba1c42f35ee54f1a9083)

Author SHA1 Message Date
Kieran R. Prasch 83bfefc9a1
Use pathlib in test mixed configuration cli test 2020-05-08 15:29:40 -07:00
Kieran Prasch 31e3a1afbe
Fixes mixed configuration test innacuracy. 2020-05-08 14:02:04 -07:00
K Prasch 6e1ae2fe8f
Merge pull request #1964 from KPrasch/squash
Bug Fixes: WSS Provider, Keystore file Handling
2020-05-08 09:59:27 -07:00
David Núñez 9c152e68ec Improve preprocessing and code organization in Allocator 2020-05-08 01:07:48 +02:00
Kieran Prasch 8b6e932837
Adjust keyfile reader mock to reflect filesystem walking. 2020-05-07 10:51:30 -07:00
Kieran Prasch 20358ae9a2
Dont add test account twice in tests. 2020-05-07 10:10:34 -07:00
Kieran R. Prasch 9051bf31a7 Fixes #1962 - Keystore path management bugfix 2020-05-06 19:10:42 -07:00
David Núñez ee54fcbbeb Allows to transfer ownership of StakingInterfaceRouter
* Fixes #1488
* Removes method to transfer ownership of all contracts at once.
2020-05-06 03:49:28 +02:00
David Núñez c820e124f6 Transferring ownership of proxied contracts should only affect the proxy
Fixes #1818
2020-05-06 01:29:42 +02:00
David Núñez 2aef36c7b0 Use estimateGas() instead of call() when trying to optimize batch deposits
Since estimateGas() with a provided gas limit doesn't fail in some backends (like eth tester), we always raise then the resulting TX is above the limit
2020-05-06 01:29:42 +02:00
David Núñez 6e0e9cf4dd Adapt tests to no allocations with PreallocationEscrow contracts 2020-05-06 01:29:42 +02:00
David Núñez 2423063541 Changes to allocations in CLI and actor levels
* Uses a helper actor called Allocator
* CLI tests
2020-05-06 01:29:42 +02:00
David Núñez d180d81c8a Batch deposit methods in StakingEscrowAgent and unit tests 2020-05-05 20:06:16 +02:00
David Núñez ec3b27d95a Extend gas estimation script for other batch deposit scenarios
For stakers with 24 substakes, gas cost per batch deposit is 850,000*N + 69,000
2020-05-05 20:06:16 +02:00
Kieran R. Prasch b209636081 unset monkey patch and recognition of block unil ready bug 2020-04-30 15:38:32 -07:00
Kieran R. Prasch c8a39cbb45 Keystore signer integration test 2020-04-30 15:23:24 -07:00
Kieran R. Prasch c99e69e794 Baseline pytests for keystore signer 2020-04-30 15:20:37 -07:00
K Prasch 3c3f23ea46
Merge pull request #1891 from KPrasch/milestoning
Verify consistent ownership during deployment; Handle Insufficient funds TX failure.
2020-04-28 09:25:34 -07:00
David Núñez a713d44f03 Parametrize test_snapshot with values covering different byte ranges 2020-04-28 00:25:32 +02:00
David Núñez 5c22845d9e Additional checks for setting flags in StakingEscrow 2020-04-28 00:25:32 +02:00
David Núñez 44b8127407 Tests balance snapshots in StakingEscrow
Note that we're even testing the actual storage content
2020-04-28 00:25:32 +02:00
David Núñez 94a2480416 Introduce some basic test utilities for Solidity and TesterBlockchain
The interesting utils are the ones to compute location of mapping entries and array data, as they will allow us to further improve our Solidity unit tests
2020-04-28 00:25:32 +02:00
David Núñez 2a6a5597d0 Include snapshots flag in output of StakingEscrow.getFlags() 2020-04-28 00:25:32 +02:00
David Núñez 590acf564c Print main contract sizes in gas estimation script 2020-04-27 02:37:22 +02:00
David Núñez e1dbef3a0a Unit tests for Snapshot library 2020-04-27 02:37:22 +02:00
David Núñez 420f061d6e Small reorder in estimage_gas.py script 2020-04-27 02:37:22 +02:00
vzotova 1457e97ca8 Apply suggestions from code review for #1915
Co-Authored-By: David Núñez <david@nucypher.com>
Co-Authored-By: MacLane S Wilkison <maclane@nucypher.com>
2020-04-26 18:56:00 +03:00
vzotova 7377e013ad Dispatcher: support for ERC897 2020-04-24 17:40:30 +03:00
vzotova 4431d9fa98 PolicyManager: reorganize state layout, decrease size of some reward fields to uint128 to put state in fewer slots 2020-04-24 15:57:45 +03:00
vzotova bbed659567 StakingEscrow: unifying all flags into one field to make more space for future slots 2020-04-24 15:57:44 +03:00
David Núñez 66c705154b StakingEscrow: storage optimization for substakes, use uint128 to store NU amounts
Co-Authored-By: vzotova <vikki.zta@gmail.com>
2020-04-24 15:57:44 +03:00
vzotova 32acc0a62a WorkLock: minor changes in restrictions 2020-04-24 15:57:44 +03:00
vzotova 261932125c Issuer: combine currentSupply1 and currentSupply2 in one slot to remove optimization code and increase readability 2020-04-24 15:57:43 +03:00
vzotova 5361b1b545 Small refactoring for gas estimation script to separate several cases 2020-04-24 15:57:43 +03:00
vzotova 4edb5441f7 Enable winding down in gas estimation script to measure worst case 2020-04-24 15:57:43 +03:00
vzotova c9ea0088d3 Upgradeable: stub slot for slot separation 2020-04-24 15:57:42 +03:00
K Prasch 14fe3d0232
Merge pull request #1892 from derekpierre/worklock-doc-update
Documentation to incorporate WorkLock v4 updates
2020-04-22 12:32:44 -07:00
derekpierre af7ca0c2c5 Modify worklock output for bidder depending on whether tokens have been already claimed or not
Cleanup output of refunds
Update docs to reflect updated output
Add tests for base deposit and refund rate methods added to WorkLockAgent
2020-04-20 11:52:11 -04:00
Kieran Prasch a347926970
Formalize TransactionFailed API; Some careful integration with interfaces. 2020-04-18 12:46:32 -07:00
jMyles 163e679dd2 Since we are getting lazier and lazier about maturing nodes, we need a bit of compatibility logic in the tests here. 2020-04-15 18:32:37 -07:00
Kieran Prasch 9116e2035e
Single contract deployment test touch up. 2020-04-15 12:50:55 -07:00
Kieran Prasch d162792495
Pretty formatting for deployment heads ups 2020-04-15 12:50:55 -07:00
Kieran Prasch fd3e289ef3
Fixes #1209 - Ensure StakingEscrow agent can accept token deposits from 3rd party addresses on behalf of another staker address. 2020-04-15 12:50:55 -07:00
Kieran Prasch 56ee8d0de0
Deprecation of --poa from CLI tests. 2020-04-15 12:50:55 -07:00
Kieran Prasch 08708f3d84
Fixes #1799 - Allow --ignore-deployed to be used for all types of contract creation. 2020-04-15 12:50:55 -07:00
Kieran Prasch c7541df6a8
Fixes #1765 - Deprecates Seeder Contract. 2020-04-15 12:50:53 -07:00
David Núñez 7230aeac41 Move NULL_ADDRESS constant from BlockchainInterface to the eth.constants module 2020-04-15 02:42:25 +02:00
David Núñez d3a88dc205 First test for Trustee: proposing MultiSig management operations 2020-04-15 02:36:22 +02:00
David Núñez 1da7d97acb Add a getter for the number of owners of the MultiSig contract 2020-04-15 02:36:22 +02:00
David Núñez 7d6402b686
Merge pull request #1875 from vzotova/immutable
Immutable fields in contracts
2020-04-15 00:55:00 +02:00
vzotova e527858b6d Solidity: immutable fields 2020-04-10 17:54:41 +03:00
David Núñez 38c9238e48 Removing secretHash in Upgradeable shifted all slots in test contract
secretHash itself occupied a slot, but in addition, it was in between an address and an uint8, which now fit together in a single slot, so all slots of this test contract have moved 2 places.
2020-04-09 23:36:39 +02:00
David Núñez e1dc124317 Adapt everything else to no secrets: deployers, tests, CLI, docs, etc 2020-04-09 17:59:56 +02:00
David Núñez 00c449fac5 Remove secret deployment hash from proxy contracts 2020-04-09 14:47:54 +02:00
K Prasch d28041da5c
Merge pull request #1850 from cygnusv/fix-954
Test ReEncryptionValidator library constants
2020-04-08 14:09:14 -07:00
David Núñez abdc5e76fb Finally, Solidity 0.6 now allows to test library constants (Fixes #954) 2020-04-06 22:09:11 +02:00
Kieran Prasch 93ca641441
Respond to RFCs; Sensor -> Tracker; Testing touch up/follow up. 2020-04-06 12:14:06 -07:00
vzotova 0b2d0000b9 WorkLock: make some fields immutable 2020-04-06 18:24:58 +03:00
vzotova aa208533e7 Solidity: change string signatures to bytes selectors 2020-04-03 15:32:50 +03:00
vzotova c89e539761 Update solidity version in contracts 0.5.3 -> 0.6.1 2020-04-03 15:31:43 +03:00
David Núñez 5874779a9f
Merge pull request #1788 from vzotova/staking-contracts-updates
Staking contracts updates
2020-04-01 21:55:52 +02:00
K Prasch 9bc98a0384
Merge pull request #1800 from vepkenez/upload-limits-1743
Limit data size posted to Nucypher nodes to 50k
2020-04-01 09:28:20 -07:00
vzotova 48379354bc Apply suggestions from code review #1788
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
2020-04-01 16:31:06 +03:00
vzotova 69d535ef21 StakingContracts: refactoring for tests 2020-04-01 16:31:06 +03:00
vzotova 65c0b3ec1e StakingContracts: move some logic from PreallocationEscrow to AbstractStakingContract 2020-04-01 16:31:05 +03:00
vzotova 7e01311e1f Refactoring for intercontract test 2020-04-01 16:31:05 +03:00
vzotova ce684cce54 StakingInterface: worklock commands 2020-04-01 16:31:05 +03:00
vzotova d8faa0be47 StakingContracts: anyone can send ETH to StakingContract, withdrawal policy fees to StakingContract to more control on on financial flows 2020-04-01 16:31:04 +03:00
Kieran Prasch 8ed44d60b8
Cleanup Ursula stopping services, prevent halting of reactor via health checks in test; test touch ups. 2020-03-31 11:18:39 -07:00
Kieran Prasch 651a471ff0
Dont assume the pruning task in running in tests; Keep initial impression of fleet state in Ursula Init. 2020-03-31 11:05:25 -07:00
Kieran Prasch 285715e290
Respond to RFCs in PR #1462; Implement RestMiddleware client for self-health checks. 2020-03-31 11:05:25 -07:00
Kieran R. Prasch f4895ae1e9
Network level availability score testing; Exception handling for status flow control. Make Excuses.
Co-authored-by: derekpierre <derek.pierre@gmail.com>
2020-03-31 11:05:25 -07:00
Kieran R. Prasch 64786b572d
Allow opt-out for uptime checks via configuration and disable it during tests by default. 2020-03-31 11:05:25 -07:00
Kieran R. Prasch d6df4af401
Passing tests with @michwill's scoring suggestions. 2020-03-31 11:05:25 -07:00
Kieran R. Prasch e02628b032
Understand 1.0 to indicate higher availability. 2020-03-31 11:05:25 -07:00
Kieran R. Prasch b055d40c4f
Building on threaded tests for self-checks. Fixes several design bugs caught in-test on AvailabilitySensor. 2020-03-31 11:05:25 -07:00
Kieran R. Prasch 5c9fb6823f
Demonstrates a method to test self-availablity checks in successful conditions 2020-03-31 11:05:25 -07:00
Kieran R. Prasch 2b8533abb8
Sheepish attempt at threading availability loop tests. 2020-03-31 11:05:25 -07:00
David Núñez e0233dc8ac
Merge pull request #1764 from vzotova/se-pre-allocation
StakingEscrow pre-allocations
2020-03-31 02:55:44 +02:00
vzotova 6b97e4e330 StakingEscrow: multiple sub-stakes for multiple stakers in batch deposit 2020-03-27 19:29:33 +03:00
vzotova 3449c2f873 StakingEscrow: batch deposit with one sub-stake 2020-03-27 19:29:33 +03:00
vzotova 272764e5dc StakingEscrow: refactoring of life cycle to allow deposit before initialization 2020-03-27 19:29:32 +03:00
vzotova 47725576e1 WorkLock: manual shutdown 2020-03-27 19:28:47 +03:00
Kieran Prasch a26daf57b5
Renames TransactingPower init kwarg to account. 2020-03-26 14:55:38 -07:00
Kieran Prasch 16de6ffa56
Web3Client -> EthereumClient 2020-03-26 14:55:38 -07:00
Kieran Prasch 4e17bbe70b
Test implementing mocked HW wallet via Web3 signer; Cleanup. 2020-03-26 14:55:38 -07:00
Kieran Prasch 9c1aec73af
refining tpower and signer exception handling, in tandem. 2020-03-26 14:55:38 -07:00
Kieran R. Prasch 4e972b994e
Use signer on character.init and web3signer as TPower default. 2020-03-26 14:55:36 -07:00
Kieran R. Prasch 027adbfdc7
Implements extracted signers in Character configuration and init, tests to follow. 2020-03-26 14:53:40 -07:00
Kieran R. Prasch 1685c37407
Moving TPower in a single account signer-based backend. 2020-03-26 14:53:40 -07:00
damon 7b492a195c fix test conditions on test_mixed_configurations 2020-03-26 14:04:36 -07:00
damon a437feac9a hendrix handles content length validation 2020-03-26 13:26:03 -07:00
damon 308d354fd6 implement non-working flask implementation of MAX_CONTENT_LENGTH 2020-03-26 13:26:03 -07:00
David Núñez e4f37cbc0e
Merge pull request #1803 from vzotova/fix-refund
Forbid a refund before claiming tokens in WorkLock
2020-03-25 16:34:16 +01:00
vzotova 232802dfb1 WorkLock: forbid refund before claiming tokens 2020-03-25 11:59:51 +03:00
David Núñez 2d2be8f5b3 Withdraw unspent bid amount as part of claiming and remove it as independent command 2020-03-22 16:05:42 +01:00
K Prasch 5fe81dc65d
Merge pull request #1773 from vzotova/worklock-updates-opt4
🐳 Worklock updates (option 4)
2020-03-19 10:21:11 -07:00
vzotova ce6e63171b Apply suggestions from code review #1773
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
Co-Authored-By: K Prasch <kieran@nucypher.com>
Co-Authored-By: David Núñez <david@nucypher.com>
Co-Authored-By: Arjun Hassard <arjunhassard@gmail.com>
2020-03-19 12:27:25 +03:00
vzotova c3b47eed72 WorkLock: withdrawal pattern for force refund
Co-Authored-By: David Núñez <david@nucypher.com>
2020-03-16 18:34:18 +03:00
vzotova f3831e768e WorkLock: updates agent, actor and CLI layers to work with bonus part of bid 2020-03-14 13:38:21 +03:00
vzotova f69e23864a WorkLock: tokens splitted into base part (min stake) and bonus part 2020-03-14 12:00:24 +03:00
vzotova fde134a398 Apply suggestions from code review #1732
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
2020-03-13 23:01:01 +03:00
vzotova 18bffc15c1 WorkLock: method to cancel distribution when not enough bidders 2020-03-13 22:59:05 +03:00
vzotova 38ddc5e591 WorkLock: force refund at CLI, actor, agent layers 2020-03-13 22:57:39 +03:00
vzotova 0bd4cd98ca WorkLock: force refund to whales 2020-03-13 22:47:04 +03:00
vzotova 41cbd542ee WorkLock: small refactoring of methods and tests 2020-03-13 22:31:38 +03:00
vzotova 8571f220f4 StakingEscrow: reorganize tests for max/min allowed locked tokens 2020-03-13 21:51:07 +03:00
vzotova bc618284af WorkLock: checking all bids to prevent exceeding max allowable stake 2020-03-13 21:51:06 +03:00
vzotova db6dea77f3 WorkLock: tracking all bidders 2020-03-13 21:51:06 +03:00
vzotova a2deca9eb8 WorkLock: cancellation window 2020-03-13 21:51:05 +03:00
vzotova 5c719dd1a9 New constraints in WorkLock: minimum allowed bid, cancellation only during bidding, removed unclaimed tokens 2020-03-13 21:51:04 +03:00
vzotova a8f0ab3eee WorkLock: improve ABI: extracted calculating available refund 2020-03-13 21:50:35 +03:00
K Prasch ab978c09be
Merge pull request #1759 from KPrasch/configurate
Offline Configuration Selection
2020-03-13 10:56:05 -07:00
Kieran Prasch 489c048712
KeyStore -> Datastore 2020-03-09 14:50:18 -07:00
damon 457151635a
add test hooks and test for expiring cfrags working 2020-03-09 13:45:26 -07:00
Kieran R. Prasch 4b82f6261f
Forging a test for auto arrangement pruning with a twisted clock. 2020-03-09 13:45:26 -07:00
Kieran Prasch eb32902704
Keep missing configuration tests passing; Always use mocked registry source. 2020-03-05 10:02:20 -08:00
Kieran Prasch cf1ca2093f
Interactive network selection; Touch ups. 2020-03-03 09:17:09 -08:00
Kieran R. Prasch 7e5cd1c42c Adding configurable gas strategy to Alice/Bob; Work around for embedded JSON IPC emitters. 2020-02-27 15:44:41 -07:00
David Núñez 7e1dec2950
Merge pull request #1662 from vzotova/rate-range
[DO NOT MERGE YET] Reward rate range
2020-02-27 12:05:03 -08:00
David Núñez 0dcdf51fc8
Merge pull request #1738 from cygnusv/activate-network
Allow to deploy a network in idle mode. Activate later
2020-02-26 15:40:38 -08:00
tuxxy 87534a944d Handle InvalidSignature and add to suspicious activities and log the offense 2020-02-25 05:33:05 +01:00
tuxxy 8b2ac8106d Learn from a teacher who provides improperly signed payloads 2020-02-25 03:09:22 +01:00
David Núñez c63c754c89 Test showing how a manual deployment of an idle network is done 2020-02-24 15:29:11 -08:00
David Núñez db85663e05 Use new deployer mode everywhere else 2020-02-24 11:37:32 -08:00
Kieran R. Prasch 891dd04d2a Cleanup: No need to pass --staker-address. Support get_worker_config_in_tests. 2020-02-23 19:20:17 -07:00
Kieran R. Prasch f858ede235 Setup optional bonding timeout and settable poll rate for Workers. 2020-02-23 19:20:17 -07:00
Kieran R. Prasch 728793b24a Monkeypatch registry source fetching in CLI reconfiguration tests. 2020-02-23 19:20:17 -07:00
tuxxy 0a0a083f62 Going a different direction, make block_until_bonded a staticmethod for Worker init 2020-02-23 19:20:17 -07:00
tuxxy 44739108c6 Add worker_is_bonded static method and include in worker tests 2020-02-23 19:20:17 -07:00
David Núñez 4fb7d0efa4 Show how to activate StakingEscrow using its deployer 2020-02-23 09:00:58 -08:00
David Núñez aaf9f32734 Trying to stake when network is idle should fail 2020-02-23 08:28:36 -08:00
David Núñez 29ba116e42 Test for deploying network contracts with StakingEscrow in idle state 2020-02-22 17:11:55 -08:00
David Núñez e55ccf2341 More general deployment modes: Meet Bare, Idle and Full
Idle = Deploy contract in 'idle' state, without activation
2020-02-22 17:11:55 -08:00
David Núñez 5968b519d8 Clean and simplify some deployers logic 2020-02-22 17:11:55 -08:00
vzotova 0dd1f90c14 Apply suggestions from code review #1730
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
Co-Authored-By: K Prasch <kieran@nucypher.com>
2020-02-22 11:38:31 +03:00
vzotova 7a25f2ca0d Fix #1726 2020-02-21 15:49:25 +03:00
vzotova 4188cc673f Set min rate for a staker in actor, agent and CLI layers 2020-02-20 12:05:50 +03:00
vzotova 3816151cf9 Method for setting range of min reward rate in actors, deployers and CLI layers 2020-02-20 12:03:48 +03:00
vzotova 633b87ebfb PolicyManager: min reward rate range 2020-02-20 12:03:48 +03:00
Kieran R. Prasch bcbbec9016 Fixes missing bytes caster on CLI test. 2020-02-19 20:53:39 -07:00
Kieran R. Prasch 3f3386d360 Allow for forcible blockchain interface registration for tests. 2020-02-19 20:53:39 -07:00
jMyles 0a1d2a5282 Compatibility with changes to middleware and side channel fixture. 2020-02-16 18:42:09 -07:00
jMyles 18ce406bce Pushing arrangement query down to new agent methods. 2020-02-16 17:47:25 -07:00
jMyles dbcbc26cba Test showing that paying the wrong nodes results in Ursula noticing and refusing to service the Policy. 2020-02-16 16:33:15 -07:00
jMyles e7e26c5cc3 Moving freeriding attacks to their own module. 2020-02-16 12:29:10 -07:00
jMyles ed56c78d74 Test showing the 'safeguards removed' variant of trying not to pay. 2020-02-16 11:06:10 -07:00
jMyles 624242d791 Don't need capsule side channel here anymore. 2020-02-15 19:47:09 -07:00
jMyles cf07c3add6 Why wasn't blockchain side channel always compatible with the federated one? 2020-02-15 17:58:48 -07:00
jMyles f0d7781ef5 Fixing up sinpa test to use Amonia. 2020-02-15 17:57:58 -07:00
David Núñez 0faff6f45a Test demonstrating how Alice can do a "sinpa" (dine and dash)
Fake it till you make it

(This commit was modified by @jMyles to depict the attack in a separate test rather than modifying test_decentralized_grant in place.)
2020-02-14 12:26:39 -07:00
vzotova 9f13dc81d9 StakingEscrow: separate event for `prolongStake` 2020-02-13 23:16:08 +01:00
vzotova 030eda725f Apply suggestions from code review #1652
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
2020-02-13 23:16:03 +01:00
vzotova ab0bad144e Small fixes for duration ranges in stake cli 2020-02-13 23:15:22 +01:00
vzotova b26f3993eb Fix for duration of sub-stake in case when winding down is disabled 2020-02-13 23:14:28 +01:00
vzotova 16757e32a2 Contracts: public -> external where possible 2020-02-13 23:14:28 +01:00
vzotova 546fc83b44 Rename _totalSupply to _totalSupplyOfTokens to prevent variables shadowing 2020-02-13 23:14:28 +01:00
Kieran R. Prasch 6f9e89d826 Cleanup grant lifecycle tests 2020-02-13 13:40:42 -07:00
Kieran Prasch 18be53f5a5 Tests backing up CLI inline config; worker IP envvar to support. 2020-02-13 13:40:42 -07:00
Kieran Prasch eb916afa52 Special handling of Alice grant CLI options; 2020-02-13 13:40:42 -07:00
David Núñez a91f0d26a2 Since we use agency_local_registry fixture now, remove registry mock in test_felix
Really closes #1346
2020-02-13 11:19:55 -07:00
David Núñez 4b161121c2 WorkLock deployment parameters for tests are hard-coded in token_economics fixture
TODO: do something better about it
2020-02-13 11:19:55 -07:00
David Núñez de0ced9518 Fix problems with bidder initialization in WorkLock CLI 2020-02-13 11:19:55 -07:00
David Núñez f5816de34b
Merge pull request #1672 from vzotova/fix-1671
Fixes bug in PolicyManager #1671
2020-02-13 14:08:04 +00:00
vzotova 9aa49f57f0 Ignoring broken state in `PolicyManager.rewardState` with possibility to fix it later 2020-02-11 21:48:16 +03:00
vzotova b7098590e6 Reproduce scenario from #1671 2020-02-11 19:15:12 +03:00
vzotova c17653b535 Restrict checks in `PolicyManager.register()` and `PolicyManager.createPolicy()` to prevent inconsistent state 2020-02-11 17:17:35 +03:00
damon c d389e075e3
Merge pull request #1330 from nucypher/birdcage
[EPIC] Birdcage: A PR for people who want to pretend to like Bob.
2020-02-10 15:34:46 -08:00
jMyles 90a3c26298 Finishing the layup for which @michwill set me up vis a vis TreasureMaps being passed through Bob's controller. 2020-02-10 13:09:15 -08:00
jMyles 4f8e266bf6 Use live message kit in spec test for forward compatibility. 2020-02-10 13:09:15 -08:00
jMyles f164382164 Use live TreasureMap in spec test for forward compatibility. 2020-02-10 13:09:15 -08:00
jMyles 40f329db1b Now that we're resetting the side channel in a fixture, each tests starts with the first message. 2020-02-10 13:09:15 -08:00
jMyles 6b6e07ec46 An empty or intentionally misleading TreasureMap warrants a more severe Exception than NotEnoughUrsulas: introducing TreasureMap.IsDisorienting 2020-02-10 13:09:15 -08:00
jMyles fb2f03e307 Resetting side channel bewteen fixture runs so that message is unchanged. 2020-02-10 13:09:15 -08:00
jMyles 76e83cda50 Reducing scope of fixture. See: https://ptb.discordapp.com/channels/411401661714792449/411401661714792451/667904759956504577 2020-02-10 13:09:15 -08:00
jMyles 6490af67c8 Touch-ups around failing tests. 2020-02-10 13:09:15 -08:00
jMyles 3ce055561d Test compatibility for unpacking message kits. 2020-02-10 13:09:15 -08:00
tuxxy 96aab3701f Add JSON serialization methods to 'PolicyCredential' 2020-02-10 13:09:15 -08:00
tuxxy 32a95ffd71 Add 'credential' method on 'Policy' w/ consistency tests 2020-02-10 13:09:15 -08:00
Michael Egorov 16ad56c934 Fix merge conflicts 2020-02-08 04:27:34 -08:00
Michael Egorov 99681680d6 Check text returned by federated_bob.retrieve 2020-02-08 04:27:34 -08:00
Michael Egorov c920cf44a5 Test treasure_map in character control 2020-02-08 04:27:34 -08:00
Michael Egorov c70e8e2216 Bob.retrieve() accepting an optional treasure map works 2020-02-08 04:27:34 -08:00
Michael Egorov f5c85e9c72 Test if Bob can decrypt with the treasure map (he can't yet) 2020-02-08 04:27:34 -08:00
jMyles fe840cfd13 Test showing multiple messages from multiple Enricos in a single Adventure. 2020-02-08 04:27:34 -08:00
jMyles 04a96b54a2 Test showing failure of multiple-Capsule retrieval - see #1359. 2020-02-08 04:27:34 -08:00
jMyles f87eb322f9 Pausing console logging instead of stopping and starting. 2020-02-08 04:27:34 -08:00
jMyles e73e1e5765 Temporarily ceasing console logging right before click invocation. 2020-02-08 04:27:34 -08:00
jMyles bd679888d9 Adding logging around consecutive retrieval test. 2020-02-08 04:27:34 -08:00
jMyles 7a115f65f0 Logging statements around Bob patching. 2020-02-08 04:27:34 -08:00
jMyles 1e33857dd5 Battle of the mocks: another finally block. 2020-02-08 04:27:34 -08:00
jMyles 7ac8374c07 Passing ciphertext(s) as positional. 2020-02-08 04:27:34 -08:00
jMyles 0cdcc523b7 Re-patching LocalContractRegistry.read in a finally block. Fixes #1346. 2020-02-08 04:27:31 -08:00
jMyles ce86d7dd0f capsule_side_channel() doesn't return the Enrico anymore; it's composed. 2020-02-08 01:18:51 -08:00
jMyles bd49d39696 blockchain bob using new retrieve API. 2020-02-08 01:18:51 -08:00
jMyles 067369ed45 Various bugfixes and other accounting for changes since the cherry-picks below. 2020-02-08 01:18:51 -08:00
jMyles c3ea0377e0 Have Bob retrieve again, just to be absolutely clear that it now works back-to-back by default. 2020-02-08 01:18:51 -08:00
jMyles 6c73075867 I don't like the sound of that. 2020-02-08 01:18:51 -08:00
jMyles 1a34a2a60a New Bob CLI test to show retrieve(). 2020-02-08 01:18:51 -08:00
jMyles 70952329c3 Unpacking message kits into retrieve(). 2020-02-08 01:18:51 -08:00
jMyles 24ab7a6e4f Test showing multiple-Enrico retrieve. 2020-02-08 01:18:51 -08:00
jMyles dc202da06e Include enrico instance when resetting capsule_side_channel for test convenience. 2020-02-08 01:18:51 -08:00
jMyles 447b9b6e5c We don't need the temporary download_registry fix anymore. 2020-02-08 01:18:51 -08:00
jMyles 5f0c7ce5ef Several test fixes, most notable including that, in the capsule_side_channel fixture, we now keep the same enrico until it is reset(). 2020-02-08 01:18:51 -08:00
jMyles da2d2a0be1 Showing multiple retrievals in network without retaining CFrags. 2020-02-08 01:18:50 -08:00
jMyles 3b9cb9212a Better WorkOrder repr; updating tests to be more precise for replete WorkOrders. 2020-02-08 01:18:50 -08:00
jMyles 9acac0cb0d Saving replete WorkOrders where appropriate. 2020-02-08 01:18:50 -08:00
jMyles c4937b78bf Introducing designation of a WorkOrder that is 'replete' with CFrags for each PRETask. 2020-02-08 01:18:50 -08:00
jMyles 74fa1803ab Fixing up retrieve() params, adding type hints. 2020-02-08 01:18:50 -08:00
jMyles 404446b7ac Removing the 'cache' conceptr from work_orders_for_capsule. 2020-02-08 01:18:50 -08:00
jMyles 305fffdbf6 Single-track for incomplete WorkOrders. 2020-02-08 01:18:50 -08:00
jMyles 1957507a09 Not saving pending WorkOrders anymore; only completed. 2020-02-08 01:18:50 -08:00
jMyles c74f465e8d Always include completed WorkOrders. (Though we'll remove this entirely soon.) 2020-02-08 01:18:50 -08:00
jMyles f507952a14 Starting to separately store WorkOrders on Bob. 2020-02-08 01:18:50 -08:00
jMyles 55f96bdc38 Splitting the argument previously called 'cache' into three more coherent and granular parameters. 2020-02-08 01:18:50 -08:00
jMyles 677c8ddcfb When generating WorkOrder, if CFrags are being retained, return two tuples of WorkOrders - one complete, the other incomplete. Also some refactoring. 2020-02-08 01:18:50 -08:00
jMyles 577dc0fe0a Test showing complete flow of both Bob modes. 2020-02-08 01:18:50 -08:00
jMyles 7aab0c64c6 Test showing that Bob can't partially retrieve and then resume without caching. 2020-02-08 01:18:49 -08:00
jMyles 9aaf696fb5 Bob retrieves again! 2020-02-08 01:18:49 -08:00
jMyles adba29ec1b Affirmatively setting reuse_already_attached to False to show that this works the first time. 2020-02-08 01:18:49 -08:00
jMyles 630dec68c0 A test for Bob using a CFrag attached to a previously completed WorkOrder. 2020-02-08 01:18:49 -08:00
jMyles 78bad1cad1 Fixing up frag handling tests for new API. 2020-02-08 01:18:49 -08:00
jMyles a0b5ea7393 Testing show successful second retrieval. 2020-02-08 01:18:49 -08:00
jMyles 83e44a63f2 Not necessarily generating new WorkOrders anymore; maybe looking them up. And they aren't necessarily 'generated' anymore; they're instead just known to be useful. 2020-02-08 01:18:49 -08:00
jMyles 0cb4f71709 Beginnings of a test; clearer logs. 2020-02-08 01:18:49 -08:00
Kieran R. Prasch 22ccdb4d68 Rebase touchups; bobkey spec bugfix. 2020-02-07 13:26:40 -08:00
David Núñez c756b4ef14 Use new agency_local_registry fixture for CLI tests, and fix broken tests
Previously, we were supporting the consistency of our registry usage in a weird combination of fixtures' side-effects. Not anymore. CLI tests should use agency_local_registry, since it's a file-based mirror of the test_registry fixture when agency is assumed.
2020-02-07 11:28:34 +01:00
David Núñez 1356346533 Fix test for CLI multisig deployment. Remove unused registry fixture 2020-02-07 11:22:08 +01:00
David Núñez 2f090b3b44 First pass at CLI command to build upgrade TX via MultiSig: nucypher-deploy upgrade --multisig ... 2020-02-07 11:22:08 +01:00
David Núñez 554ce00923 First pass at deploying MultiSig contract with nucypher-deploy
* Adapting ContractAdministrator to additional, optional deployers (e.g, for MultiSig)
* Adds option --parameters to nucypher-deploy that allows to pass override arguments for contract deployment. Intended usage is MultiSig constructor arguments, but can be potentially used in other contracts (e.g., custom args to NuCypherToken).
* Tests for MultiSig deployment with the CLI
2020-02-07 11:22:08 +01:00
David Núñez 0058230c3d Janitorial stuff 2020-02-07 11:22:08 +01:00
David Núñez 4aeb64486e Touches to MultiSigDeployer and MultiSigAgent. Tests for both 2020-02-07 11:22:08 +01:00
David Núñez 88a365ac18 Obtain upgrading transactions for Dispatcher.upgrade()
Uses the new BlockhainInterface.build_transaction() endpoint to construct unsigned transactions.
The unsigned transactions in this commit are the raw data that is signed by MultiSig participates during a contract upgrade.
2020-02-07 11:22:08 +01:00
David Núñez 9a6a8be976 Touches to MultiSigAgent and MultiSig actors 2020-02-07 11:22:07 +01:00
David Núñez b311430490 First pass on block confirmations at the BlockchainInterface layer - see #1194 2020-02-07 11:22:07 +01:00
damon d656142974 field validation, tests, squashed 2020-02-06 03:23:19 -08:00
Kieran R. Prasch a3ee748555 Accomodate the usage of --rate for granting via LCI specs; Post rebase cleanup. 2020-02-06 03:23:19 -08:00
damon fcb9763959 handle kwargs based requests
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
2020-02-06 03:22:42 -08:00
damon 75a84ffad9 remove specifications mappings
remove specifications references
remove bad idea
2020-02-06 03:22:06 -08:00
damon 44ce4b475f move nucypher command decorator to CharacterPublicInterface
fix rpc_control_blockchain test
2020-02-06 03:21:59 -08:00
Kieran R. Prasch 71a7fc7a1c Passing RPCController tests 2020-02-06 03:21:59 -08:00
Kieran R. Prasch 763e295299 Deprecates character control decorator in favor of new command specification API (successful policy creation by RPC controller) 2020-02-06 03:21:59 -08:00
Kieran R. Prasch d34e6df0b6 Aiming to unify command specifications, controllers, validations, serilaizers with schema modeling (Needs adiitional follow up). 2020-02-06 03:21:59 -08:00
damon c9f0d6c540 fix failing test on invalid rpc input
handle TypeError in invalid RPC input
2020-02-06 03:20:50 -08:00
damon 865b547ce3 more detailed validation test 2020-02-05 11:21:33 -08:00
damon e5688bdb42 update specification validation test with new exception 2020-02-05 11:21:33 -08:00
damon e26bb7a6cf all alice control refactored, tests working 2020-02-05 11:21:33 -08:00
damon 52551da5da initial specifications refactor commit 2020-02-05 11:21:33 -08:00
K Prasch cd1466883e
Merge pull request #1645 from KPrasch/missing-worklock
Fixes #1644; Economics without Worklock enrollment
2020-02-03 13:01:56 -08:00
Kieran R. Prasch 59f369cd6b Expand worklock deployment test to cover economics instantiation before deployment. 2020-02-01 13:11:45 -08:00