{"action":"created","issue":{"url":"https://api.github.com/repos/bosnet/sebak/issues/93","repository_url":"https://api.github.com/repos/bosnet/sebak","labels_url":"https://api.github.com/repos/bosnet/sebak/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/bosnet/sebak/issues/93/comments","events_url":"https://api.github.com/repos/bosnet/sebak/issues/93/events","html_url":"https://github.com/bosnet/sebak/pull/93","id":333122850,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NDE0NTUy","number":93,"title":"Fix #1, #133 - Implement sebak wallet pay","user":{"login":"Geod24","id":2180215,"node_id":"MDQ6VXNlcjIxODAyMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/2180215?v=4","gravatar_id":"","url":"https://api.github.com/users/Geod24","html_url":"https://github.com/Geod24","followers_url":"https://api.github.com/users/Geod24/followers","following_url":"https://api.github.com/users/Geod24/following{/other_user}","gists_url":"https://api.github.com/users/Geod24/gists{/gist_id}","starred_url":"https://api.github.com/users/Geod24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geod24/subscriptions","organizations_url":"https://api.github.com/users/Geod24/orgs","repos_url":"https://api.github.com/users/Geod24/repos","events_url":"https://api.github.com/users/Geod24/events{/privacy}","received_events_url":"https://api.github.com/users/Geod24/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Geod24","id":2180215,"node_id":"MDQ6VXNlcjIxODAyMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/2180215?v=4","gravatar_id":"","url":"https://api.github.com/users/Geod24","html_url":"https://github.com/Geod24","followers_url":"https://api.github.com/users/Geod24/followers","following_url":"https://api.github.com/users/Geod24/following{/other_user}","gists_url":"https://api.github.com/users/Geod24/gists{/gist_id}","starred_url":"https://api.github.com/users/Geod24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geod24/subscriptions","organizations_url":"https://api.github.com/users/Geod24/orgs","repos_url":"https://api.github.com/users/Geod24/repos","events_url":"https://api.github.com/users/Geod24/events{/privacy}","received_events_url":"https://api.github.com/users/Geod24/received_events","type":"User","site_admin":false},"assignees":[{"login":"Geod24","id":2180215,"node_id":"MDQ6VXNlcjIxODAyMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/2180215?v=4","gravatar_id":"","url":"https://api.github.com/users/Geod24","html_url":"https://github.com/Geod24","followers_url":"https://api.github.com/users/Geod24/followers","following_url":"https://api.github.com/users/Geod24/following{/other_user}","gists_url":"https://api.github.com/users/Geod24/gists{/gist_id}","starred_url":"https://api.github.com/users/Geod24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geod24/subscriptions","organizations_url":"https://api.github.com/users/Geod24/orgs","repos_url":"https://api.github.com/users/Geod24/repos","events_url":"https://api.github.com/users/Geod24/events{/privacy}","received_events_url":"https://api.github.com/users/Geod24/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-06-18T03:23:59Z","updated_at":"2018-06-28T09:05:55Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/bosnet/sebak/pulls/93","html_url":"https://github.com/bosnet/sebak/pull/93","diff_url":"https://github.com/bosnet/sebak/pull/93.diff","patch_url":"https://github.com/bosnet/sebak/pull/93.patch"},"body":"Based on #82 \r\n\r\nThis send a simple transaction to a node, using the endpoint's address.\r\nFor testing, I start the three nodes using:\r\n```\r\ndocker run --net host --rm -it --env-file=docker/node1.env sebak\r\ndocker run --net host --rm -it --env-file=docker/node2.env sebak\r\ndocker run --net host --rm -it --env-file=docker/node3.env sebak\r\n```\r\n\r\nThan I send the payment using:\r\n```\r\ndocker build . -t sebak-testing && docker rmi -f $(docker images -f \"dangling=true\" -q) && docker run --rm --network host -it sebak-testing wallet pay 150000 SBECGI3FSCYHNQIMANNCWQSVA6S5C6L4BXFKAPMBAMI5V47NWXNE37MN GAYGELM74WJMKSLDN5YP2VAMP64WC4IXIGICUNK2SCVIT7KPTLY7M3MW  --endpoint=https://127.0.0.1:2822\r\n```\r\n\r\nNotice that this is sending 150k GON from Genesis account / Node 1's account to Node 2's account, and the transaction is relayed to Node 2.\r\nThere's a few questions that this raised:\r\n- How do we validate the transaction. In a real world, we want to prevent attacker from DDoSing us. A common technique used for this is banning, which is triggered by malicious actions. If we don't validate that the transaction would pass consensus beforehand, we cannot use this mechanism or we risk banning good users.\r\n- In order to check that a tx would pass consensus, we need to know the state of the blockchain at the moment. Which is completely out of scope of a small CLI tool. One way to mitigate this would be to have \"relay\" nodes (akin to Stellar's Horizon) who do the validation.\r\n- We should look into definining a config file for Sebak.\r\n\r\nThis does not work ATM, the output for the receiver node (2) is:\r\n```\r\n127.0.0.1 - - [18/Jun/2018:03:12:39 +0000] \"POST /message HTTP/2.0\" 200 0 \"\" \"Go-http-client/2.0\"\r\n127.0.0.1 - - [18/Jun/2018:03:12:40 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GDTE.6RAE\"\r\n127.0.0.1 - - [18/Jun/2018:03:12:40 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GDIR.M6CC\"\r\n127.0.0.1 - - [18/Jun/2018:03:12:40 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GDTE.6RAE\"\r\n127.0.0.1 - - [18/Jun/2018:03:12:40 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GDIR.M6CC\"\r\nEROR[06-18|03:12:40] failed to handle ballot                  module=sebak node=GAYG.TLY7 error=\"{\\\"code\\\":100,\\\"message\\\":\\\"already exists in block\\\"}\"\r\nEROR[06-18|03:12:40] consensus closed                         module=sebak node=GAYG.TLY7\r\n```\r\n\r\nOther nodes display a similar error (following is node 1):\r\n```\r\n127.0.0.1 - - [18/Jun/2018:03:12:39 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GAYG.TLY7\"\r\n127.0.0.1 - - [18/Jun/2018:03:12:40 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GDTE.6RAE\"\r\nEROR[06-18|03:12:40] failed to handle ballot                  module=sebak node=GDIR.M6CC error=\"{\\\"code\\\":100,\\\"message\\\":\\\"already exists in block\\\"}\"\r\nEROR[06-18|03:12:40] consensus closed                         module=sebak node=GDIR.M6CC\r\n127.0.0.1 - - [18/Jun/2018:03:12:40 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GDTE.6RAE\"\r\n127.0.0.1 - - [18/Jun/2018:03:12:40 +0000] \"POST /ballot HTTP/2.0\" 200 0 \"\" \"v-GAYG.TLY7\"\r\n```\r\n\r\nCode written while pair programming with @cmcm2222 "},"comment":{"url":"https://api.github.com/repos/bosnet/sebak/issues/comments/400966265","html_url":"https://github.com/bosnet/sebak/pull/93#issuecomment-400966265","issue_url":"https://api.github.com/repos/bosnet/sebak/issues/93","id":400966265,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDk2NjI2NQ==","user":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T09:05:55Z","updated_at":"2018-06-28T09:05:55Z","author_association":"MEMBER","body":"@Geod24 If you think that this PR should be with #140, I suggest that this PR can be continue after fully discussing our checkpoint issue.\r\n\r\nImplementing wallet can be handled by another new PR. "}}
{"actor":{"display_login":"spikeekips"}}