{"action":"opened","number":110,"pull_request":{"url":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/110","id":195970819,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1OTcwODE5","html_url":"https://github.com/poanetwork/poa-bridge/pull/110","diff_url":"https://github.com/poanetwork/poa-bridge/pull/110.diff","patch_url":"https://github.com/poanetwork/poa-bridge/pull/110.patch","issue_url":"https://api.github.com/repos/poanetwork/poa-bridge/issues/110","number":110,"state":"open","locked":false,"title":"Add the groundwork for failover RPC support","user":{"login":"c0gent","id":2916797,"node_id":"MDQ6VXNlcjI5MTY3OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/2916797?v=4","gravatar_id":"","url":"https://api.github.com/users/c0gent","html_url":"https://github.com/c0gent","followers_url":"https://api.github.com/users/c0gent/followers","following_url":"https://api.github.com/users/c0gent/following{/other_user}","gists_url":"https://api.github.com/users/c0gent/gists{/gist_id}","starred_url":"https://api.github.com/users/c0gent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0gent/subscriptions","organizations_url":"https://api.github.com/users/c0gent/orgs","repos_url":"https://api.github.com/users/c0gent/repos","events_url":"https://api.github.com/users/c0gent/events{/privacy}","received_events_url":"https://api.github.com/users/c0gent/received_events","type":"User","site_admin":false},"body":"## Changes\r\n\r\n* Remove the `rpc_host` and `rpc_port` fields from the configuration file\r\n  format and add `primary_rpc_host`, `primary_rpc_port`, `failover_rpc_host`,\r\n  and `failover_rpc_port`.\r\n* Add the `RpcUrl` and `RpcUrlKind` types.\r\n  * `RpcUrl` contains a host name and a port.\r\n  * `RpcUrlKind` has variants for primary and failover urls and contains a\r\n    `RpcUrl`.\r\n* Remove `rpc_host` and `rpc_port` and add primary and failover RPC url fields\r\n  to `config::Config` et. al.\r\n* Update `app::Connections::new_http` to automatically use the failover url in\r\n  the event of an error connecting to the primary.\r\n* Add the `home_url` and `foreign_url` to `Connections` containing the\r\n  url/kind (a `RpcUrlKind`) currently in use.\r\n* Update logging.\r\n* Update tests.\r\n\r\nCloses #107 (maybe)\r\n\r\nI don't have a very sophisticated test setup so this will definitely need more comprehensive testing in a more realistic environment.\r\n\r\n@akolotov: According to your original issue, the main purpose of this is for the failover not simply to be available upon startup, but to be used in the event of a disconnection. I'm not familiar enough with the whole project yet to know exactly how and where that happens. This patch only makes use of the failover url on startup (creation of an `App`/`Connection`) but does nothing special in the event of a disconnect at a later point. Therefore it may not completely address your issue and should be considered only a partial implementation.\r\n\r\nI could use your help showing me where and how disconnection is currently is handled so that I can add some more logic to that process. I'm available on voice or Zoom if that's easier. Thanks!\r\n\r\n","created_at":"2018-06-19T22:02:33Z","updated_at":"2018-06-19T22:02:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/110/commits","review_comments_url":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/110/comments","review_comment_url":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/poanetwork/poa-bridge/issues/110/comments","statuses_url":"https://api.github.com/repos/poanetwork/poa-bridge/statuses/9cc681474a82d80b5e4a9857ef1f853b92cf02a9","head":{"label":"c0gent:failover-rfc","ref":"failover-rfc","sha":"9cc681474a82d80b5e4a9857ef1f853b92cf02a9","user":{"login":"c0gent","id":2916797,"node_id":"MDQ6VXNlcjI5MTY3OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/2916797?v=4","gravatar_id":"","url":"https://api.github.com/users/c0gent","html_url":"https://github.com/c0gent","followers_url":"https://api.github.com/users/c0gent/followers","following_url":"https://api.github.com/users/c0gent/following{/other_user}","gists_url":"https://api.github.com/users/c0gent/gists{/gist_id}","starred_url":"https://api.github.com/users/c0gent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0gent/subscriptions","organizations_url":"https://api.github.com/users/c0gent/orgs","repos_url":"https://api.github.com/users/c0gent/repos","events_url":"https://api.github.com/users/c0gent/events{/privacy}","received_events_url":"https://api.github.com/users/c0gent/received_events","type":"User","site_admin":false},"repo":{"id":137833869,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc4MzM4Njk=","name":"poa-bridge","full_name":"c0gent/poa-bridge","owner":{"login":"c0gent","id":2916797,"node_id":"MDQ6VXNlcjI5MTY3OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/2916797?v=4","gravatar_id":"","url":"https://api.github.com/users/c0gent","html_url":"https://github.com/c0gent","followers_url":"https://api.github.com/users/c0gent/followers","following_url":"https://api.github.com/users/c0gent/following{/other_user}","gists_url":"https://api.github.com/users/c0gent/gists{/gist_id}","starred_url":"https://api.github.com/users/c0gent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0gent/subscriptions","organizations_url":"https://api.github.com/users/c0gent/orgs","repos_url":"https://api.github.com/users/c0gent/repos","events_url":"https://api.github.com/users/c0gent/events{/privacy}","received_events_url":"https://api.github.com/users/c0gent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/c0gent/poa-bridge","description":"POA <-> Ethereum bridge for self transfers of POA native token to POA20 (ERC20 representation)","fork":true,"url":"https://api.github.com/repos/c0gent/poa-bridge","forks_url":"https://api.github.com/repos/c0gent/poa-bridge/forks","keys_url":"https://api.github.com/repos/c0gent/poa-bridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c0gent/poa-bridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c0gent/poa-bridge/teams","hooks_url":"https://api.github.com/repos/c0gent/poa-bridge/hooks","issue_events_url":"https://api.github.com/repos/c0gent/poa-bridge/issues/events{/number}","events_url":"https://api.github.com/repos/c0gent/poa-bridge/events","assignees_url":"https://api.github.com/repos/c0gent/poa-bridge/assignees{/user}","branches_url":"https://api.github.com/repos/c0gent/poa-bridge/branches{/branch}","tags_url":"https://api.github.com/repos/c0gent/poa-bridge/tags","blobs_url":"https://api.github.com/repos/c0gent/poa-bridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c0gent/poa-bridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c0gent/poa-bridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/c0gent/poa-bridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c0gent/poa-bridge/statuses/{sha}","languages_url":"https://api.github.com/repos/c0gent/poa-bridge/languages","stargazers_url":"https://api.github.com/repos/c0gent/poa-bridge/stargazers","contributors_url":"https://api.github.com/repos/c0gent/poa-bridge/contributors","subscribers_url":"https://api.github.com/repos/c0gent/poa-bridge/subscribers","subscription_url":"https://api.github.com/repos/c0gent/poa-bridge/subscription","commits_url":"https://api.github.com/repos/c0gent/poa-bridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/c0gent/poa-bridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/c0gent/poa-bridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/c0gent/poa-bridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/c0gent/poa-bridge/contents/{+path}","compare_url":"https://api.github.com/repos/c0gent/poa-bridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c0gent/poa-bridge/merges","archive_url":"https://api.github.com/repos/c0gent/poa-bridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c0gent/poa-bridge/downloads","issues_url":"https://api.github.com/repos/c0gent/poa-bridge/issues{/number}","pulls_url":"https://api.github.com/repos/c0gent/poa-bridge/pulls{/number}","milestones_url":"https://api.github.com/repos/c0gent/poa-bridge/milestones{/number}","notifications_url":"https://api.github.com/repos/c0gent/poa-bridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c0gent/poa-bridge/labels{/name}","releases_url":"https://api.github.com/repos/c0gent/poa-bridge/releases{/id}","deployments_url":"https://api.github.com/repos/c0gent/poa-bridge/deployments","created_at":"2018-06-19T03:08:30Z","updated_at":"2018-06-19T03:08:32Z","pushed_at":"2018-06-19T21:48:54Z","git_url":"git://github.com/c0gent/poa-bridge.git","ssh_url":"git@github.com:c0gent/poa-bridge.git","clone_url":"https://github.com/c0gent/poa-bridge.git","svn_url":"https://github.com/c0gent/poa-bridge","homepage":"https://bridge.poa.net/","size":3426,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"poanetwork:master","ref":"master","sha":"69474ce7a1541a3a73273f2925482ed27cf8c4ec","user":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":105842575,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU4NDI1NzU=","name":"poa-bridge","full_name":"poanetwork/poa-bridge","owner":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/poanetwork/poa-bridge","description":"POA <-> Ethereum bridge for self transfers of POA native token to POA20 (ERC20 representation)","fork":false,"url":"https://api.github.com/repos/poanetwork/poa-bridge","forks_url":"https://api.github.com/repos/poanetwork/poa-bridge/forks","keys_url":"https://api.github.com/repos/poanetwork/poa-bridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poanetwork/poa-bridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poanetwork/poa-bridge/teams","hooks_url":"https://api.github.com/repos/poanetwork/poa-bridge/hooks","issue_events_url":"https://api.github.com/repos/poanetwork/poa-bridge/issues/events{/number}","events_url":"https://api.github.com/repos/poanetwork/poa-bridge/events","assignees_url":"https://api.github.com/repos/poanetwork/poa-bridge/assignees{/user}","branches_url":"https://api.github.com/repos/poanetwork/poa-bridge/branches{/branch}","tags_url":"https://api.github.com/repos/poanetwork/poa-bridge/tags","blobs_url":"https://api.github.com/repos/poanetwork/poa-bridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poanetwork/poa-bridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poanetwork/poa-bridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/poanetwork/poa-bridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poanetwork/poa-bridge/statuses/{sha}","languages_url":"https://api.github.com/repos/poanetwork/poa-bridge/languages","stargazers_url":"https://api.github.com/repos/poanetwork/poa-bridge/stargazers","contributors_url":"https://api.github.com/repos/poanetwork/poa-bridge/contributors","subscribers_url":"https://api.github.com/repos/poanetwork/poa-bridge/subscribers","subscription_url":"https://api.github.com/repos/poanetwork/poa-bridge/subscription","commits_url":"https://api.github.com/repos/poanetwork/poa-bridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/poanetwork/poa-bridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/poanetwork/poa-bridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/poanetwork/poa-bridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/poanetwork/poa-bridge/contents/{+path}","compare_url":"https://api.github.com/repos/poanetwork/poa-bridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poanetwork/poa-bridge/merges","archive_url":"https://api.github.com/repos/poanetwork/poa-bridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poanetwork/poa-bridge/downloads","issues_url":"https://api.github.com/repos/poanetwork/poa-bridge/issues{/number}","pulls_url":"https://api.github.com/repos/poanetwork/poa-bridge/pulls{/number}","milestones_url":"https://api.github.com/repos/poanetwork/poa-bridge/milestones{/number}","notifications_url":"https://api.github.com/repos/poanetwork/poa-bridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poanetwork/poa-bridge/labels{/name}","releases_url":"https://api.github.com/repos/poanetwork/poa-bridge/releases{/id}","deployments_url":"https://api.github.com/repos/poanetwork/poa-bridge/deployments","created_at":"2017-10-05T02:45:44Z","updated_at":"2018-06-16T03:52:58Z","pushed_at":"2018-06-19T16:55:57Z","git_url":"git://github.com/poanetwork/poa-bridge.git","ssh_url":"git@github.com:poanetwork/poa-bridge.git","clone_url":"https://github.com/poanetwork/poa-bridge.git","svn_url":"https://github.com/poanetwork/poa-bridge","homepage":"https://bridge.poa.net/","size":3424,"stargazers_count":29,"watchers_count":29,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":17,"open_issues":28,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/110"},"html":{"href":"https://github.com/poanetwork/poa-bridge/pull/110"},"issue":{"href":"https://api.github.com/repos/poanetwork/poa-bridge/issues/110"},"comments":{"href":"https://api.github.com/repos/poanetwork/poa-bridge/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/poanetwork/poa-bridge/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/poanetwork/poa-bridge/statuses/9cc681474a82d80b5e4a9857ef1f853b92cf02a9"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":324,"deletions":91,"changed_files":11}}
{"actor":{"display_login":"c0gent"}}