Commit Graph

1135 Commits (e0a984c7b869e12bf96d27951ec194cc418fd9d4)

Author SHA1 Message Date
MacLane Wilkison 86116706ff Change license notices in module headers to AGPL 2019-03-04 18:55:28 -08:00
jMyles e795cf5cde Some comments and require messages. 2019-02-24 21:46:35 -07:00
MacLane Wilkison fd46d74130
Apply suggestions from code review
Co-Authored-By: szotov <zotov89@mail.ru>
2019-02-24 12:48:30 +03:00
szotov 2e610fceed Small fixes 2019-02-23 12:37:20 +03:00
szotov 4c54bf2d3b Updates version of solidity 2019-02-23 12:37:19 +03:00
David Núñez 9d97d9bdf7 Precompute v value so Alice's address can be recovered from KFrag signature
This is one of the core commits of this PR
2019-02-23 12:37:17 +03:00
David Núñez ea9be85f60 Utility python function to recover a public key from an ECDSA signature 2019-02-23 12:37:16 +03:00
David Núñez 7391d29dfe KFrag validity message and Alice's ETH address are part of the evidence 2019-02-23 12:37:16 +03:00
David Núñez 5846005ca5 WorkOrder has to include Alice's pubkey as ETH address for later use in ZKP logic 2019-02-23 12:37:14 +03:00
szotov a6fa4df610 Readability for adjudicator tests 2019-02-23 12:37:14 +03:00
szotov 68f87315a3 Enhanced estimate_gas using MiningAdjudicator 2019-02-23 12:37:13 +03:00
szotov 702c6b8384 Enhanced intercontract test using adjudicator contract 2019-02-23 12:37:13 +03:00
szotov 0f44c0857e Added more tests for adjudicator 2019-02-23 12:37:12 +03:00
szotov f809703300 Fixed adjudicator test 2019-02-23 12:37:12 +03:00
szotov 01fb0ce7d6 Fixed errors with web3 `soliditySha3` and `sha3` methods 2019-02-23 12:37:12 +03:00
szotov 12608c444d Gas estimates for slashing method in MinersEscrow 2019-02-23 12:37:11 +03:00
szotov 92af87778f Events for the MiningAdjudicator 2019-02-23 12:37:11 +03:00
szotov fa190cd27a Calculating the penalty and reward in the slashing method 2019-02-23 12:37:10 +03:00
szotov 24907e5065 Upgradability for the MiningAdjudicator contract 2019-02-23 12:37:10 +03:00
David Núñez 57a191b3c9 UnquestionableEvidence --> IndisputableEvidence 2019-02-23 12:37:09 +03:00
David Núñez 1b2a916935 Missing changes from 'overseer' to 'adjudicator' 2019-02-23 12:37:09 +03:00
David Núñez 450c1c64bc Shame on you, Ursula. 2019-02-23 12:37:08 +03:00
David Núñez cd8b265917 Defining some TODOs for later PRs 2019-02-23 12:37:07 +03:00
David Núñez 525635a304 Get precomputed values for U1 and U2 points 2019-02-23 12:37:06 +03:00
David Núñez 4ec3ea9abd Hard-code Y coordinate of UmbralParameter.U 2019-02-23 12:37:06 +03:00
David Núñez 03f050d499 We don't "challenge" the miner's work anymore. We now "evaluate" them. 2019-02-23 12:37:05 +03:00
David Núñez 2f8e956f5c Renaming ChallengeOverseer to MiningAdjudicator everywhere 2019-02-23 12:37:04 +03:00
David Núñez 4d9c0e794e ChallengeOverseer is now MiningAdjudicator 2019-02-23 12:37:04 +03:00
David Núñez a0970d736d Comment some tests in ChallengeOverseer 2019-02-23 12:37:03 +03:00
David Núñez 13cf37a8e5 Methods to compute proof's challenge scalar in Python and Solidity 2019-02-23 12:37:02 +03:00
David Núñez 033ea238cb Test consistency of Umbral and ChallengeOverseer.extendedKeccakToBN 2019-02-23 12:37:02 +03:00
David Núñez 0797b79dcb Adapt nucypher to new Umbral release 2019-02-23 12:37:01 +03:00
David Núñez 200a84a150 Fix re-encryption fixture in test_challenge_overseer 2019-02-23 12:37:01 +03:00
David Núñez 6c70103c3f Test consistency between Umbral and ChallengeOverseer.UmbralParameterU 2019-02-23 12:37:01 +03:00
David Núñez a55b9d157d Refining fragments fixture for test_umbral_deserializer 2019-02-23 12:36:59 +03:00
David Núñez a276f7c3ea Fix use of BlockchainDeployerInterface.provider 2019-02-23 12:36:54 +03:00
szotov a2e4f215e0 New lines at the end of contracts 2019-02-23 12:36:54 +03:00
szotov 9b4d77c035 Extracted getLockedTokensInPast method, some optimization 2019-02-23 12:36:54 +03:00
szotov f4cd8245de Added blank lines after license in blockchain tests 2019-02-23 12:36:53 +03:00
szotov 333e8af812 Fixed test_umbral_deserializer.py 2019-02-23 12:36:53 +03:00
szotov d3ae7a2fa2 Added test for slashing to the test_intercontract_integration.py 2019-02-23 12:36:52 +03:00
szotov 8a829b0283 Fixed overseer test 2019-02-23 12:36:52 +03:00
szotov 4d6131b45b Added events for slashing 2019-02-23 12:36:52 +03:00
szotov 46be22e5e6 Slashing optimization 2019-02-23 12:36:51 +03:00
szotov 31347b4634 Fixed bug with slashing future sub stakes regardless of duration 2019-02-23 12:36:50 +03:00
szotov d3fc480c6c Fixed bugs in slashing, small optimization 2019-02-23 12:36:50 +03:00
szotov df99cb650e Improved tests for slashing 2019-02-23 12:36:50 +03:00
szotov dbeb29fe83 Added method for getting a stake for previous periods 2019-02-23 12:36:49 +03:00
szotov dbc74e03d5 Tests for slashing 2019-02-23 12:36:49 +03:00
szotov c028e521cd Tests for `unMint` 2019-02-23 12:36:48 +03:00
szotov 2ef2a8f9b6 Added limit for amount of sub stakes, small refactoring of the MinersEscrow and other contracts 2019-02-23 12:36:48 +03:00
szotov 4f046b8f25 Fixed current challenge test 2019-02-23 12:36:47 +03:00
szotov eebd831397 Changed format of points in deserializer 2019-02-23 12:36:46 +03:00
szotov 56e3d0336b Integrated UmbralDeserializer and challenge, partially changed tests 2019-02-23 12:36:46 +03:00
szotov da21e5006f Small refactoring and renaming 2019-02-23 12:36:46 +03:00
szotov b230e31e32 Added contract to deserialize capsule and cfrag 2019-02-23 12:36:45 +03:00
szotov 694eb7fff9 Added test for the draft of challenge 2019-02-23 12:36:45 +03:00
szotov 0e06d67252 Added draft of the first challenge 2019-02-23 12:36:44 +03:00
szotov 014a1094ab Added methods to verify signature on-chain 2019-02-23 12:36:44 +03:00
szotov 866b70e63e Added on-chain external signature verifier 2019-02-23 12:36:44 +03:00
Damon C d31e86b3d1 platform agnostic tempdir fixes #791 2019-02-19 22:18:52 -07:00
David Núñez 3391fbcb47 Bob CharControl endpoint for getting encrypting and signing public keys 2019-02-16 23:21:39 +01:00
Kieran R. Prasch 89d26301ea Passing character control tests with more sensible API fields and serilization. 2019-02-16 14:42:06 -07:00
tuxxy a8c4ecee3e Use a common policy label fixture 2019-02-16 14:42:06 -07:00
Kieran R. Prasch 9dccbc7377 work-around for message kit serialization Issues; Fails on Tmap decryption. 2019-02-16 14:42:06 -07:00
Kieran R. Prasch a1e1e39168 Adds failing message kit serialization test 2019-02-16 14:42:06 -07:00
Kieran R. Prasch e7da2240eb More b64 serialization deprecation; Flask response nucypher versioing 2019-02-16 14:42:06 -07:00
Kieran R. Prasch abdd9ceda8 Remove b64encodings from labels 2019-02-16 14:42:06 -07:00
Kieran R. Prasch 351569b05b Update character control tests to use unicode strings in tests 2019-02-16 14:42:06 -07:00
David Núñez 0e5b5584ac Bye bye, DataSource. 2019-02-16 18:54:30 +01:00
MacLane Wilkison 9ed5b1e6f6 Remove unused variables+imports and make PEP 8 fixes in tests 2019-02-15 15:12:33 -07:00
jMyles 9ff5f7b6f8 Some rapid crazy changes with @kprasch to fix failing tests. 2019-02-15 00:30:44 -07:00
Kieran R. Prasch c43cdd573b Update Tests with corrected naming conventions for Flask test client - bug fixes for CLI tests. 2019-02-15 00:28:53 -07:00
Kieran R. Prasch 0da9d5cadd Fix filename spelling error in examples 2019-02-15 00:28:53 -07:00
Kieran R. Prasch bf2a5669d3 Test Alice CLI module 2019-02-15 00:28:53 -07:00
Kieran R. Prasch 86f9720461 Organize CLI Tests by Character 2019-02-15 00:28:53 -07:00
jMyles abf00edb47 Catching up Character tests to label move. 2019-02-15 00:28:53 -07:00
jMyles ffd3680d6a Shifts in tests to account for movement of label from Enrico to retrieve. 2019-02-15 00:28:53 -07:00
jMyles b4bc2ce090 join_policy() can now be made thread-safe by passing block=True 2019-02-15 00:28:53 -07:00
jMyles 7a11f41132 Certs are all busted now too in _MiddlewareClientWithConnectionProblems. 2019-02-15 00:28:53 -07:00
jMyles 4251a94867 Two tests showing errors that myself, @mswilkison, and @derekpierre have run into this week. 2019-02-15 00:28:53 -07:00
jMyles 9a11a30be5 Remove Sentry observer in tests. 2019-02-15 00:28:53 -07:00
jMyles fd435c1a32 Single entry into log setup. 2019-02-15 00:28:53 -07:00
jMyles 3204427d4e Remaining formatting, reprs, imports, and cleanups from my work following @tuxxy's rebase. 2019-02-15 00:28:53 -07:00
tuxxy 26b1951488 Move test_character_control.py to tests.characters 2019-02-15 00:28:53 -07:00
tuxxy d0a0de822e Add derive_policy_pubkey route for Alice's character control 2019-02-15 00:28:53 -07:00
tuxxy e86d496762 Fix lifecycle test
David told me that this test would fail because it Bob didn't provide
his signing key. I somehow forgot that while making these changes and
spent hours trying to figure out why the map_id was wrong. I even
commented out bob's signing key knowing I would have to uncomment it
later. I'm done for today.

