{"action":"created","comment":{"url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/comments/193824568","pull_request_review_id":126876254,"id":193824568,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzgyNDU2OA==","diff_hunk":"@@ -174,3 +204,19 @@ func DeserializeBlobToTx(serialisedBlob []byte) (*[]*types.Transaction, error) {\n \n \treturn &txs, nil\n }\n+\n+// Chunks is a wrapper around a chunk array to implement DerivableList,\n+// which allows us to Merklize the chunks into the chunkRoot.\n+type Chunks []byte\n+\n+// Len returns the number of chunks in this list.\n+func (ch Chunks) Len() int { return len(ch) }\n+\n+// GetRlp returns the RLP encoding of one chunk from the list.\n+func (ch Chunks) GetRlp(i int) []byte {\n+\tbytes, err := rlp.EncodeToBytes(ch[i])\n+\tif err != nil {\n+\t\tpanic(err)","path":"sharding/collation.go","position":70,"original_position":64,"commit_id":"5c58544f88fbfae8023496bbd6b247317862daf8","original_commit_id":"921be77237565eaf8691722aff17ab7bb7241819","user":{"login":"elihanover","id":18421672,"node_id":"MDQ6VXNlcjE4NDIxNjcy","avatar_url":"https://avatars2.githubusercontent.com/u/18421672?v=4","gravatar_id":"","url":"https://api.github.com/users/elihanover","html_url":"https://github.com/elihanover","followers_url":"https://api.github.com/users/elihanover/followers","following_url":"https://api.github.com/users/elihanover/following{/other_user}","gists_url":"https://api.github.com/users/elihanover/gists{/gist_id}","starred_url":"https://api.github.com/users/elihanover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elihanover/subscriptions","organizations_url":"https://api.github.com/users/elihanover/orgs","repos_url":"https://api.github.com/users/elihanover/repos","events_url":"https://api.github.com/users/elihanover/events{/privacy}","received_events_url":"https://api.github.com/users/elihanover/received_events","type":"User","site_admin":false},"body":"I'm using the ```DerivableList`` interface so that I can use the ```DeriveSha``` function, but I could always write a similar function specific to hashing for the chunk root.","created_at":"2018-06-07T17:13:05Z","updated_at":"2018-06-07T17:13:06Z","html_url":"https://github.com/prysmaticlabs/geth-sharding/pull/133#discussion_r193824568","pull_request_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/comments/193824568"},"html":{"href":"https://github.com/prysmaticlabs/geth-sharding/pull/133#discussion_r193824568"},"pull_request":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133"}},"in_reply_to_id":193277329},"pull_request":{"url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133","id":190052001,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwMDUyMDAx","html_url":"https://github.com/prysmaticlabs/geth-sharding/pull/133","diff_url":"https://github.com/prysmaticlabs/geth-sharding/pull/133.diff","patch_url":"https://github.com/prysmaticlabs/geth-sharding/pull/133.patch","issue_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/issues/133","number":133,"state":"open","locked":false,"title":"Construct Collation and Merklize Chunks into chunkRoot","user":{"login":"elihanover","id":18421672,"node_id":"MDQ6VXNlcjE4NDIxNjcy","avatar_url":"https://avatars2.githubusercontent.com/u/18421672?v=4","gravatar_id":"","url":"https://api.github.com/users/elihanover","html_url":"https://github.com/elihanover","followers_url":"https://api.github.com/users/elihanover/followers","following_url":"https://api.github.com/users/elihanover/following{/other_user}","gists_url":"https://api.github.com/users/elihanover/gists{/gist_id}","starred_url":"https://api.github.com/users/elihanover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elihanover/subscriptions","organizations_url":"https://api.github.com/users/elihanover/orgs","repos_url":"https://api.github.com/users/elihanover/repos","events_url":"https://api.github.com/users/elihanover/events{/privacy}","received_events_url":"https://api.github.com/users/elihanover/received_events","type":"User","site_admin":false},"body":"This is a PR referencing #125 to construct collation instances from serialized blobs as well as merklizing the blobs to get the chunkRoot.\r\n\r\n### Details\r\n- deserialize body into tx list and pass list into ```NewCollation``` function\r\n- created wrapper ```Chunks``` in order to use ```types.DeriveSha``` function\r\n- merklize chunks in ```SaveBody```\r\n","created_at":"2018-05-23T17:35:22Z","updated_at":"2018-06-07T17:13:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"925bdbe1adf945952eab29833ae35f17fc57f6f4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/milestones/1","html_url":"https://github.com/prysmaticlabs/geth-sharding/milestone/1","labels_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/milestones/1/labels","id":3141840,"node_id":"MDk6TWlsZXN0b25lMzE0MTg0MA==","number":1,"title":"Ruby","description":"The Ruby Release: Local Alphanet","creator":{"login":"prestonvanloon","id":7246818,"node_id":"MDQ6VXNlcjcyNDY4MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/7246818?v=4","gravatar_id":"","url":"https://api.github.com/users/prestonvanloon","html_url":"https://github.com/prestonvanloon","followers_url":"https://api.github.com/users/prestonvanloon/followers","following_url":"https://api.github.com/users/prestonvanloon/following{/other_user}","gists_url":"https://api.github.com/users/prestonvanloon/gists{/gist_id}","starred_url":"https://api.github.com/users/prestonvanloon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestonvanloon/subscriptions","organizations_url":"https://api.github.com/users/prestonvanloon/orgs","repos_url":"https://api.github.com/users/prestonvanloon/repos","events_url":"https://api.github.com/users/prestonvanloon/events{/privacy}","received_events_url":"https://api.github.com/users/prestonvanloon/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":66,"state":"open","created_at":"2018-02-25T21:22:44Z","updated_at":"2018-06-07T02:41:31Z","due_on":"2018-08-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133/commits","review_comments_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133/comments","review_comment_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/issues/133/comments","statuses_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/statuses/5c58544f88fbfae8023496bbd6b247317862daf8","head":{"label":"elihanover:construct-collation","ref":"construct-collation","sha":"5c58544f88fbfae8023496bbd6b247317862daf8","user":{"login":"elihanover","id":18421672,"node_id":"MDQ6VXNlcjE4NDIxNjcy","avatar_url":"https://avatars2.githubusercontent.com/u/18421672?v=4","gravatar_id":"","url":"https://api.github.com/users/elihanover","html_url":"https://github.com/elihanover","followers_url":"https://api.github.com/users/elihanover/followers","following_url":"https://api.github.com/users/elihanover/following{/other_user}","gists_url":"https://api.github.com/users/elihanover/gists{/gist_id}","starred_url":"https://api.github.com/users/elihanover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elihanover/subscriptions","organizations_url":"https://api.github.com/users/elihanover/orgs","repos_url":"https://api.github.com/users/elihanover/repos","events_url":"https://api.github.com/users/elihanover/events{/privacy}","received_events_url":"https://api.github.com/users/elihanover/received_events","type":"User","site_admin":false},"repo":{"id":131771123,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE3NzExMjM=","name":"go-ethereum","full_name":"elihanover/go-ethereum","owner":{"login":"elihanover","id":18421672,"node_id":"MDQ6VXNlcjE4NDIxNjcy","avatar_url":"https://avatars2.githubusercontent.com/u/18421672?v=4","gravatar_id":"","url":"https://api.github.com/users/elihanover","html_url":"https://github.com/elihanover","followers_url":"https://api.github.com/users/elihanover/followers","following_url":"https://api.github.com/users/elihanover/following{/other_user}","gists_url":"https://api.github.com/users/elihanover/gists{/gist_id}","starred_url":"https://api.github.com/users/elihanover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elihanover/subscriptions","organizations_url":"https://api.github.com/users/elihanover/orgs","repos_url":"https://api.github.com/users/elihanover/repos","events_url":"https://api.github.com/users/elihanover/events{/privacy}","received_events_url":"https://api.github.com/users/elihanover/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elihanover/go-ethereum","description":"Official Go implementation of the Ethereum protocol","fork":true,"url":"https://api.github.com/repos/elihanover/go-ethereum","forks_url":"https://api.github.com/repos/elihanover/go-ethereum/forks","keys_url":"https://api.github.com/repos/elihanover/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elihanover/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elihanover/go-ethereum/teams","hooks_url":"https://api.github.com/repos/elihanover/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/elihanover/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/elihanover/go-ethereum/events","assignees_url":"https://api.github.com/repos/elihanover/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/elihanover/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/elihanover/go-ethereum/tags","blobs_url":"https://api.github.com/repos/elihanover/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elihanover/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elihanover/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/elihanover/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elihanover/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/elihanover/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/elihanover/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/elihanover/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/elihanover/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/elihanover/go-ethereum/subscription","commits_url":"https://api.github.com/repos/elihanover/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/elihanover/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/elihanover/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/elihanover/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/elihanover/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/elihanover/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elihanover/go-ethereum/merges","archive_url":"https://api.github.com/repos/elihanover/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elihanover/go-ethereum/downloads","issues_url":"https://api.github.com/repos/elihanover/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/elihanover/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/elihanover/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/elihanover/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elihanover/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/elihanover/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/elihanover/go-ethereum/deployments","created_at":"2018-05-01T22:50:07Z","updated_at":"2018-05-08T19:44:16Z","pushed_at":"2018-06-07T17:08:30Z","git_url":"git://github.com/elihanover/go-ethereum.git","ssh_url":"git@github.com:elihanover/go-ethereum.git","clone_url":"https://github.com/elihanover/go-ethereum.git","svn_url":"https://github.com/elihanover/go-ethereum","homepage":"https://geth.ethereum.org","size":98826,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prysmaticlabs:master","ref":"master","sha":"84d139d39604d826de7d882ccd5891ec5afbe293","user":{"login":"prysmaticlabs","id":35349758,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQ5NzU4","avatar_url":"https://avatars2.githubusercontent.com/u/35349758?v=4","gravatar_id":"","url":"https://api.github.com/users/prysmaticlabs","html_url":"https://github.com/prysmaticlabs","followers_url":"https://api.github.com/users/prysmaticlabs/followers","following_url":"https://api.github.com/users/prysmaticlabs/following{/other_user}","gists_url":"https://api.github.com/users/prysmaticlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/prysmaticlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prysmaticlabs/subscriptions","organizations_url":"https://api.github.com/users/prysmaticlabs/orgs","repos_url":"https://api.github.com/users/prysmaticlabs/repos","events_url":"https://api.github.com/users/prysmaticlabs/events{/privacy}","received_events_url":"https://api.github.com/users/prysmaticlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":117156031,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxNTYwMzE=","name":"geth-sharding","full_name":"prysmaticlabs/geth-sharding","owner":{"login":"prysmaticlabs","id":35349758,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQ5NzU4","avatar_url":"https://avatars2.githubusercontent.com/u/35349758?v=4","gravatar_id":"","url":"https://api.github.com/users/prysmaticlabs","html_url":"https://github.com/prysmaticlabs","followers_url":"https://api.github.com/users/prysmaticlabs/followers","following_url":"https://api.github.com/users/prysmaticlabs/following{/other_user}","gists_url":"https://api.github.com/users/prysmaticlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/prysmaticlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prysmaticlabs/subscriptions","organizations_url":"https://api.github.com/users/prysmaticlabs/orgs","repos_url":"https://api.github.com/users/prysmaticlabs/repos","events_url":"https://api.github.com/users/prysmaticlabs/events{/privacy}","received_events_url":"https://api.github.com/users/prysmaticlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prysmaticlabs/geth-sharding","description":"Go implementation of the Ethereum sharding specification and stateless client","fork":true,"url":"https://api.github.com/repos/prysmaticlabs/geth-sharding","forks_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/forks","keys_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/teams","hooks_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/hooks","issue_events_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/issues/events{/number}","events_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/events","assignees_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/assignees{/user}","branches_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/branches{/branch}","tags_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/tags","blobs_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/git/refs{/sha}","trees_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/statuses/{sha}","languages_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/languages","stargazers_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/stargazers","contributors_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/contributors","subscribers_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/subscribers","subscription_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/subscription","commits_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/commits{/sha}","git_commits_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/git/commits{/sha}","comments_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/comments{/number}","issue_comment_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/issues/comments{/number}","contents_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/contents/{+path}","compare_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/merges","archive_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/downloads","issues_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/issues{/number}","pulls_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls{/number}","milestones_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/milestones{/number}","notifications_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/labels{/name}","releases_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/releases{/id}","deployments_url":"https://api.github.com/repos/prysmaticlabs/geth-sharding/deployments","created_at":"2018-01-11T21:31:33Z","updated_at":"2018-06-06T19:15:50Z","pushed_at":"2018-06-07T17:08:31Z","git_url":"git://github.com/prysmaticlabs/geth-sharding.git","ssh_url":"git@github.com:prysmaticlabs/geth-sharding.git","clone_url":"https://github.com/prysmaticlabs/geth-sharding.git","svn_url":"https://github.com/prysmaticlabs/geth-sharding","homepage":"https://prysmaticlabs.com/","size":98733,"stargazers_count":94,"watchers_count":94,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":11,"open_issues":34,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133"},"html":{"href":"https://github.com/prysmaticlabs/geth-sharding/pull/133"},"issue":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/issues/133"},"comments":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/prysmaticlabs/geth-sharding/statuses/5c58544f88fbfae8023496bbd6b247317862daf8"}},"author_association":"NONE"}}
{"actor":{"display_login":"elihanover"}}