{"action":"opened","issue":{"url":"https://api.github.com/repos/ergoplatform/ergo/issues/328","repository_url":"https://api.github.com/repos/ergoplatform/ergo","labels_url":"https://api.github.com/repos/ergoplatform/ergo/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/ergoplatform/ergo/issues/328/comments","events_url":"https://api.github.com/repos/ergoplatform/ergo/issues/328/events","html_url":"https://github.com/ergoplatform/ergo/issues/328","id":336534455,"node_id":"MDU6SXNzdWUzMzY1MzQ0NTU=","number":328,"title":"bestFullBlock and bestHeader are not linearized ","user":{"login":"kushti","id":1972441,"node_id":"MDQ6VXNlcjE5NzI0NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1972441?v=4","gravatar_id":"","url":"https://api.github.com/users/kushti","html_url":"https://github.com/kushti","followers_url":"https://api.github.com/users/kushti/followers","following_url":"https://api.github.com/users/kushti/following{/other_user}","gists_url":"https://api.github.com/users/kushti/gists{/gist_id}","starred_url":"https://api.github.com/users/kushti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kushti/subscriptions","organizations_url":"https://api.github.com/users/kushti/orgs","repos_url":"https://api.github.com/users/kushti/repos","events_url":"https://api.github.com/users/kushti/events{/privacy}","received_events_url":"https://api.github.com/users/kushti/received_events","type":"User","site_admin":false},"labels":[{"id":625747468,"node_id":"MDU6TGFiZWw2MjU3NDc0Njg=","url":"https://api.github.com/repos/ergoplatform/ergo/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"kushti","id":1972441,"node_id":"MDQ6VXNlcjE5NzI0NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1972441?v=4","gravatar_id":"","url":"https://api.github.com/users/kushti","html_url":"https://github.com/kushti","followers_url":"https://api.github.com/users/kushti/followers","following_url":"https://api.github.com/users/kushti/following{/other_user}","gists_url":"https://api.github.com/users/kushti/gists{/gist_id}","starred_url":"https://api.github.com/users/kushti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kushti/subscriptions","organizations_url":"https://api.github.com/users/kushti/orgs","repos_url":"https://api.github.com/users/kushti/repos","events_url":"https://api.github.com/users/kushti/events{/privacy}","received_events_url":"https://api.github.com/users/kushti/received_events","type":"User","site_admin":false},"assignees":[{"login":"kushti","id":1972441,"node_id":"MDQ6VXNlcjE5NzI0NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1972441?v=4","gravatar_id":"","url":"https://api.github.com/users/kushti","html_url":"https://github.com/kushti","followers_url":"https://api.github.com/users/kushti/followers","following_url":"https://api.github.com/users/kushti/following{/other_user}","gists_url":"https://api.github.com/users/kushti/gists{/gist_id}","starred_url":"https://api.github.com/users/kushti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kushti/subscriptions","organizations_url":"https://api.github.com/users/kushti/orgs","repos_url":"https://api.github.com/users/kushti/repos","events_url":"https://api.github.com/users/kushti/events{/privacy}","received_events_url":"https://api.github.com/users/kushti/received_events","type":"User","site_admin":false},{"login":"catena2w","id":15503202,"node_id":"MDQ6VXNlcjE1NTAzMjAy","avatar_url":"https://avatars3.githubusercontent.com/u/15503202?v=4","gravatar_id":"","url":"https://api.github.com/users/catena2w","html_url":"https://github.com/catena2w","followers_url":"https://api.github.com/users/catena2w/followers","following_url":"https://api.github.com/users/catena2w/following{/other_user}","gists_url":"https://api.github.com/users/catena2w/gists{/gist_id}","starred_url":"https://api.github.com/users/catena2w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catena2w/subscriptions","organizations_url":"https://api.github.com/users/catena2w/orgs","repos_url":"https://api.github.com/users/catena2w/repos","events_url":"https://api.github.com/users/catena2w/events{/privacy}","received_events_url":"https://api.github.com/users/catena2w/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-28T09:02:44Z","updated_at":"2018-06-28T09:02:44Z","closed_at":null,"author_association":"MEMBER","body":"Potentially bestFullBlock* and bestHeader* variables in ErgoHistory could reference different chains(due to forks), which is counter-intuitive and causing problems in ErgoHistory clients (e.g. nextModifiersToDownload in ToDownloadsProcessor and findCandidate in ErgoModifiersCache, but we need to carefully check all the places where bestFullBlock.header is handled to be sure it is not considered as a part of a best-headers chain).\r\n\r\nPossible solutions are: \r\n1) include \"commonBlock\" variable to the ErgoHistory interface, which shows a common block of two potentially different chains(one with most work, another with most work and full blocks only). Then client applications can check whether forking happens (by checking commonBlock == fullBlock). \r\n\r\n2) make the only one best chain rule, then bestFullBlock and bestHeader will be linearized. Switching to a better chain will happen only if it contains enough full blocks (full blocks in the better chain have more cumulative weight than the full block of the current chain).   "}}
{"actor":{"display_login":"kushti"}}