Import Alice in cli.alice

Fix arg name
2019-02-15 00:28:53 -07:00
tuxxy ac9677dad9 Create Enrico.from_alice method and add enrico_control_from_alice fixture 2019-02-15 00:28:53 -07:00
jMyles ff06ceb998 Moving Enrico control onto Enrico. 2019-02-15 00:28:53 -07:00
jMyles 0866abaaac Moving Bob controller right on to Bob. 2019-02-15 00:28:53 -07:00
jMyles 188c0773b4 Enrico is now a lawful Character. Fixes #241. 2019-02-15 00:28:53 -07:00
tuxxy 55dec8ff25 Get tests running again 2019-02-15 00:28:53 -07:00
tuxxy b4b179aebb Alice character_control returns more policy metadata and lifecycle tests reflect it 2019-02-15 00:28:53 -07:00
tuxxy 3c64c7d9ff Add non-functional character control lifecycle test 2019-02-15 00:28:53 -07:00
jMyles 83bbf5b03b Tests and fixtures for Alice control via config. 2019-02-15 00:28:53 -07:00
tuxxy 37d4e1799f Add first draft of alice CLI for character control 2019-02-15 00:28:53 -07:00
Kieran R. Prasch ad5da13cd9 First draft of Moe provisioning with ansible 2019-02-14 11:32:34 -07:00
Kieran R. Prasch 162af4b51b CLI + Learner Integration tests for Ursula and Moe 2019-02-13 13:09:53 -07:00
Kieran Prasch 329114db29 Update and test Moe. 2019-02-12 15:19:42 -08:00
tuxxy 707116470c Change character control namespaces
All character files are moved under the nucypher.network.control
namespace under their respective names (alice, bob, enrico).
2019-02-12 13:49:02 -07:00
tuxxy 6dd77e0e2e Standardize JSON responses in result key 2019-02-12 13:49:02 -07:00
tuxxy 01a6493ef7 Add enrico_control fixture and test_enrico_character_control_encrypt_message 2019-02-12 13:49:02 -07:00
tuxxy 2a6d445b9f Improve JSON decode error capture and add to tests 2019-02-12 13:49:02 -07:00
tuxxy 131fe17017 Standardize API endpoints to use JSON 2019-02-12 13:49:02 -07:00
tuxxy 35e2942db0 Have make_alice_control and make_bob_control take a teacher node to start the learning loop 2019-02-12 13:49:02 -07:00
tuxxy 282441557b Fill out make_bob_control and build passing tests 2019-02-12 13:49:02 -07:00
tuxxy e9f9b5c227 Have federated_bob learn in bob_control fixture 2019-02-12 13:49:02 -07:00
tuxxy 7882ed6114 Create bob_control fixture 2019-02-12 13:49:02 -07:00
tuxxy 71d1d9f709 Finalize test_alice_character_control_grant 2019-02-12 13:49:02 -07:00
tuxxy 924d7388a9 Raise TypeError when TreasureMap isn't decrypted and add test to demonstrate 2019-02-12 13:49:02 -07:00
tuxxy a56baee69c Add problematic test_alice_character_control_grant 2019-02-12 13:49:02 -07:00
tuxxy 79661e58b2 Add failing test for TreasureMap serialization 2019-02-12 13:49:02 -07:00
tuxxy e671283d27 Add minimal passing test for alice_control.create_policy 2019-02-12 13:49:02 -07:00
tuxxy 8c5bb1b1eb Fill out alice_control.create_policy w/ TODOs 2019-02-12 13:49:02 -07:00
tuxxy 07762a420a Add alice_control fixture 2019-02-12 13:49:02 -07:00
K Prasch 29d81fc851
Merge pull request #740 from KPrasch/update-solidity
Integrate py-solc, v0.5.0+ contract updates
2019-02-12 12:42:40 -07:00
Kieran R. Prasch 90764287fe Update cli.config usage within the nucypher codebase. 2019-02-12 09:19:11 -07:00
szotov d8e637c7db Fix escrow agent test 2019-02-12 09:07:01 -07:00
szotov 819f0951e4 solidity contracts 0.4.25 -> 0.5.3, updates openzeppelin contracts 2019-02-09 16:58:09 +03:00
jMyles 7faa00d6e1 Pulling certs out of the mock test flow more completely so that the sanity check can be more robust. 2019-02-08 10:06:23 -07:00
jMyles b0b0645e4d We don't pass certificate_filepath anymore. 2019-02-08 10:06:23 -07:00
jMyles 52bf0acf52 Removing second addition of observer. Fixes #728. 2019-02-08 10:06:23 -07:00
jMyles 0578b8023c Mocking Response with namedtuple. 2019-02-02 21:02:34 -05:00
Kieran Prasch 35d4d23405
Fixes and lightly tests Issue #711 2019-01-30 11:46:00 -08:00
jMyles d08f6a017d No longer need to pass the status template around. 2019-01-22 17:04:23 -05:00
jMyles 150d73da4e Accounting for an earlier refactor by @KPrasch. 2019-01-22 17:04:23 -05:00
Kieran Prasch 4fa2fa8e42
Handles Alice database in config subclass, Use sqlalchemy default development database instead of pure in-memory (#662) 2019-01-16 11:21:32 -08:00
Kieran Prasch 45116dd6bc
Bake in certificate checksum_address extracation to tls saving methods. 2019-01-16 09:48:09 -08:00
Kieran Prasch e46fb20bec
Update node storage methods to combined API 2019-01-16 09:48:09 -08:00
jMyles 706614cd93 Fake cert filepath for Vlad here too. 2019-01-15 15:20:17 -05:00
jMyles 12d5ab0489 Two changes in tests to reflect new APIs: 1) Vladimir gets a cert filepath and 2) We don't pass tls as a kwarg anymore for keyring. 2019-01-15 15:20:17 -05:00
jMyles bed79d4fac Handling 204 response during learning. Fixes #630. 2019-01-15 15:20:17 -05:00
jMyles bf0a9e702b Test for case where Ursula knows nobody. Currently forced to fail. See #630. 2019-01-15 15:20:17 -05:00
Kieran Prasch 8922af389c
Updates Web3 python API usage to v5.0.0-alpha.3 2019-01-15 11:47:40 -08:00
Kieran Prasch 787e0eebbd
Remove stale (hopefully) cleanup fixture in favor of ephemeral nodes in 'development mode' 2019-01-05 09:27:48 -08:00
Kieran Prasch be456e09ff
Fixes Issue #583: Allow 'nucypher ursula run' to destroy invalid nucypher system configurations. 2019-01-05 09:27:48 -08:00
Kieran Prasch 46f76ad21c
Fixes Issue #634: Restore CLI test for nucypher ursula run --dev --federated-only. 2019-01-05 09:27:48 -08:00
Kieran Prasch 1755a35fdc Respond to RFCs in PR #617 2018-12-19 08:43:33 -08:00
Kieran Prasch f07f2979ce
Provide simple way to start testing nucypher on pyevm with TeserBlockchain classmethods 2018-12-18 11:27:28 -08:00
David Núñez 19dd593256
Merge pull request #605 from KPrasch/config
Ursula Development Configuration Test
2018-12-17 22:12:37 +01:00
David Núñez 0bb34fc5f7
Update tests/config/test_ursula_config.py
Co-Authored-By: KPrasch <kieranprasch@gmail.com>
2018-12-17 12:51:04 -08:00
K Prasch 3051b10ef5
Merge pull request #594 from KPrasch/estimate-gas
Maintain Gas Estimation Metrics
2018-12-16 09:56:00 -08:00
Kieran Prasch 6f69704a3a
Use Regex.compile; Docstrings; Even more cleanup 2018-12-14 10:10:08 -08:00
Kieran Prasch 0c7c5a92a8
Respond to RFCs: Code Style and Readability Improvements 2018-12-14 09:12:25 -08:00
David Núñez 9f32f76942
Update tests/metrics/estimate_gas.py
Co-Authored-By: KPrasch <kieranprasch@gmail.com>
2018-12-14 08:06:32 -08:00
Tux 60ab41c82d
Merge pull request #611 from tuxxy/AAA2018-is-gonna-ruin-the-internet
Rename EncryptingKeypair/EncryptingPower to DecryptingKeypair/DecryptingPower
2018-12-14 01:49:10 -05:00
Kieran Prasch e9a8af68b5
Ursula development configuration + character integration test 2018-12-13 16:12:51 -08:00
Kieran Prasch bf62f9201d
Class-based refactor; Timestamped reports; Automation job. 2018-12-13 16:01:14 -08:00
Kieran Prasch 5002639910
Use twisted loggers to collect and analyze gas estimation data 2018-12-13 16:01:14 -08:00
Kieran Prasch d8b9a7e10e
Maintains estimate gas tester metrics script; Update to latest API. 2018-12-13 16:01:14 -08:00