{"action":"created","comment":{"url":"https://api.github.com/repos/nucypher/nucypher/pulls/comments/199922040","pull_request_review_id":134135528,"id":199922040,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTkyMjA0MA==","diff_hunk":"@@ -30,45 +30,75 @@ def idle_policy(alice, bob):\n \n \n @pytest.fixture(scope=\"module\")\n-@pytest.mark.usesfixtures(\"ursulas\", \"three_agents\")\n-def enacted_policy(idle_policy):\n+def idle_federated_policy(alice, bob):\n+    \"\"\"\n+    Creates a Policy, in a manner typical of how Alice might do it, with a unique uri (soon to be \"label\" - see #183)\n+    \"\"\"\n+    n = int(constants.NUMBER_OF_URSULAS_IN_NETWORK)\n+    random_label = b'label://' + os.urandom(32)\n+    policy = alice.create_policy(bob, label=random_label, m=3, n=n, federated=True)\n+    return policy\n+\n+\n+@pytest.fixture(scope=\"module\")\n+def enacted_blockchain_policy(idle_blockchain_policy, ursulas):\n+    # Alice has a policy in mind and knows of enough qualifies Ursulas; she crafts an offer for them.\n+    deposit = constants.NON_PAYMENT(b\"0000000\")\n+    contract_end_datetime = maya.now() + datetime.timedelta(days=5)\n+    network_middleware = MockRestMiddleware()\n+\n+    idle_blockchain_policy.make_arrangements(network_middleware, deposit=deposit, expiration=contract_end_datetime,\n+                                             ursulas=list(ursulas))\n+    idle_blockchain_policy.enact(network_middleware)  # REST call happens here, as does population of TreasureMap.\n+\n+    return idle_blockchain_policy\n+\n+\n+@pytest.fixture(scope=\"module\")\n+def enacted_federated_policy(idle_federated_policy, ursulas):\n     # Alice has a policy in mind and knows of enough qualifies Ursulas; she crafts an offer for them.\n     deposit = constants.NON_PAYMENT(b\"0000000\")\n     contract_end_datetime = maya.now() + datetime.timedelta(days=5)\n     network_middleware = MockRestMiddleware()\n \n-    idle_policy.make_arrangements(network_middleware, deposit=deposit, expiration=contract_end_datetime)\n-    idle_policy.enact(network_middleware)  # REST call happens here, as does population of TreasureMap.\n+    idle_federated_policy.make_arrangements(network_middleware,\n+                                            deposit=deposit,\n+                                            expiration=contract_end_datetime,\n+                                            ursulas=ursulas)\n+    idle_federated_policy.enact(network_middleware)  # REST call happens here, as does population of TreasureMap.\n \n-    return idle_policy\n+    return idle_federated_policy\n \n \n @pytest.fixture(scope=\"module\")\n-def alice(mining_ursulas, three_agents):\n+def alice(ursulas, three_agents):\n     token_agent, miner_agent, policy_agent = three_agents\n     etherbase, alice, bob, *everyone_else = token_agent.blockchain.interface.w3.eth.accounts\n \n     alice = Alice(network_middleware=MockRestMiddleware(),\n                   policy_agent=policy_agent,\n                   ether_address=alice,\n-                  known_nodes=mining_ursulas,\n-                  federated_only=True)\n-    alice.recruit = lambda *args, **kwargs: [u.ether_address for u in mining_ursulas]\n+                  known_nodes=ursulas,\n+                  federated_only=True,\n+                  abort_on_learning_error=True)\n+    alice.recruit = lambda *args, **kwargs: [u._ether_address for u in ursulas]","path":"tests/fixtures.py","position":86,"original_position":86,"commit_id":"cc5d6ef52a129834d8be0e5e221a119d3f559e3b","original_commit_id":"cc5d6ef52a129834d8be0e5e221a119d3f559e3b","user":{"login":"jMyles","id":311973,"node_id":"MDQ6VXNlcjMxMTk3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/311973?v=4","gravatar_id":"","url":"https://api.github.com/users/jMyles","html_url":"https://github.com/jMyles","followers_url":"https://api.github.com/users/jMyles/followers","following_url":"https://api.github.com/users/jMyles/following{/other_user}","gists_url":"https://api.github.com/users/jMyles/gists{/gist_id}","starred_url":"https://api.github.com/users/jMyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jMyles/subscriptions","organizations_url":"https://api.github.com/users/jMyles/orgs","repos_url":"https://api.github.com/users/jMyles/repos","events_url":"https://api.github.com/users/jMyles/events{/privacy}","received_events_url":"https://api.github.com/users/jMyles/received_events","type":"User","site_admin":false},"body":"This just mocks out recruit so that Alice can proceed through the rest of the test.  There's almost certainly a better way to do this, but this is pretty good for now.","created_at":"2018-07-03T19:12:59Z","updated_at":"2018-07-03T19:13:00Z","html_url":"https://github.com/nucypher/nucypher/pull/329#discussion_r199922040","pull_request_url":"https://api.github.com/repos/nucypher/nucypher/pulls/329","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/comments/199922040"},"html":{"href":"https://github.com/nucypher/nucypher/pull/329#discussion_r199922040"},"pull_request":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/329"}},"in_reply_to_id":199921369},"pull_request":{"url":"https://api.github.com/repos/nucypher/nucypher/pulls/329","id":197043687,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MDQzNjg3","html_url":"https://github.com/nucypher/nucypher/pull/329","diff_url":"https://github.com/nucypher/nucypher/pull/329.diff","patch_url":"https://github.com/nucypher/nucypher/pull/329.patch","issue_url":"https://api.github.com/repos/nucypher/nucypher/issues/329","number":329,"state":"open","locked":false,"title":"Learning Loop Part III","user":{"login":"jMyles","id":311973,"node_id":"MDQ6VXNlcjMxMTk3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/311973?v=4","gravatar_id":"","url":"https://api.github.com/users/jMyles","html_url":"https://github.com/jMyles","followers_url":"https://api.github.com/users/jMyles/followers","following_url":"https://api.github.com/users/jMyles/following{/other_user}","gists_url":"https://api.github.com/users/jMyles/gists{/gist_id}","starred_url":"https://api.github.com/users/jMyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jMyles/subscriptions","organizations_url":"https://api.github.com/users/jMyles/orgs","repos_url":"https://api.github.com/users/jMyles/repos","events_url":"https://api.github.com/users/jMyles/events{/privacy}","received_events_url":"https://api.github.com/users/jMyles/received_events","type":"User","site_admin":false},"body":"### Major changes\r\n* Bob is working again.\r\n* Ursula is now fully serializable and splittable.\r\n* `TreasureMap` serialization, splitting, and verification is all handled internally.\r\n* Bob now follows TreasureMaps asynchronously\r\n* Ursula now propagates TreasureMaps received via REST\r\n\r\n### Minor changes\r\n* Can't specify a teacher node as method params anymore.  Just set it as the next teacher.\r\n* Removed some deprecated fixtures\r\n\r\n\r\nFixes #172 \r\nFixes #227\r\nFixes #235\r\nFixes #238\r\nFixes #326 \r\n\r\n\r\nDepends on bytestringSplitter 9: https://github.com/nucypher/bytestringSplitter/pull/9","created_at":"2018-06-25T08:55:17Z","updated_at":"2018-07-03T19:13:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30eb7002cc60f802bed1951fb83446812a073da0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nucypher/nucypher/pulls/329/commits","review_comments_url":"https://api.github.com/repos/nucypher/nucypher/pulls/329/comments","review_comment_url":"https://api.github.com/repos/nucypher/nucypher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nucypher/nucypher/issues/329/comments","statuses_url":"https://api.github.com/repos/nucypher/nucypher/statuses/cc5d6ef52a129834d8be0e5e221a119d3f559e3b","head":{"label":"jMyles:learning-loop3","ref":"learning-loop3","sha":"cc5d6ef52a129834d8be0e5e221a119d3f559e3b","user":{"login":"jMyles","id":311973,"node_id":"MDQ6VXNlcjMxMTk3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/311973?v=4","gravatar_id":"","url":"https://api.github.com/users/jMyles","html_url":"https://github.com/jMyles","followers_url":"https://api.github.com/users/jMyles/followers","following_url":"https://api.github.com/users/jMyles/following{/other_user}","gists_url":"https://api.github.com/users/jMyles/gists{/gist_id}","starred_url":"https://api.github.com/users/jMyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jMyles/subscriptions","organizations_url":"https://api.github.com/users/jMyles/orgs","repos_url":"https://api.github.com/users/jMyles/repos","events_url":"https://api.github.com/users/jMyles/events{/privacy}","received_events_url":"https://api.github.com/users/jMyles/received_events","type":"User","site_admin":false},"repo":{"id":101236972,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEyMzY5NzI=","name":"nucypher","full_name":"jMyles/nucypher","owner":{"login":"jMyles","id":311973,"node_id":"MDQ6VXNlcjMxMTk3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/311973?v=4","gravatar_id":"","url":"https://api.github.com/users/jMyles","html_url":"https://github.com/jMyles","followers_url":"https://api.github.com/users/jMyles/followers","following_url":"https://api.github.com/users/jMyles/following{/other_user}","gists_url":"https://api.github.com/users/jMyles/gists{/gist_id}","starred_url":"https://api.github.com/users/jMyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jMyles/subscriptions","organizations_url":"https://api.github.com/users/jMyles/orgs","repos_url":"https://api.github.com/users/jMyles/repos","events_url":"https://api.github.com/users/jMyles/events{/privacy}","received_events_url":"https://api.github.com/users/jMyles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jMyles/nucypher","description":" A proxy re-encryption network to empower privacy in decentralized systems. https://nucypher.com ","fork":true,"url":"https://api.github.com/repos/jMyles/nucypher","forks_url":"https://api.github.com/repos/jMyles/nucypher/forks","keys_url":"https://api.github.com/repos/jMyles/nucypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jMyles/nucypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jMyles/nucypher/teams","hooks_url":"https://api.github.com/repos/jMyles/nucypher/hooks","issue_events_url":"https://api.github.com/repos/jMyles/nucypher/issues/events{/number}","events_url":"https://api.github.com/repos/jMyles/nucypher/events","assignees_url":"https://api.github.com/repos/jMyles/nucypher/assignees{/user}","branches_url":"https://api.github.com/repos/jMyles/nucypher/branches{/branch}","tags_url":"https://api.github.com/repos/jMyles/nucypher/tags","blobs_url":"https://api.github.com/repos/jMyles/nucypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jMyles/nucypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jMyles/nucypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/jMyles/nucypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jMyles/nucypher/statuses/{sha}","languages_url":"https://api.github.com/repos/jMyles/nucypher/languages","stargazers_url":"https://api.github.com/repos/jMyles/nucypher/stargazers","contributors_url":"https://api.github.com/repos/jMyles/nucypher/contributors","subscribers_url":"https://api.github.com/repos/jMyles/nucypher/subscribers","subscription_url":"https://api.github.com/repos/jMyles/nucypher/subscription","commits_url":"https://api.github.com/repos/jMyles/nucypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/jMyles/nucypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/jMyles/nucypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/jMyles/nucypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/jMyles/nucypher/contents/{+path}","compare_url":"https://api.github.com/repos/jMyles/nucypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jMyles/nucypher/merges","archive_url":"https://api.github.com/repos/jMyles/nucypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jMyles/nucypher/downloads","issues_url":"https://api.github.com/repos/jMyles/nucypher/issues{/number}","pulls_url":"https://api.github.com/repos/jMyles/nucypher/pulls{/number}","milestones_url":"https://api.github.com/repos/jMyles/nucypher/milestones{/number}","notifications_url":"https://api.github.com/repos/jMyles/nucypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jMyles/nucypher/labels{/name}","releases_url":"https://api.github.com/repos/jMyles/nucypher/releases{/id}","deployments_url":"https://api.github.com/repos/jMyles/nucypher/deployments","created_at":"2017-08-24T00:35:44Z","updated_at":"2018-06-03T02:55:25Z","pushed_at":"2018-07-03T03:44:44Z","git_url":"git://github.com/jMyles/nucypher.git","ssh_url":"git@github.com:jMyles/nucypher.git","clone_url":"https://github.com/jMyles/nucypher.git","svn_url":"https://github.com/jMyles/nucypher","homepage":"","size":7302,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"nucypher:coffee","ref":"coffee","sha":"d4a9779903d114a6c890f1fb7b2e8c659e9cfc8f","user":{"login":"nucypher","id":24552990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTUyOTkw","avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"repo":{"id":100446516,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA0NDY1MTY=","name":"nucypher","full_name":"nucypher/nucypher","owner":{"login":"nucypher","id":24552990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTUyOTkw","avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nucypher/nucypher","description":"A proxy re-encryption network to empower privacy in decentralized systems.","fork":false,"url":"https://api.github.com/repos/nucypher/nucypher","forks_url":"https://api.github.com/repos/nucypher/nucypher/forks","keys_url":"https://api.github.com/repos/nucypher/nucypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nucypher/nucypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nucypher/nucypher/teams","hooks_url":"https://api.github.com/repos/nucypher/nucypher/hooks","issue_events_url":"https://api.github.com/repos/nucypher/nucypher/issues/events{/number}","events_url":"https://api.github.com/repos/nucypher/nucypher/events","assignees_url":"https://api.github.com/repos/nucypher/nucypher/assignees{/user}","branches_url":"https://api.github.com/repos/nucypher/nucypher/branches{/branch}","tags_url":"https://api.github.com/repos/nucypher/nucypher/tags","blobs_url":"https://api.github.com/repos/nucypher/nucypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nucypher/nucypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nucypher/nucypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/nucypher/nucypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nucypher/nucypher/statuses/{sha}","languages_url":"https://api.github.com/repos/nucypher/nucypher/languages","stargazers_url":"https://api.github.com/repos/nucypher/nucypher/stargazers","contributors_url":"https://api.github.com/repos/nucypher/nucypher/contributors","subscribers_url":"https://api.github.com/repos/nucypher/nucypher/subscribers","subscription_url":"https://api.github.com/repos/nucypher/nucypher/subscription","commits_url":"https://api.github.com/repos/nucypher/nucypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/nucypher/nucypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/nucypher/nucypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/nucypher/nucypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/nucypher/nucypher/contents/{+path}","compare_url":"https://api.github.com/repos/nucypher/nucypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nucypher/nucypher/merges","archive_url":"https://api.github.com/repos/nucypher/nucypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nucypher/nucypher/downloads","issues_url":"https://api.github.com/repos/nucypher/nucypher/issues{/number}","pulls_url":"https://api.github.com/repos/nucypher/nucypher/pulls{/number}","milestones_url":"https://api.github.com/repos/nucypher/nucypher/milestones{/number}","notifications_url":"https://api.github.com/repos/nucypher/nucypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nucypher/nucypher/labels{/name}","releases_url":"https://api.github.com/repos/nucypher/nucypher/releases{/id}","deployments_url":"https://api.github.com/repos/nucypher/nucypher/deployments","created_at":"2017-08-16T04:07:25Z","updated_at":"2018-07-02T00:37:07Z","pushed_at":"2018-07-03T19:01:07Z","git_url":"git://github.com/nucypher/nucypher.git","ssh_url":"git@github.com:nucypher/nucypher.git","clone_url":"https://github.com/nucypher/nucypher.git","svn_url":"https://github.com/nucypher/nucypher","homepage":"https://nucypher.com","size":7222,"stargazers_count":68,"watchers_count":68,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":75,"license":null,"forks":26,"open_issues":75,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/329"},"html":{"href":"https://github.com/nucypher/nucypher/pull/329"},"issue":{"href":"https://api.github.com/repos/nucypher/nucypher/issues/329"},"comments":{"href":"https://api.github.com/repos/nucypher/nucypher/issues/329/comments"},"review_comments":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/329/comments"},"review_comment":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nucypher/nucypher/pulls/329/commits"},"statuses":{"href":"https://api.github.com/repos/nucypher/nucypher/statuses/cc5d6ef52a129834d8be0e5e221a119d3f559e3b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jMyles"}}