{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2081","repository_url":"https://api.github.com/repos/ethereum/go-ethereum","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2081/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2081/comments","events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2081/events","html_url":"https://github.com/ethereum/go-ethereum/pull/2081","id":122420535,"number":2081,"title":"core: create a header chain structure shared by full and light clients","user":{"login":"zsfelfoldi","id":9884311,"avatar_url":"https://avatars.githubusercontent.com/u/9884311?v=3","gravatar_id":"","url":"https://api.github.com/users/zsfelfoldi","html_url":"https://github.com/zsfelfoldi","followers_url":"https://api.github.com/users/zsfelfoldi/followers","following_url":"https://api.github.com/users/zsfelfoldi/following{/other_user}","gists_url":"https://api.github.com/users/zsfelfoldi/gists{/gist_id}","starred_url":"https://api.github.com/users/zsfelfoldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsfelfoldi/subscriptions","organizations_url":"https://api.github.com/users/zsfelfoldi/orgs","repos_url":"https://api.github.com/users/zsfelfoldi/repos","events_url":"https://api.github.com/users/zsfelfoldi/events{/privacy}","received_events_url":"https://api.github.com/users/zsfelfoldi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ethereum/go-ethereum/labels/core","name":"core","color":"fbca04"},{"url":"https://api.github.com/repos/ethereum/go-ethereum/labels/review","name":"review","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"zsfelfoldi","id":9884311,"avatar_url":"https://avatars.githubusercontent.com/u/9884311?v=3","gravatar_id":"","url":"https://api.github.com/users/zsfelfoldi","html_url":"https://github.com/zsfelfoldi","followers_url":"https://api.github.com/users/zsfelfoldi/followers","following_url":"https://api.github.com/users/zsfelfoldi/following{/other_user}","gists_url":"https://api.github.com/users/zsfelfoldi/gists{/gist_id}","starred_url":"https://api.github.com/users/zsfelfoldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsfelfoldi/subscriptions","organizations_url":"https://api.github.com/users/zsfelfoldi/orgs","repos_url":"https://api.github.com/users/zsfelfoldi/repos","events_url":"https://api.github.com/users/zsfelfoldi/events{/privacy}","received_events_url":"https://api.github.com/users/zsfelfoldi/received_events","type":"User","site_admin":false},"milestone":null,"comments":13,"created_at":"2015-12-16T03:37:18Z","updated_at":"2016-02-04T13:10:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2081","html_url":"https://github.com/ethereum/go-ethereum/pull/2081","diff_url":"https://github.com/ethereum/go-ethereum/pull/2081.diff","patch_url":"https://github.com/ethereum/go-ethereum/pull/2081.patch"},"body":"This PR moves the basic canonical chain logic out of core.BlockChain into core.HeaderChain, which only handles block headers. The purpose of this refactoring is to separate everything that is actually related to a full node from the basic chain logic which can be used by the light client (the future light.LightChain structure) too."},"comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments/179824151","html_url":"https://github.com/ethereum/go-ethereum/pull/2081#issuecomment-179824151","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2081","id":179824151,"user":{"login":"karalabe","id":129561,"avatar_url":"https://avatars.githubusercontent.com/u/129561?v=3","gravatar_id":"","url":"https://api.github.com/users/karalabe","html_url":"https://github.com/karalabe","followers_url":"https://api.github.com/users/karalabe/followers","following_url":"https://api.github.com/users/karalabe/following{/other_user}","gists_url":"https://api.github.com/users/karalabe/gists{/gist_id}","starred_url":"https://api.github.com/users/karalabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karalabe/subscriptions","organizations_url":"https://api.github.com/users/karalabe/orgs","repos_url":"https://api.github.com/users/karalabe/repos","events_url":"https://api.github.com/users/karalabe/events{/privacy}","received_events_url":"https://api.github.com/users/karalabe/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T13:10:31Z","updated_at":"2016-02-04T13:10:31Z","body":"No, the waste of resources is the time spent debugging hidden dependencies caused by using something \"wrong\". Exposing something into the public API but requiring it to be used in a very specific way locking wise is asking for trouble and I guarantee it will break very soon.\r\n\r\nIt also adds a dependency from core to light, as we can no longer change the internals of the blockchain or the headerchain because the locking mechanisms are leaked out all over the rest of the code base and we have no guarantee that a minor modification will still be compatible with calling client code or not.\r\n\r\nAs long as you stay within the boundaries of a package, having access to internal mechanisms is completely fine, although I would argue that even then it's very ill advised. Providing access to package internals from outside of the package however is not something that should ever be done."}}