{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/93","repository_url":"https://api.github.com/repos/ethereum/eth2.0-specs","labels_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/93/comments","events_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/93/events","html_url":"https://github.com/ethereum/eth2.0-specs/pull/93","id":372179732,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NDU1ODQ5","number":93,"title":"Fix `shard_and_committte_for_slots` update process","user":{"login":"rawfalafel","id":202157,"node_id":"MDQ6VXNlcjIwMjE1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/202157?v=4","gravatar_id":"","url":"https://api.github.com/users/rawfalafel","html_url":"https://github.com/rawfalafel","followers_url":"https://api.github.com/users/rawfalafel/followers","following_url":"https://api.github.com/users/rawfalafel/following{/other_user}","gists_url":"https://api.github.com/users/rawfalafel/gists{/gist_id}","starred_url":"https://api.github.com/users/rawfalafel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawfalafel/subscriptions","organizations_url":"https://api.github.com/users/rawfalafel/orgs","repos_url":"https://api.github.com/users/rawfalafel/repos","events_url":"https://api.github.com/users/rawfalafel/events{/privacy}","received_events_url":"https://api.github.com/users/rawfalafel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-20T06:32:17Z","updated_at":"2018-10-22T11:21:50Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ethereum/eth2.0-specs/pulls/93","html_url":"https://github.com/ethereum/eth2.0-specs/pull/93","diff_url":"https://github.com/ethereum/eth2.0-specs/pull/93.diff","patch_url":"https://github.com/ethereum/eth2.0-specs/pull/93.patch"},"body":"If I understand correctly, `shard_and_committee_for_slots` only changes during a validator set change."},"comment":{"url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/comments/431806920","html_url":"https://github.com/ethereum/eth2.0-specs/pull/93#issuecomment-431806920","issue_url":"https://api.github.com/repos/ethereum/eth2.0-specs/issues/93","id":431806920,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTgwNjkyMA==","user":{"login":"djrtwo","id":1433595,"node_id":"MDQ6VXNlcjE0MzM1OTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1433595?v=4","gravatar_id":"","url":"https://api.github.com/users/djrtwo","html_url":"https://github.com/djrtwo","followers_url":"https://api.github.com/users/djrtwo/followers","following_url":"https://api.github.com/users/djrtwo/following{/other_user}","gists_url":"https://api.github.com/users/djrtwo/gists{/gist_id}","starred_url":"https://api.github.com/users/djrtwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djrtwo/subscriptions","organizations_url":"https://api.github.com/users/djrtwo/orgs","repos_url":"https://api.github.com/users/djrtwo/repos","events_url":"https://api.github.com/users/djrtwo/events{/privacy}","received_events_url":"https://api.github.com/users/djrtwo/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T11:21:50Z","updated_at":"2018-10-22T11:21:50Z","author_association":"CONTRIBUTOR","body":"The first half of the array always represents the previous shuffling. The second half represents the current shuffling.\r\n\r\nSo we only update the _current shuffling_ when there was a change. We always update the prev shuffling to reflect what the current shuffling was.\r\n\r\nAssume the following happens:\r\n- at state transition 0, we get a new shuffling (normal case)\r\n  - assign the first half as the second half to remember the prev shuffling\r\n  - update the second half\r\n- at state transition 1, we don't get a new shuffling\r\n  - the shuffling in the first half needs to always represent the previous shuffling, so we need to update it to the reflect that\r\n  - the shuffling is going to stay the same in the second half\r\n- at state transition 2, we don't get a new shulffling\r\n  - the shuffling of the first half doesn't actually need to change, and _won't_ change, but we do the assignment of the second half to the first half for simplicity.\r\n  - the shuffling is going to stay the same in the second half\r\n- at state transition 3, we get a new shuffling\r\n  - assign the first half as the second half to remember the prev shuffling\r\n  - update the second half"}}
{"actor":{"display_login":"djrtwo"}}