Commit Graph

650 Commits (b8b3e94960129edf8128414d820e3c8d6618e1aa)

Author SHA1 Message Date
David Núñez 6f33b2b53a Adapt test for sampling distribution and relocate to agent tests 2019-10-20 19:11:21 +02:00
David Núñez 9d88930e3c Remove test for sampling in contract 2019-10-20 18:15:32 +02:00
szotov f330f5504b Fixed tests for new method 2019-10-20 17:50:47 +02:00
David Núñez c157a51312 RFCs to PR #1402 (vol 2) 2019-10-20 00:29:45 +02:00
David Núñez 377eb0dcf9 Test IndividualAllocationRegistry. Fix some broken stuff. 2019-10-19 23:59:37 +02:00
szotov 0976b2bcbe Added prolongStake to PreallocationEscrow 2019-10-19 22:48:47 +02:00
szotov dd0be915c4 Rename UserEscrow in python 2019-10-19 22:48:47 +02:00
szotov 7d445203ea UserEscrow renaming in contracts 2019-10-19 22:48:47 +02:00
David Núñez 3515dad296 Fixes to assorted comments: docs, tests, etc. 2019-10-19 22:48:47 +02:00
David Núñez 78b0c579dd Staker now can deposit tokens on behalf of an allocation user 2019-10-19 22:48:47 +02:00
David Núñez 08c2f45865 @validate_checksum_address now checks all parameters ending with "_address".
Closes #1084
2019-10-19 22:48:47 +02:00
David Núñez 0e4e32c90f Allow UserEscrow.withdrawPolicyReward() to accept a recipient address, like PolicyManager 2019-10-19 22:48:46 +02:00
David Núñez 66efc2af9e Minor touches to UserEscrowAgent 2019-10-19 22:48:46 +02:00
David Núñez 137db286ee Touches to allocation tests 2019-10-19 22:48:46 +02:00
David Núñez 5a26441f44 Use @validate_checksum_address in UserEscrowProxyDeployer.assign_beneficiary() 2019-10-19 22:48:46 +02:00
Tux 37110bf8e0
Merge pull request #1384 from cygnusv/noche
Final touches to nightly build
2019-10-02 05:03:40 -06:00
David Núñez dac6e0cffb Statistical test: Raise number of samples to 1000. Expected runtime 5 min 2019-10-02 11:37:17 +02:00
David Núñez 38e71dd02b
Merge pull request #1372 from cygnusv/noche
Add @pytest.mark.nightly marker to specify nightly tests
2019-10-01 15:18:35 +02:00
David Núñez 87996ba35f New statistical_tests job for nightly CI builds. Test sampling there 2019-09-30 23:09:15 +02:00
Kieran Prasch 0a713c1e51
Bare deployment and Retargeting tests for deployer and CLI 2019-09-30 09:04:09 -07:00
Kieran Prasch 2567bdd3ec
Deployer tooling for accessing untarget, but enrolled contracts by version index. 2019-09-30 09:04:09 -07:00
Kieran Prasch 859e572587
Creates a 'bare' deployment workflow for deployment; Only engage deploy_essential, optionally. 2019-09-30 09:04:09 -07:00
szotov 770e75389d
Fix StakingEscrow state for upgrading 2019-09-30 09:04:09 -07:00
David Núñez 07af77d74d
Merge pull request #1318 from szotov/tests-optimization
Contracts tests time optimization
2019-09-25 15:27:45 +02:00
K Prasch 314ab277b1
Merge pull request #1339 from KPrasch/restake
Restaking Control
2019-09-19 11:46:48 -07:00
Kieran R. Prasch 6761fde377
Respond to RFCs in PR #1339: Remove duplicated restaking methods, Docs touchups; ContractAgency, restaing agency layer assertions. 2019-09-19 10:54:25 -07:00
Kieran Prasch 6af7813e6a
Restaking control via Staker Actor. 2019-09-16 20:59:28 -07:00
Kieran Prasch 5860075142
Restaking access by Agency. 2019-09-16 20:45:50 -07:00
Kieran Prasch 6bdf968a61
Describe ownablity on deployer classes. 2019-09-16 18:09:18 -07:00
Kieran Prasch c2de8d5a57
Re-encapsulate and dehydrate upgradeable and ownable logic in deployers. 2019-09-16 09:45:41 -07:00
szotov c0a4f976c6 Reset state in testerchain 2019-09-12 11:08:59 +03:00
David Núñez 76103e806c Skip test_sampling_distribution until we have a solution for snail tests
See #1288
2019-09-10 22:14:30 +02:00
David Núñez 7b8b31df22 Getting rid of old `session_agency` fixture. Use `agency` instead. 2019-09-10 22:14:29 +02:00
David Núñez 20de10ea6f Add round() to NU 2019-09-10 22:14:29 +02:00
Kieran R. Prasch 07c8d58057 Restores UserEscrow Deployer Testing; Clarify test naming for user escrow ( to be preallocation escrow ). 2019-09-09 18:41:42 -07:00
Kieran R. Prasch fa3285a310
Use session-based deployment secrets for testing upgrades; Adjustments for ownership CLI tests. 2019-09-09 14:51:11 -07:00
Kieran R. Prasch ec5fab3b4f
UserEscrowProxy is now part of agency. Divergence amendments for status testing. 2019-09-09 14:50:46 -07:00
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 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 cae5247bfe
Merge pull request #1280 from cygnusv/sample
Touches to StakingEscrow.sample()
2019-09-03 14:51:45 -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 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 22fc7d16b4 Adapt PeriodTracker to WorkTracker; Geth client duration bug fix. 2019-08-31 11:32:25 -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 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 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
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
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
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 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
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
Kieran Prasch 27fc89d106
Ensure CLI painting implements emitters; Emitter logic for stakeholder CLI. 2019-07-25 15:19:44 -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 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 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 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 0b52cd2c74
Routes Ursula keyring attchment by federated/decentralized mode. 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 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 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 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 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 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 dc22bdede0
post rebase BlockchainPower -> TransactingPower 2019-07-15 12:06:44 -07: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 fd3b8603fa Touchups in some tests 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 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 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