{"action":"created","issue":{"url":"https://api.github.com/repos/poanetwork/blockscout/issues/1083","repository_url":"https://api.github.com/repos/poanetwork/blockscout","labels_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1083/labels{/name}","comments_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1083/comments","events_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1083/events","html_url":"https://github.com/poanetwork/blockscout/issues/1083","id":379562766,"node_id":"MDU6SXNzdWUzNzk1NjI3NjY=","number":1083,"title":"Uncle blocks error in indexer","user":{"login":"APshenkin","id":14344430,"node_id":"MDQ6VXNlcjE0MzQ0NDMw","avatar_url":"https://avatars1.githubusercontent.com/u/14344430?v=4","gravatar_id":"","url":"https://api.github.com/users/APshenkin","html_url":"https://github.com/APshenkin","followers_url":"https://api.github.com/users/APshenkin/followers","following_url":"https://api.github.com/users/APshenkin/following{/other_user}","gists_url":"https://api.github.com/users/APshenkin/gists{/gist_id}","starred_url":"https://api.github.com/users/APshenkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/APshenkin/subscriptions","organizations_url":"https://api.github.com/users/APshenkin/orgs","repos_url":"https://api.github.com/users/APshenkin/repos","events_url":"https://api.github.com/users/APshenkin/events{/privacy}","received_events_url":"https://api.github.com/users/APshenkin/received_events","type":"User","site_admin":false},"labels":[{"id":803248120,"node_id":"MDU6TGFiZWw4MDMyNDgxMjA=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/bug%20:bug:","name":"bug :bug:","color":"ee0701","default":false},{"id":997629238,"node_id":"MDU6TGFiZWw5OTc2MjkyMzg=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/priority:%20high","name":"priority: high","color":"ffb4b4","default":false},{"id":865524916,"node_id":"MDU6TGFiZWw4NjU1MjQ5MTY=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/team:%20architecture","name":"team: architecture","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/poanetwork/blockscout/milestones/2","html_url":"https://github.com/poanetwork/blockscout/milestone/2","labels_url":"https://api.github.com/repos/poanetwork/blockscout/milestones/2/labels","id":3321184,"node_id":"MDk6TWlsZXN0b25lMzMyMTE4NA==","number":2,"title":"Kuala Lumpur","description":"BlockScout Kuala Lumpur release.","creator":{"login":"acravenho","id":17620007,"node_id":"MDQ6VXNlcjE3NjIwMDA3","avatar_url":"https://avatars1.githubusercontent.com/u/17620007?v=4","gravatar_id":"","url":"https://api.github.com/users/acravenho","html_url":"https://github.com/acravenho","followers_url":"https://api.github.com/users/acravenho/followers","following_url":"https://api.github.com/users/acravenho/following{/other_user}","gists_url":"https://api.github.com/users/acravenho/gists{/gist_id}","starred_url":"https://api.github.com/users/acravenho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acravenho/subscriptions","organizations_url":"https://api.github.com/users/acravenho/orgs","repos_url":"https://api.github.com/users/acravenho/repos","events_url":"https://api.github.com/users/acravenho/events{/privacy}","received_events_url":"https://api.github.com/users/acravenho/received_events","type":"User","site_admin":false},"open_issues":135,"closed_issues":159,"state":"open","created_at":"2018-05-04T18:13:34Z","updated_at":"2018-11-12T12:40:13Z","due_on":"2018-12-31T08:00:00Z","closed_at":null},"comments":0,"created_at":"2018-11-11T21:00:34Z","updated_at":"2018-11-12T12:43:59Z","closed_at":null,"author_association":"NONE","body":"*Describe your issue here.*\r\n\r\nDuring explorer running on mainnet I faced error in indexer with uncle blocks. It tries to insert into transaction_forks. But there are already records, so new fail with error:\r\n`iex(1)> 20:51:36.430 application=indexer [error] failed to import 10uncle blocks in step :derive_transaction_forks: %Postgrex.Error{connection_id: 13296, message: nil, postgres: %{code: :unique_violation, constraint: \"transaction_forks_uncle_hash_index_index\", detail: \"Key (uncle_hash, index)=(\\\\x59d3bd7ddd2e398250b175af8239f6b7ce2364fe0d60e24700c068f941d518d9, 90) already exists.\", file: \"nbtinsert.c\", line: \"434\", message: \"duplicate key value violates unique constraint \\\"transaction_forks_uncle_hash_index_index\\\"\", pg_code: \"23505\", routine: \"_bt_check_unique\", schema: \"public\", severity: \"ERROR\", table: \"transaction_forks\", unknown: \"ERROR\"}}`\r\n\r\n\r\nHere is a list of failed uncle hashes:\r\n\r\n0x59d3bd7ddd2e398250b175af8239f6b7ce2364fe0d60e24700c068f941d518d9\r\n0x7ee3909c834e37669c2aa644c777082bf76eb471f877fa59eef668dfcfbbb684\r\n0x9e8906abc24bc0c0ed94716a0dfadd470dd3678a3331ce23b23d508527a1ef2e\r\n0xd8754f4b7bb25cad82342aff06dad52cd1e3068cdae6cbd5d8dce3c69f26d36c\r\n\r\n\r\n### Environment\r\n\r\n* Elixir & Erlang/OTP versions (`elixir -version`):\r\n```\r\nErlang/OTP 21 [erts-10.1.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]\r\n\r\nElixir 1.7.3 (compiled with Erlang/OTP 21)\r\n```\r\n* Operating System:\r\n```\r\nDebian GNU/Linux 9 (stretch)\r\n```\r\n\r\n### Steps to reproduce\r\n\r\nJust syncing Ethereum mainnet\r\n\r\n### Expected behaviour\r\n\r\nProcess duplicates in uncle blocks corretly (overwrite them or just skip)\r\n\r\n### Actual behaviour\r\n\r\nA lot of logs in console `duplicate key value violates unique constraint` :)\r\n"},"comment":{"url":"https://api.github.com/repos/poanetwork/blockscout/issues/comments/437866050","html_url":"https://github.com/poanetwork/blockscout/issues/1083#issuecomment-437866050","issue_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1083","id":437866050,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzg2NjA1MA==","user":{"login":"acravenho","id":17620007,"node_id":"MDQ6VXNlcjE3NjIwMDA3","avatar_url":"https://avatars1.githubusercontent.com/u/17620007?v=4","gravatar_id":"","url":"https://api.github.com/users/acravenho","html_url":"https://github.com/acravenho","followers_url":"https://api.github.com/users/acravenho/followers","following_url":"https://api.github.com/users/acravenho/following{/other_user}","gists_url":"https://api.github.com/users/acravenho/gists{/gist_id}","starred_url":"https://api.github.com/users/acravenho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acravenho/subscriptions","organizations_url":"https://api.github.com/users/acravenho/orgs","repos_url":"https://api.github.com/users/acravenho/repos","events_url":"https://api.github.com/users/acravenho/events{/privacy}","received_events_url":"https://api.github.com/users/acravenho/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T12:43:59Z","updated_at":"2018-11-12T12:43:59Z","author_association":"MEMBER","body":"@APshenkin Thanks for reporting the issue. We'll be covering this issue very soon most likely by dead lettering these blocks at first, marking them as bugs and then resolving the bugs after. \r\n\r\nIn the meantime, you can delete these hashes from the `transaction_forks` table to resolve the issue temporarily. "}}
{"actor":{"display_login":"acravenho"}}