Commit Graph

1740 Commits (e949123a08c42adead8cc130d5d9372d857759ab)

Author SHA1 Message Date
Kieran R. Prasch 6bdfc6c331 Re-implements some ursula mocking via pytest-mock spy. 2019-09-06 11:59:01 +02:00
szotov 5588600ada Factory for economics, fixed tests 2019-09-04 18:20:02 +03:00
szotov 14086d538a Fix after rebasing 2019-09-04 13:24:03 +03:00
szotov 8646541619 Extended `init` in `StandardEconomics` 2019-09-04 13:24:03 +03:00
szotov 7be142a8d8 estimate_gas script uses custom parameters 2019-09-04 13:24:03 +03:00
szotov e9d2b1f3c7 Combine TokenEconomics and SlashingEconomics 2019-09-04 13:24:02 +03:00
szotov a36bf80dc8 Fix after rebasing 2019-09-04 13:24:02 +03:00
szotov f05454b855 Fix tests 2019-09-04 13:24:02 +03:00
szotov 44717dcca6 Split TokenEconomics into two classes 2019-09-04 13:24:01 +03:00
szotov 3ccc18082d Apply suggestions from code review 2019-09-04 13:24:01 +03:00
szotov 15c9a7569b Fixes #642 2019-09-04 13:24:01 +03:00
szotov adc7b3f826 Test for economics in contract 2019-09-04 13:24:00 +03:00
David Núñez f1b5ed4861 Additional functions in TokenEconomics for checking token supply 2019-09-04 13:24:00 +03:00
damon c 3cd061b152
Merge pull request #1294 from vepkenez/felix-live-rebased
Felix live
2019-09-04 03:02:45 -07:00
damon c cae5247bfe
Merge pull request #1280 from cygnusv/sample
Touches to StakingEscrow.sample()
2019-09-03 14:51:45 -07:00
damon 4120d6f293 reinstate felix eth distribution test 2019-09-03 11:45:52 -07:00
Damon C 5cec6ca322 amount tweaks 2019-09-03 09:08:07 -07:00
David Núñez 27d11090bb Test that sampling distribution is as expected. Closes #1019 2019-09-02 23:22:49 +02:00
David Núñez b75d6884ea Sets N=6 in test_blockchain_ursulas_reencrypt. Closes #1090. 2019-09-02 19:22:57 +02:00
David Núñez 4bb83cf180 Adapt sampling tests to new changes 2019-09-02 19:22:57 +02:00
Kieran R. Prasch 63d941117d Respond to RFCs in PR #1283. 2019-09-02 08:22:41 -07:00
Kieran Prasch 307bfe3ad6
Fixes #1283 - Allow staking to maximum amount per address. 2019-09-01 09:41:19 -07:00
Kieran Prasch 22fc7d16b4 Adapt PeriodTracker to WorkTracker; Geth client duration bug fix. 2019-08-31 11:32:25 -07:00
Kieran R. Prasch ea47bfa4c5 Disable account auto-relocking during pytests. 2019-08-30 21:05:57 -07:00
Kieran Prasch 43d2ff34fe
Add worker init flag to indicate insta-confirm. 2019-08-30 20:53:32 -07:00
Kieran Prasch aa73f9265e
Test demonstrating auto-confirmation via PeriodTracker and Twisted Clock. 2019-08-30 20:38:38 -07:00
Kieran Prasch 7afc134e6a
Fixes #1279; Uses injected registry to verify stranger-Ursulas with lazy StakingAgent. Use fallback storage backend. 2019-08-30 17:55:53 -07:00
Kieran Prasch c70ed348c0
Test replicating #1279 using the CLI. 2019-08-30 15:41:32 -07:00
Kieran R. Prasch 9941a3db7b
Rebase amendment for worklock divergence. 2019-08-30 11:08:35 -07:00
Kieran R. Prasch 25f0caa23c Post rebase adjustment for new auto provider detection support. Fixes for ursula receipt painting. 2019-08-28 06:41:37 -07:00
Kieran R. Prasch f6cf2b6dfd Fixes missing default filepath call; Better Exception handling for outdated configuration file. 2019-08-27 09:56:41 -07:00
Kieran R. Prasch feeeee133a new-stakeholder -> init-stakeholder 2019-08-27 09:56:41 -07:00
Kieran R. Prasch 4431d7966d Respond to RFCs in PR #1225; Use blake2b for registry cache key. 2019-08-27 09:56:41 -07:00
Kieran R. Prasch 64d40a7f80 Whoops! Restores 'address' and respectively 2019-08-27 09:56:41 -07:00
szotov 72f8b49501 Monkey patch to prevent gas adjustment in tests 2019-08-27 09:56:41 -07:00
Kieran Prasch b20cf2f6f6 Test fixes: Alter estimate gas to use blockchain factory; Restore accidentally renamed deployment files. 2019-08-27 09:56:41 -07:00
Kieran Prasch 58f34dac7b Checkpoint #4 - Fixes policy sampling bugs - continue reflow fixes. 2019-08-27 09:56:41 -07:00
Kieran Prasch 2a299aaca1 Checkpoint #3 - Reflow StakeHolder, Stake and Wallet Management. 2019-08-27 09:56:36 -07:00
Kieran Prasch 324c2805f5 Checkpoint #2 - Refactor Policy, and Blockchain / Registry Reflow. 2019-08-27 09:54:14 -07:00
Kieran Prasch 69aea3f725 Checkpoint: Refactors lifecycle of Blockchain and Registry. 2019-08-27 09:54:13 -07:00
derekpierre 213b42fe58 Return UnsuportedProvider exception instead of ValueError - update unit tests. 2019-08-24 13:56:26 +02:00
derekpierre f7787b87b4 Minor unit test fix. 2019-08-24 09:01:06 +02:00
derekpierre 74e2c0cf3a Code cleanup: log message and tests for auto file-scheme detection 2019-08-24 09:01:06 +02:00
derekpierre 172e2a9683 Add provider type detection test for websocket uri 2019-08-24 09:01:06 +02:00
derekpierre 6ece74cb00 Auto-detect 'file' uri scheme when an ipc file path is provided without a scheme and exists. This allows for auto-completion for file paths passed as --provider. 2019-08-24 09:01:06 +02:00
szotov ca79c0834f Renaming workDone -> completedWork, payor -> payer 2019-08-21 21:27:42 +03:00
szotov 71223cb00c Fix after rebasing 2019-08-21 21:27:41 +03:00
szotov 38d8361f35 Added new restriction to prolongStake 2019-08-21 21:27:40 +03:00
szotov c0c2319443 Fix after rebasing 2019-08-21 21:27:40 +03:00
szotov 60f341c3e0 Removed preDeposit method, fixed small issues 2019-08-21 21:27:38 +03:00
szotov 7c2e08872d Fix getRemainingWork in worklock, worklock in intercontract test 2019-08-21 21:27:38 +03:00
szotov 75865a2388 Events for worklock 2019-08-21 21:27:37 +03:00
szotov e6fff3973b Tests for worklock 2019-08-21 21:27:36 +03:00
szotov 895411d312 Added function to prolong stake 2019-08-21 21:27:36 +03:00
szotov c173fc1e4f Tests for work measurement 2019-08-21 21:27:34 +03:00
David Núñez 29a7fd8407 NUCYPHER_WORKER_ETH_PASSWORD envvar for Ursula. Workaround for #1205.
Require existence of at least one ETH account when prompted.  Fix #1207.
2019-08-18 11:59:37 +02:00
Kieran Prasch 9408463dec Refactor from_seed_and_stake_info to accept a checksum_address inclusive in the URI. 2019-08-18 11:58:04 +02:00
damon c 126c44a5fc
Merge branch 'master' into status 2019-08-08 12:52:45 -07:00
K Prasch 002a373189
Merge pull request #1203 from vepkenez/sync-fix
Improved Blockchain Syncing UX
2019-08-08 12:50:31 -07:00
Kieran Prasch 73c6da3ffe
Restore nucypher status CLI: Error handling and console painting; implement worker-staker speration. 2019-08-08 12:43:18 -07:00
Damon C 785eb1e796
Implements InfuraClient by adding an intermediate call to get the variant of a web3 client. 2019-08-08 12:42:41 -07:00
Damon C d93f9c8947 squashed test fixes, addressed PR review comments 2019-08-08 11:49:25 -07:00
damon c 674efa768d
Apply suggestions from code review
Co-Authored-By: MacLane S Wilkison <maclane@nucypher.com>
2019-08-07 18:42:47 -07:00
Damon C d9aa98b0cf tests for blockchain sync flow 2019-08-07 13:31:38 -07:00
David Núñez c21448d547 Improve UX of nucypher stake set_worker and detach_worker 2019-08-04 02:41:04 +02:00
David Núñez 88c6309369 Add a log entry during tests to mark begin and end of each test 2019-08-04 02:41:04 +02:00
David Núñez f0c28f8c0c Action nucypher felix destroy should come earlier 2019-08-04 02:41:04 +02:00
David Núñez 965a473bb5 Make sure bare contracts are updated in deployers' upgrade tests 2019-08-04 02:41:04 +02:00
David Núñez 586f7edb89 Deployers now hold explicit list of deployment steps 2019-08-04 02:41:04 +02:00
David Núñez d82afa6d25 Minor touchups 2019-08-04 02:40:58 +02:00
David Núñez 23d84ae22b Passing --no-registry correctly to characters' config 2019-08-03 21:49:01 +02:00
David Núñez 031ba817f1 Setting download_registry=False in test fixtures 2019-08-03 21:49:01 +02:00
derekpierre 3424ff6dc9 Update deployer class property to be more descriptive - "number_of_deployment_transactions" 2019-07-29 14:53:27 -04:00
derekpierre f4327e821e Added the ability for per-deployment step progress updates since these steps can take a long time.
It is worth noting that only progress is updated for individual steps - the printing of the receipt confirmation to the console is not done until all receipts (from the inidividual step) are received by the deployer.
Added unit tests for progress updates.
2019-07-29 14:53:27 -04:00
David Núñez 1bd2aae362
Adapt Ursula CLI tests to being asked for worker account password 2019-07-29 11:27:14 -07:00
David Núñez 8dcf5a799d
Remove second stamp substantiation. Fix #1091 2019-07-29 11:27:14 -07:00
David Núñez ca732b5a50
Add test_transfer_tokens to nucypher-deploy tests. Remove unused stuff. 2019-07-29 11:27:14 -07:00
Kieran Prasch 6392c1f42a
Do no ask for client passwork in stake CLI when using hw wallet flag, or dev chain is auto detected. 2019-07-26 10:15:34 -07:00
Kieran Prasch d8e6486283
Split keyring password collection into two functions and implement in CLI; Provides interactive account selection for Alice. 2019-07-26 10:14:41 -07:00
Kieran Prasch 2dd3e92868
Shortens CLI flag names to --provider and --teacher. 2019-07-26 10:14:41 -07:00
David Núñez a9f5c4a12b Implement and test nucypher stake detach-worker 2019-07-26 14:08:01 +02:00
Kieran Prasch 27fc89d106
Ensure CLI painting implements emitters; Emitter logic for stakeholder CLI. 2019-07-25 15:19:44 -07:00
Bogdan Opanchuk 0ce9458bf0
Create a console emitter only once (in NucypherClickConfig) and propagate it everywhere 2019-07-25 15:19:42 -07:00
Bogdan Opanchuk 3e17cd7c74
Remove duplicate options, move shared options definition and processing to NucypherClickConfig 2019-07-25 15:18:29 -07:00
Bogdan Opanchuk b473c0f4bd
Hide registering/unregistering observers and Sentry init inside utilities/logging
Also add a check that Sentry SDK is only initialized once
2019-07-25 15:18:29 -07:00
Kieran Prasch 9bca91d97d
Deploy CLI Touch Ups (Tested on local private chain). Restore Syncing TImeout. Mock ChainId RPC Endpoint in some client integration tests. 2019-07-25 15:18:29 -07:00
Kieran Prasch 30aa51c1f2
Mock to_config_file briefly to avoid writing to the default config root. 2019-07-25 15:18:29 -07:00
Kieran Prasch c4f14cb1f0
Deprecates funding account and account creation options. Touch up stake CLI. 2019-07-25 15:18:29 -07:00
Kieran Prasch 1b3e3e45e5
Respond to RFCs in PR #1111: Remove deployment transaction gas limit. 2019-07-25 15:18:29 -07:00
David Núñez 22166d0242
Fix bug in UserEscrowDeployer tests 2019-07-25 15:18:29 -07:00
David Núñez e5d91632b2
Adapt deployers and tests to handle receipts, not tx_hashes 2019-07-25 15:18:29 -07:00
David Núñez 2d383ba41c
Once per module, session_testerchain restores balance of accounts, at expense of coinbase ¯\_(ツ)_/¯ 2019-07-25 15:18:29 -07:00
David Núñez e60bbd2332
Use session_testerchain in actors tests. Let's start with Investigator 2019-07-25 15:18:29 -07:00
David Núñez c156437bbe
First draft of Investigator test 2019-07-25 15:18:29 -07:00
David Núñez 9899148b17
Get on-chain staking parameters with StakingEscrowAgent 2019-07-25 15:18:29 -07:00
David Núñez d317a7d1b0
Add missing AdjudicatorAgent assertion in test_deploy_cli 2019-07-25 15:18:29 -07:00
David Núñez 718a5244dc
PolicyAgent --> PolicyManagerAgent 2019-07-25 15:18:29 -07:00
David Núñez 1a90164a7b
Improve PolicyManagerDeployer tests. Adds upgrade & rollback 2019-07-25 15:18:29 -07:00
David Núñez 7030937629
Extract common fixtures for deployers tests 2019-07-25 15:18:29 -07:00
David Núñez 77b311ff40
Revamp of StakingEscrowDeployer tests. Add upgrade & rollback tests 2019-07-25 15:18:29 -07:00
David Núñez 6ca6c4cbcc
Testing failed init of StakingEscrowAgent due to contract not deployed 2019-07-25 15:18:29 -07:00
David Núñez 1e431741e3
Reusable, session-scoped testerchain PoC: Deployers test time down 37% 2019-07-25 15:18:29 -07:00
David Núñez 2b8ec61556
Restore initial design of UserEscrowProxy.deploy() 2019-07-25 15:18:29 -07:00
David Núñez f100d39630
"Deployer" actor is now called "DeployerActor", to avoid confusion with deployers 2019-07-25 15:18:29 -07:00
David Núñez 434bb7072a
Fix error in test_user_escrow_deployer (see #1106) 2019-07-25 15:18:29 -07:00
David Núñez cef7e17279
UserEscrowProxyDeployer was incorrectly deploying a new Linker each time
New behavior is to look first for an existing Linker, and just in case it's not found, deploy it.
2019-07-25 15:18:29 -07:00
David Núñez f4325520dd
Fixtures can't use @pytest.mark.usefixtures
See warning in https://docs.pytest.org/en/latest/fixture.html#using-fixtures-from-classes-modules-or-projects
2019-07-25 15:18:29 -07:00
Kieran Prasch 017aba3743
Updates estimate gas with interactive deployment painting and Secrets namedtuple. 2019-07-25 15:18:29 -07:00
Kieran Prasch 4ee8c70860
Respond to RFCs in PR #1056. 2019-07-25 15:18:29 -07:00
Kieran Prasch 0b52cd2c74
Routes Ursula keyring attchment by federated/decentralized mode. 2019-07-25 15:18:29 -07:00
Kieran Prasch c8a95fba30
Skip transfer of rewards back to funding account for now. 2019-07-25 15:18:29 -07:00
Kieran Prasch c0f166e56a
Fix keyring checksum address multiple kwarg passing, add withdraw of inflation rewards to specified account or funding account. Touch up reward collection assertions. 2019-07-25 15:18:29 -07:00
Kieran Prasch 7508dc24c3
Use mocked blockchain interface connection within CLI subprocesses in two tests. 2019-07-25 15:18:29 -07:00
Kieran Prasch f947e6f747
Extracts manual staker and worker fixtures, Fixes incorrect address in to/from UrsulaConfiguration; Attempting to fix reward collection CLI integration tests. 2019-07-25 15:18:29 -07:00
Kieran Prasch 4b9b5f0559
Respond to RFCs in PR #1056; Test and CLI touch-ups. 2019-07-25 15:18:29 -07:00
Kieran Prasch fd5e5b236c
Adds CLI controls for inflation v. policy reward collection, extracts deployer action. 2019-07-25 15:18:29 -07:00
Kieran Prasch 2e70aebd01
Bug Fix: Functional inflation reward collection; Refactors internal stakeholder stake tracking 2019-07-25 15:18:29 -07:00
Kieran Prasch b83f8f9595
Move deployment secrets named tuple to Deployer and implement it. 2019-07-25 15:18:29 -07:00
Kieran Prasch 879afef6a7
Restore Federated CLI functionality; Refactor CLI lifecycle integration testing to implement --work-address 2019-07-25 15:18:29 -07:00
Kieran Prasch 28c1b39845
post #1029 rebase touch ups. 2019-07-25 15:18:29 -07:00
Kieran Prasch 73f606a31d
Restores staking CLI tests post #1029 via Stakeholder API. 2019-07-25 15:18:29 -07:00
Kieran Prasch cf0fd49008
Functional stakeholder persistence via CLI, Implements software-keyring entrypoints for StakeHolder; geth deploy integration testing. 2019-07-25 15:18:29 -07:00
Kieran Prasch 17aa2edd9f
Update ursula CLI tests to use new stake entry points 2019-07-25 15:18:29 -07:00
Kieran Prasch 7b16196765
Adds integration test for creating new geth accounts over RPC clients. 2019-07-25 15:18:29 -07:00
Kieran Prasch 362aff4824
Respond to RFCs in PR #1064 - Staker to/from blockchain, @michwill's funding account recipt fix; Touch Ups. 2019-07-25 15:18:29 -07:00
Kieran Prasch f7d780639d
BYOK for stakeholder and worker - Passing collect inflation reward test. 2019-07-25 15:18:29 -07:00
Kieran Prasch 13ed3501dc
xAdvance Stakeholder rewards integration testing. 2019-07-25 15:18:29 -07:00
Kieran Prasch e1cb849a3a
Improve Stakeholder API tests. 2019-07-25 15:18:29 -07:00
Kieran Prasch 7006891313
Updates stakeholder to used unified BlockchainInterface API 2019-07-25 15:18:29 -07:00
Kieran Prasch 3953da73ad
Detailing StakeHolder actions 2019-07-25 15:18:29 -07:00
Kieran Prasch d7b03de176
Second daraft of StakeHolder including JSON config. 2019-07-25 15:18:29 -07:00
Kieran Prasch 2e26f5753f
Respond to further RFCs in PR #1092.
Apply suggestions from code review

Co-Authored-By: David Núñez <david@nucypher.com>
2019-07-15 12:21:12 -07:00
Kieran Prasch 16e464fff5
Bug Fix: Allow TransactingPower to use cached password at activation time - credit to @cygnusv. 2019-07-15 12:06:44 -07:00
Kieran Prasch 6326340151
test touch-up. 2019-07-15 12:06:44 -07:00
Kieran Prasch 118262a9f4
Make accomodations for geth managed wallets (#1117) in TransactingPower. 2019-07-15 12:06:44 -07:00
Kieran Prasch 959c3dc35f
Ensure powerup activates in adjudicator agent and contract tests. 2019-07-15 12:06:44 -07:00
Kieran Prasch 70803d3e22
Post rebase renames. 2019-07-15 12:06:44 -07:00
Kieran Prasch f1cabadd8c
Improves TransactingPower unit and integration test coverage + Adjustments and touch ups to suit. 2019-07-15 12:06:44 -07:00
Kieran Prasch 56f4ec1844
Handle TransactingPower activation in estimate_gas.py 2019-07-15 12:06:44 -07:00
Kieran Prasch a5aef6f030
Manually call connect in client tests. 2019-07-15 12:06:44 -07:00
Kieran Prasch 7bb4c55e5c
Use TransactingPower.activate in Actor/Agent tests. 2019-07-15 12:06:44 -07:00
Kieran Prasch 98c04d1738
Remove nucypher deploy destroy-registry 2019-07-15 12:06:44 -07:00
Kieran Prasch 688572d5d3
Allows CLI-made characters to connect their blockchain interface through consuming the TransactingPower. 2019-07-15 12:06:44 -07:00
Kieran Prasch cda052b710
Handle being consumed, validate 'from' field in RPC tx requests. 2019-07-15 12:06:44 -07:00
Kieran Prasch dc22bdede0
post rebase BlockchainPower -> TransactingPower 2019-07-15 12:06:44 -07:00
Kieran Prasch e9a3fe7878
Powerups can be 'activated' - Returning to a single-account-based TransactingPower. 2019-07-15 12:06:44 -07:00
Kieran Prasch b9fa6310be
Basic TransactingPower functional test. 2019-07-15 12:06:44 -07:00
Kieran Prasch d1980f9662
Remove Trezor Imports and presence in setup.py; Deprecate libusb1 suport in-test. 2019-07-11 16:59:23 -07:00
tuxxy a21b01da18 Remove more deprecated device code 2019-07-11 15:39:06 -06:00
tuxxy 09f3370c1b Hack usb1 import to work on CI machines without libusb 2019-07-11 15:39:06 -06:00
tuxxy f107980c25 Add tests for device CLI skeleton 2019-07-11 15:39:06 -06:00
tuxxy c8e3a63a98 Move mock_trezorlib et al to conftest in tests.cli 2019-07-11 15:39:06 -06:00
tuxxy 44c218743b Move tests from wallet to device 2019-07-11 15:39:06 -06:00
tuxxy e4182b2b05 Add test for _reset and other unimplemented methods 2019-07-11 15:39:06 -06:00
tuxxy 438fe9ba7d Add test for call_handler_decorator and fix method declarations 2019-07-11 15:39:06 -06:00
tuxxy 632aa8c3e6 Add passing tests for trezor backend and change imports to work with mocking 2019-07-11 15:39:06 -06:00
David Núñez afbcff6b04 Introduce make_ursula_for_staker test utility, instead of activate_idle_staker fixture 2019-07-04 11:23:51 +02:00
David Núñez b4790ce976 Fix estimate_gas script: Adjudicator contract was already deployed. 2019-07-04 11:23:51 +02:00
David Núñez b301f02372 #1090: Use N=3 in test_blockchain_ursulas_reencrypt to reduce failures 2019-07-04 11:23:51 +02:00
David Núñez ad2d63fd5e Touchups to test_staker 2019-07-04 11:23:51 +02:00
David Núñez 9d0089102e Some improvements to PolicyManager and StakingEscrow deployer tests. See #1102 2019-07-04 11:23:51 +02:00
David Núñez f77c46bbe4 Basic tests of AdjudicatorDeployer and slashing with AdjudicatorAgent. 2019-07-04 11:23:51 +02:00
David Núñez 051bbbc02f Use testerchain.client.sign_message() in tests for EIP191 signatures 2019-07-04 11:23:51 +02:00
David Núñez f43365ca93 First stub of AdjudicatorAgent tests 2019-07-04 11:23:51 +02:00
David Núñez 31a40ab86c Deploy Adjudicator and instantiate AdjudicatorAgent singleton in agency fixture 2019-07-04 11:23:51 +02:00
David Núñez fd3b8603fa Touchups in some tests 2019-07-04 11:23:50 +02:00
David Núñez 5b530430dd Draft test for learning about worker with insolvent Staker. See #1075 2019-07-04 11:23:50 +02:00
David Núñez 3cdeba3c0b First stub of non-staking staker and worker fixtures. Closes #1035 2019-07-04 11:23:50 +02:00
David Núñez f6fac7c073 Adapting other adjudicator tests and gas estimation to latest changes 2019-07-04 11:23:50 +02:00
David Núñez 28eb4a16f1 Use blockchain_ursulas in test_adjudicator 2019-07-04 11:23:50 +02:00
David Núñez 1fbd679ff7 Include Ursula's identity evidence in WorkOrder and Evidence for slashing 2019-07-04 11:23:50 +02:00
David Núñez e53415e8b0 On-chain verification of EIP191 signatures now supports versions 0 and E 2019-07-04 11:23:50 +02:00
David Núñez ba5da0dfec Verify EIP191 signatures in SignatureVerifier
Not really an EIP191-compliant method, as it only supports version E, but this is what we currently use in nucypher
2019-07-04 11:23:50 +02:00
Kieran Prasch 420c30f079 Respond to RFCs in PR #1089 2019-07-04 11:23:50 +02:00
Kieran Prasch 46e424d49d Pretending to consume BlockchainPower in actor and agent tests. 2019-07-04 11:23:50 +02:00
Kieran Prasch 68b8a2735d Returning to a single-account BlockchainPower;TODO annotations for BlockchainPower. 2019-07-04 11:23:50 +02:00
Kieran Prasch 552fc461fc Updates estimate gas with new Testerchain API, completely removes calls to .transact() in nucypher nameapce. 2019-07-04 11:23:50 +02:00
Kieran Prasch bb3cce8465 Mock registry reads from disk in Felix CLI integration testing. 2019-07-04 11:23:50 +02:00
Kieran Prasch ebb6b422ac Add the ability to save an in-memory registry to disk. 2019-07-04 11:23:50 +02:00
Kieran Prasch 19d30b355c Adapting Felix to consume BlockchainPower at init-time. 2019-07-04 11:23:50 +02:00
Kieran Prasch 2ccc46b86a Refactor contract registry CLI integration testing to implement condensed Blockchain API. 2019-07-04 11:23:50 +02:00
Damon C aebac62dd8 remove most other direct blockchain.w3 references 2019-07-04 11:23:50 +02:00
Damon C 595293c4b5 cleanup access to blockchain.client properties 2019-07-04 11:23:50 +02:00
Kieran Prasch 898925c8ad Integrating more tests with condensed blockchain interface, straggler Mock BlockchainPower. 2019-07-04 11:23:50 +02:00
Kieran Prasch 5fb4aee80b Deployers implement BlockchainInterface.send_transaction 2019-07-04 11:23:50 +02:00
Kieran Prasch 08fe94fea7 Moving (mocked) BlockchainPower usage in the direction of TransactingPower; Touch-ups. 2019-07-04 11:23:50 +02:00
Kieran Prasch cd9b2366c8 Blockchain -> BlockchainInterface 2019-07-04 11:23:50 +02:00
Kieran Prasch 91bc12e06b Routes calls to .transact() through Blockchain via composed BlockchainPower (soon to be TransactingPower). 2019-07-04 11:23:50 +02:00
Kieran Prasch 963edebd74 Refinements for Testerchain, Integration with Capitalism, Touch-ups. 2019-07-04 11:23:50 +02:00
Kieran Prasch 1a2dabd095 Use Condensed Blockchain API in tests. credit to @vepkenez. 2019-07-04 11:23:50 +02:00
David Núñez 11e477c562 Consider @szotov's comment on setWorker: stakers have to wait to unset
The only way to use setWorker without waiting is that there's no worker set.
2019-07-04 11:23:49 +02:00
David Núñez 2150723cca Skip other tests affected by the lack of CLI for staking 2019-07-04 11:23:49 +02:00
David Núñez 903b06f59e Make Ursula.rest_interface() a property. Remove Character.rest_interface 2019-07-04 11:23:49 +02:00
David Núñez c9f7057dd3 Skip staking ursula tests until #1056 2019-07-04 11:23:49 +02:00
Kieran Prasch 35f39001c3 Removes assumption that last web3 account is non-staking, in dialog faut-tolerance test. 2019-07-04 11:23:49 +02:00
Kieran Prasch 14dd22427b Fix off-by-one error calculating stake end-period in Stake integration test. 2019-07-04 11:23:49 +02:00
Kieran Prasch d04094c1e9 Skip Vladimir tests in accordance with Issue #1075 2019-07-04 11:23:49 +02:00
Kieran Prasch 8ec8c40727 Optimize StakeTracker read operations, Handle stake tracker as part of UrsulaConfifguration.dynamic_payload 2019-07-04 11:23:49 +02:00
Kieran Prasch 75cd104c59 Extract StakeTracker from Worker/Staker 2019-07-04 11:23:49 +02:00
Kieran Prasch 2595623fa8 Passing character tests, adding a test for Vladimir 2019-07-04 11:23:49 +02:00
David Núñez 21bb66d0c3 Fix all network tests and almost all character tests. 2019-07-04 11:23:49 +02:00
David Núñez ecc656a205 Allow stakers to release workers in StakingEscrow 2019-07-04 11:23:49 +02:00
David Núñez 6638e7ea3a Workers must confirm activity directly. They can't do it via a contract 2019-07-04 11:23:49 +02:00
David Núñez 3a4df6adea Fix remaining tests in test_policy_manager_agent 2019-07-04 11:23:49 +02:00
Kieran Prasch 1868f96bdc API conversion -Implementing @transact receipt handing in-test. 2019-07-04 11:23:49 +02:00
David Núñez a85adfdc55 Fix actors/test_staker and agents/test_token_agent 2019-07-04 11:23:49 +02:00
David Núñez a8d77c40a9 Fix test_staking_escrow_agent tests. Start usingnew @transaction decorator. 2019-07-04 11:23:49 +02:00
David Núñez e1df9a7d1b Use stakers fixture in test_token_and_stake 2019-07-04 11:23:49 +02:00
David Núñez c728c1afe0 Introduce simple PRE lifecycle test with blockchain ursulas 2019-07-04 11:22:39 +02:00
David Núñez a6e839dfee New stakers fixture, consistent with blockchain_ursulas 2019-07-04 11:22:39 +02:00
David Núñez 6cd4d2fde3 Worker validation pursuant to consensus on #1003. Closes #1033. 2019-07-04 11:22:39 +02:00
David Núñez edb95407c3 StakingEscrowAgent API for checking staker-worker relationship 2019-07-04 11:22:39 +02:00
David Núñez 8b446a904b Change "by" to "from" in getWorkerByStaker and getStakerByWorker 2019-07-04 11:22:39 +02:00
David Núñez 54d12b8827 Ursula.rest_information()[0] --> Ursula.rest_interface() 2019-07-04 11:22:39 +02:00
David Núñez 357ff2a7cd Stakers will need their own test ETH accounts, different than Ursulas' 2019-07-04 11:22:39 +02:00
David Núñez 1387683e35 First stub of Worker class, extracted from Staker 2019-07-04 11:22:39 +02:00
David Núñez da8fd0c3de Missing renamings to "worker" and "staker" in agents.py 2019-07-04 11:22:39 +02:00
Kieran Prasch b98dfb9986 Respond to RFCs in PR #1066; Docstrings and annotations for Baseconfiguration. 2019-07-04 11:22:39 +02:00
Kieran Prasch 66b0e25165 Robust tests for BaseConfiguration API; Second layer for character configurations; Return of ABC. 2019-07-04 11:22:39 +02:00
Kieran Prasch 09c8847c14 Dehydration and cleanup of keyring attachment and checksum address selection. Touch ups. 2019-07-04 11:22:39 +02:00
Kieran Prasch add336af3f Ensure that known_nodes passed into configs are retained for re-use 2019-07-04 11:22:38 +02:00
Kieran Prasch b7012f607f NodeConfiguration -> CharacterConfiguration 2019-07-04 11:22:38 +02:00
Kieran Prasch 568420a9c6 Refinine NodeConfiguration to handle only common parameters; Dehydration and reorg. Optimize character config production file I/O. 2019-07-04 11:22:38 +02:00
Kieran Prasch 65d1b7aa51 Allow contract registry to write to a globally default location (config root) despite using a custom configuration root at init time. 2019-07-04 11:22:38 +02:00
Kieran Prasch 0565893be6 Accurately reflect destruction operations; Simplify usage; UrsulaConfiguration implements BaseConfiguration. 2019-07-04 11:22:38 +02:00
Kieran Prasch 701c7b5f15 CharacterConfiguration subclasses implemnt BaseConfiguration class attrs; Reorganize tests.config 2019-07-04 11:22:38 +02:00
Kieran Prasch d888c60607 Adds BaseConfiguration and Ursula standard configurations tests; Style touchups, Preserving 'checksum_address'. 2019-07-04 11:22:38 +02:00
David Núñez 9638dc86bf Fix name of StakingEscrowAgent. It was StakingEscrow 2019-07-04 11:22:38 +02:00
David Núñez b9dd215421 Fix test for emission of unknown LL version warnings. Closes #1039 2019-07-04 11:22:38 +02:00
David Núñez 9eee8e6c9d Removing some re-emerging garbage, probably from a rebase 2019-07-04 11:22:38 +02:00
David Núñez 398896d2ab Leftovers: Miner --> Staker, MiningAdjudicator --> Adjudicator, etc. 2019-07-04 11:22:38 +02:00
Kieran R. Prasch 877833aaf3 Understand Staker and Staking to be separate ideas. 2019-07-04 11:22:38 +02:00
Kieran R. Prasch 3a80eec247 Goodbye, Three Agents. Hello, Agency. 2019-07-04 11:22:38 +02:00
Kieran R. Prasch 5551ce950c MinerEscrow -> StakingEscrow, and MiningAdjudicator -> Adjudicator in agency, and in-test 2019-07-04 11:22:38 +02:00
szotov 33e97a9c2f miner->staker in tests and docs 2019-07-04 11:22:38 +02:00
szotov 821b0dcdbc Renamed miner-> staker in contracts 2019-07-04 11:22:38 +02:00
szotov fbe4493951 Changed restriction on miner<->worker relationship 2019-07-04 11:22:38 +02:00
szotov 69b21a2a85 Tests for worker events 2019-07-04 11:22:38 +02:00
szotov f237389ca7 Tests for slashing worker 2019-07-04 11:22:38 +02:00
szotov 946ec2b2f1 Added way to slash intermediary contracts 2019-07-04 11:22:38 +02:00
szotov 8747177c5a Moved minimum worker periods to constructor 2019-07-04 11:22:38 +02:00
szotov 1a76d9984b Fixed agent tests 2019-07-04 11:22:38 +02:00
szotov 727a074503 Added test for setting worker 2019-07-04 11:22:38 +02:00
szotov b545e3ec9b Fixed small issues, added setWorker to UserEscrow 2019-07-04 11:22:38 +02:00
szotov 8bc89805ff Fix agents tests 2019-07-04 11:22:38 +02:00
szotov f850a42f58 Added worker role, excluded minting and activity confirmation from lock method 2019-07-04 11:22:38 +02:00
jMyles 189a87399c Resetting side channel between two of the tests. 2019-07-03 16:55:12 -07:00
jMyles a57affca11 Updating test showing that #920 is fixed. 2019-07-03 13:59:52 -07:00
jMyles afe26661d5 Adding message number to side channel flow. 2019-07-03 13:51:58 -07:00
jMyles c613bcd077 A few new places where capsule_side_channel needs to be called. 2019-06-28 21:11:51 -07:00