Commit Graph

1955 Commits (0184ef91610d5a53b03b2ad2e1083bdd61deafd9)

Author SHA1 Message Date
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
Kieran R. Prasch 6081e2f2f7 Include basic html and json rendering tests. 2020-01-31 20:09:21 -08:00
Kieran R. Prasch 9554eb45a6 Implement ethSupply, Renames and Tweaks with @vzotova 2020-01-30 17:19:06 -08:00
Kieran R. Prasch ec78da448e Expose more worklock methods on agency; Adjust claim requirements.; CLI warning for small bids. 2020-01-30 14:18:18 -08:00
Kieran R. Prasch a720070c75 Adjust Bidder tests for new requirements; Use blocktime as reference. 2020-01-30 11:57:11 -08:00
Kieran Prasch c8c8b7d552 Respond to RFCs in PR #1550; Touch ups 2020-01-30 10:27:29 -08:00
Kieran Prasch f0ac200cb7 Detailing the higher level functionality of Bidder. 2020-01-30 10:27:29 -08:00
Kieran Prasch db899e8452 Relocate worklock with the rest of the cli commands 2020-01-30 10:27:29 -08:00
Kieran Prasch a6ca5cbd6f Respond to RFCs in PR #1550 2020-01-30 10:27:29 -08:00
Kieran Prasch bbcb9e649c Updates worklock API to work-based unlock without allocation deployments. 2020-01-30 10:27:29 -08:00
Kieran Prasch bb55ac05d7 Alternate suggestion for worklock claim; Fix import in estimate gas 2020-01-30 10:27:29 -08:00
Kieran Prasch df4de9d0c6 Support worklock bid cancellation via CLI - Clean up outstanding TODOs 2020-01-30 10:27:29 -08:00
Kieran Prasch b403b291de Passing worklock CLI tests: baseline, Test showing single contract deployment (sneaking in seeder as a plceholder for worklock without params ready). 2020-01-30 10:27:29 -08:00
Kieran Prasch 5570d20df5 Unblocked by dnunez - Init stake via worklock allocation and ind. registry. 2020-01-30 10:27:29 -08:00
Kieran Prasch cc9b000fa3 Tightening worklock CLI assertions based on the layer below. Blocked by inability to set-worker to worklock allocation. 2020-01-30 10:27:29 -08:00
Kieran Prasch 657bc0b9a5 Third pass on Worklock CLI under new design\ patterns 2020-01-30 10:27:29 -08:00
Kieran Prasch 606c15493a Tearing up worklock CLI for compadability with the latest implementations 2020-01-30 10:27:29 -08:00
Kieran Prasch 355d7ff887 Deprecates TestEconomics; Adds worklock supply and funding management - Extracts statistical methods to worklock agent. 2020-01-30 10:27:29 -08:00
Kieran Prasch b2bf0f487d Live coding with vicky! 2020-01-30 10:27:29 -08:00
Kieran R. Prasch fc45282964 Additional tests to cover worklock bid reading and test registry management for worklock agent test module 2020-01-30 10:27:29 -08:00
Kieran R. Prasch 5359ca9aec Trying to use deterministic preallocation address generation via worklock in tests. 2020-01-30 10:27:29 -08:00
Kieran R. Prasch 4652daa176 Reconstruction of worklock CLI tests (without consideration for preallocations) 2020-01-30 10:27:29 -08:00
Kieran R. Prasch 5ac52b1271 Integrating the worklock deployer with the rest of em' 2020-01-30 10:27:29 -08:00
Kieran R. Prasch ffd290cb59 Cherry-picking version 1 of the worklock CLI. 2020-01-30 10:26:37 -08:00
Kieran R. Prasch ae0b1d1734 Adds new contract function agency for worklock: refunds, cancellation, tests to match. 2020-01-30 10:26:37 -08:00
Kieran R. Prasch 717a84afd4 Incorporating new worklock contract functions into agents, deployers, and economics. 2020-01-30 10:26:37 -08:00
Kieran R. Prasch 82dbfcfe89 First steps to integrate worklock deployment params via economics 2020-01-30 10:26:37 -08:00
Kieran Prasch 5c3c6a00e8 Properly bond worklock to staking escrow at deploy-time. 2020-01-30 10:26:37 -08:00
Kieran Prasch 1fe806bc57 Expand deployment class registry to include aux. contracts, Include single contract deployment CLI integration test based on WorkLock. 2020-01-30 10:26:37 -08:00
Kieran Prasch cff807eaff Bidding agent tests. 2020-01-30 10:26:37 -08:00
Kieran R. Prasch e21a2da6c1 funding method for worklock deployer 2020-01-30 10:26:37 -08:00
Kieran Prasch 496f73680a Carving out worklock agent tests. 2020-01-30 10:26:37 -08:00
Kieran Prasch cdc8696855 Baseline Worklock deployer tests. 2020-01-30 10:26:37 -08:00
David Núñez 6d3db88a2d
Merge pull request #1627 from vzotova/force-solidity-version
Single version of solidity compiler
2020-01-30 18:18:34 +00:00
vzotova f4c2c4c668 solc bash installation script -> python script, to use solc version from the code 2020-01-29 17:01:11 +03:00
K Prasch a28584d63d
Merge pull request #1611 from cygnusv/fixes
Small fixes to grant: input validation, correct formatting of stakers' data from StakingEscrow
2020-01-25 15:24:49 -08:00
David Núñez 6d7c2abf13 Some input validation to `nucypher alice grant` 2020-01-24 12:07:26 +01:00
Kieran Prasch 46ab992c35
Allow seperate nucypher vs provider password for Felix 2020-01-23 11:44:24 -08:00
David Núñez c590538bbd Move "public" environment variables to `nucypher.config.constants` 2020-01-21 13:53:11 +01:00
David Núñez f1daae2463 Relocate NetworksInventory to nucypher.blockchain.eth.networks 2020-01-19 23:20:11 +01:00
David Núñez 3da6bdf087 Don't set globally a default domain in tests
Otherwise, tests are not modeling real behavior, where we don't have a default.
2020-01-19 19:58:38 +01:00
David Núñez 637a750b94 Make this test resistant to environments where the password envvar exists 2020-01-19 02:59:14 +01:00
David Núñez 4ca3ffe6de Adapt `nucypher stake` logic to inclusion of --network option 2020-01-19 02:59:14 +01:00
David Núñez b802af8223 A RegistrySourceManager for tests that only uses a tailored MockRegistrySource
It assumes that the only valid network is TEMPORARY_DOMAIN
2020-01-19 02:59:14 +01:00
David Núñez 0a64d09505 This test destroyed my local alice config file (╬ Ò ‸ Ó) 2020-01-19 02:59:14 +01:00
David Núñez fe55ffc42c Preoperative marking before replantation surgery
We want to connect learning to "registry" domains
2020-01-18 19:40:19 +01:00
Kieran Prasch 0db9f719cf
adjustments to wind down aagency test to acommodate prolong test. 2020-01-16 11:16:47 -08:00
Kieran Prasch d4cc1bd3c7
Code formatting suggestions; Ensure action period happens early 2020-01-15 11:48:53 -08:00
Kieran Prasch 923b2deb98
Prolong stake API and CLI entry; Deprecate Felix template and landing page 2020-01-15 11:48:53 -08:00
Kieran Prasch c28d5892bb
Introduces prolong stake agency and test 2020-01-15 11:48:53 -08:00
vzotova 06c588476f Fix after rebasing 2020-01-15 12:09:00 +03:00
vzotova 1cf543f0f1 Wind-down parameter for cli 2020-01-15 12:08:59 +03:00
vzotova 5648f41af7 Wind-down parameter for actors 2020-01-15 12:08:59 +03:00
vzotova 09e37375fe Wind-down parameter for agents 2020-01-15 12:08:58 +03:00
vzotova 6c5ef32aa2 Tests for wind-down parameter, wind-down parameter in PreallocationEscrow 2020-01-15 12:08:57 +03:00
vzotova a945c21ad3 Minor rename in test_intercontract_integration.py 2020-01-14 16:59:54 +03:00
vzotova b2d27046dd WorkLock: time-based lock -> stake-based lock, claim() locks token in StakingEscrow 2020-01-14 16:56:20 +03:00
derekpierre fe1a6c8fe4 The recommendation provided after detecting a missing configuration file was incorrect for the StakeHolder configuration.
Fix incorrect message for missing configuration file when default configuration file not found
2020-01-10 16:04:44 -05:00
David Núñez 345a09e2f8
Merge pull request #1459 from vzotova/policy
Policy refactoring
2020-01-10 10:42:33 +00:00
Victoria 35a0dd5528 Apply suggestions from code review #1459
Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
Co-Authored-By: David Núñez <david@nucypher.com>
2020-01-10 13:14:04 +03:00
vzotova bd7d5ac43a Fix for test_sampling_distribution 2020-01-10 13:14:04 +03:00
vzotova 3fd751b638 PolicyManager: revocation using owner's signature 2020-01-10 13:14:03 +03:00
vzotova d0396ac86c PolicyManager: split creator role into creator and owner 2020-01-10 13:14:02 +03:00
vzotova 5fa515d295 Moved some gas spending from createPolicy to confimrAcivity 2020-01-10 13:14:02 +03:00
vzotova 5acb9abf76 PolicyManager: fix reentrancy test and small optimizations 2020-01-10 13:14:02 +03:00
vzotova 2e94f2cc02 Update estimate_gas script for new start/end policy time 2020-01-10 13:14:01 +03:00
vzotova 3f888c8b51 Fix cli tests with policy creation 2020-01-10 13:14:01 +03:00
vzotova 4c983fc045 Update character layer for new start/end policy time 2020-01-10 13:14:00 +03:00
vzotova 513c5a491d Agent tests for start/end policy time 2020-01-10 13:13:20 +03:00
vzotova 24d56a03cc Inter contract test for new start/end policy time 2020-01-10 13:13:19 +03:00
vzotova 8a4f079087 Tests for new policy start/end timestamp 2020-01-10 13:13:19 +03:00
Bogdan Opanchuk 8e11c96054 Remove GroupGeneralConfig attributes asignment and replace it with method calls
Attributes don't do anything anymore
2020-01-10 11:10:53 +01:00
Bogdan Opanchuk fa96c4722d global_config: move `mock_networking` option to the characters that actually use it, remove `etherscan` completely 2020-01-10 11:10:53 +01:00
Bogdan Opanchuk 9197f302d6 Group CLI options into structures (including the general options, formerly click_config) 2020-01-10 11:10:53 +01:00
jMyles 757b292f0c Comment responding to @dnunez' question. 2020-01-10 01:17:14 -08:00
jMyles b0d23b309a Don't need this regression test anymore; it doesn't actually show anything terribly interesting about #1554. 2020-01-08 16:43:39 -08:00
jMyles 99096b01c7 Test showing #1554. 2020-01-08 16:43:39 -08:00
jMyles d6d73612bb This lives in learning tests now. 2020-01-08 16:43:39 -08:00
jMyles c510c3531e For test purposes, we need to mature the sprout to see its cert. 2020-01-08 16:43:39 -08:00
jMyles 923f2377ba These assertions don't work at the moment, though it's not clear how important that is. 2020-01-08 16:43:39 -08:00
jMyles 332d072c40 This needs to be eager now, as we won't verify (and thus get the tested warning) otherwise. 2020-01-08 16:43:39 -08:00
jMyles 264b18e232 The end of automatic mixed operating mode. Removes and cleans up lots of federated_only kwargs. Closes #410. 2020-01-08 16:43:39 -08:00
jMyles bab41dd398 This mock needs to know about the node now. 2020-01-08 16:43:39 -08:00
jMyles 93d1f7f3dc It is no longer the case that Alice will get NotEnoughNodes here; in fact she can't help but learn about (and verify) the nodes she needs at grant time. 2020-01-08 16:43:39 -08:00
jMyles b49dcf98b3 Some more optimizations to lower test time. 2020-01-08 16:43:39 -08:00
jMyles 092d9049db Facility to convert fake key to real one for testing. 2020-01-08 16:43:39 -08:00
jMyles e88d0bcf42 A few updates to performance mocks. Most notably, and strangest, a quick list of all the integers which, when cast to string along with the test string, produce a value in bytes which can't be used as a public key. Seemed like the simplest way to proceed, but I'm open to ideas. 2020-01-08 16:43:39 -08:00
jMyles 32593b432c Flask wants testing set to true in order for this to be treated like a test client. 2020-01-08 16:43:39 -08:00
jMyles 3f372d4053 Comments and new mocks for highperf Alice test. 2020-01-08 16:43:39 -08:00
jMyles 91e757b021 highperf mocked ursula fleet is now variable in size. 2020-01-08 16:43:39 -08:00
jMyles 949cea211a Up and down in the water?! A mock Bob for working with highperf mock Ursulas. 2020-01-08 16:43:39 -08:00
jMyles 703aeeee02 Need mock message verification in more places than were initially obvious. 2020-01-08 16:43:39 -08:00
jMyles 2e0fb975ae We need to be able to mock specific routes individually to test this. 2020-01-08 16:43:39 -08:00
jMyles d06b92cd45 Testing showing JIT validation of Ursula, with TODO showing where we might eventually do that. 2020-01-08 16:43:39 -08:00
jMyles 5de196329a New fixture for high-performance mocked Alice, which is compatible with Ursulas fixture in previous commit. 2020-01-08 16:43:39 -08:00
jMyles 377d88c81c Making fixture out of high-performance mocked ursulas. 2020-01-08 16:43:39 -08:00
jMyles 367195d5e7 Moving performance mocks to separate module. 2020-01-08 16:43:39 -08:00
jMyles dd9f866ba7 Collating all mocks needed to make high-performance mock ursulas. 2020-01-08 16:43:39 -08:00
jMyles 80778dc957 Pass entire class throug in order to instantiate NodeSprout or node instance. 2020-01-08 16:43:39 -08:00
jMyles 7df1fde295 New test module for discovery phases. 2020-01-08 16:43:39 -08:00
jMyles f7e90f4bc3 Updating test to account for use of NodeSprout. 2020-01-08 16:43:39 -08:00
jMyles bc6950dd8f Better tracking of mock verifications. 2020-01-08 16:43:39 -08:00
jMyles 0555018ff1 Test showing #1450. 2020-01-08 16:43:39 -08:00
jMyles cd29869ac4 Crazy web of patches. These are the minimum mocks required to produce 5000 Ursulas in the timeframe required for a test. 2020-01-08 16:43:39 -08:00
jMyles d329b98293 A fast mock public key. 2020-01-08 16:43:39 -08:00
jMyles 6a336aecbd Insane monkey patching block. This is how you make several thousand Ursulas in a test. 2020-01-08 16:43:39 -08:00
David Núñez ebb58ae48d Enter the Sidekick: assisting ContractAdministrator to deploy preallocation contracts 2020-01-03 12:13:53 +01:00
David Núñez 4e8caac910 Use approveAndCall also when creating a stake in StakingEscrow
* Reduces stake creation to a single TX
2020-01-03 12:13:53 +01:00
vzotova d1cb098d1e receiveApproval method for PreallocationEscrow 2020-01-03 12:13:53 +01:00
Kieran R. Prasch 88386c91f9 Respond to RFCs in PR #1536 2020-01-02 12:41:44 -08:00
Kieran R. Prasch 8cf8397726 Adjustments to config tests to loosen up a little and allow for config versioning to be seperately tested. 2020-01-02 12:41:44 -08:00
Kieran R. Prasch f501f6dedb Remove stale password assertions (UX no longer requires auth for 'view') 2020-01-02 12:41:44 -08:00
Kieran R. Prasch 4324618128 Disable hardcoded seednodes in conftest. 2020-01-02 12:41:44 -08:00
vzotova e66058530e Fixes #1349, enable re-staking by default 2019-12-26 13:21:12 +03:00
vzotova 4f0a49ff4a Upgradeability test revision 2019-12-26 13:01:11 +03:00
vzotova bb15e4bad1 Apply suggestions from code review #1407 2019-12-26 13:01:10 +03:00
vzotova 686a977f43 Test flag for StakingEscrow in administrator class 2019-12-26 13:01:10 +03:00
vzotova a473357eca Fix after rebasing 2019-12-26 13:01:10 +03:00
vzotova 6843f309f4 Reentrancy protection test for cancelBid 2019-12-26 13:01:09 +03:00
vzotova 3c000d5742 Fixed integration test 2019-12-26 13:01:08 +03:00