{"action":"created","comment":{"url":"https://api.github.com/repos/algorand/go-algorand/pulls/comments/356330456","pull_request_review_id":330210957,"id":356330456,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1NjMzMDQ1Ng==","diff_hunk":"@@ -143,43 +136,22 @@ type TxGroup struct {\n \t// together, sequentially, in a block in order for the group to be\n \t// valid.  Each hash in the list is a hash of a transaction with\n \t// the `Group` field omitted.\n-\tTxGroupHashes []crypto.Digest `codec:\"txlist\"`\n+\tTxGroupHashes []crypto.Digest `codec:\"txlist,allocbound=config.Consensus[protocol.ConsensusCurrentVersion].MaxTxGroupSize\"`","path":"data/transactions/transaction.go","position":20,"original_position":28,"commit_id":"364dad0644601ed2d13f4db5c20286bcbdef2c73","original_commit_id":"eb748dd23818d2b0ef37df8153e05f5500c9563e","user":{"login":"zeldovich","id":828308,"node_id":"MDQ6VXNlcjgyODMwOA==","avatar_url":"https://avatars0.githubusercontent.com/u/828308?v=4","gravatar_id":"","url":"https://api.github.com/users/zeldovich","html_url":"https://github.com/zeldovich","followers_url":"https://api.github.com/users/zeldovich/followers","following_url":"https://api.github.com/users/zeldovich/following{/other_user}","gists_url":"https://api.github.com/users/zeldovich/gists{/gist_id}","starred_url":"https://api.github.com/users/zeldovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeldovich/subscriptions","organizations_url":"https://api.github.com/users/zeldovich/orgs","repos_url":"https://api.github.com/users/zeldovich/repos","events_url":"https://api.github.com/users/zeldovich/events{/privacy}","received_events_url":"https://api.github.com/users/zeldovich/received_events","type":"User","site_admin":false},"body":"Thinking about it more, this allocbound is one of the ones that should have been `allocbound=-` because we never decode these structs -- we only encode them to compute the txgroup hash..","created_at":"2019-12-10T23:18:04Z","updated_at":"2019-12-10T23:18:05Z","html_url":"https://github.com/algorand/go-algorand/pull/578#discussion_r356330456","pull_request_url":"https://api.github.com/repos/algorand/go-algorand/pulls/578","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/algorand/go-algorand/pulls/comments/356330456"},"html":{"href":"https://github.com/algorand/go-algorand/pull/578#discussion_r356330456"},"pull_request":{"href":"https://api.github.com/repos/algorand/go-algorand/pulls/578"}},"in_reply_to_id":356299484},"pull_request":{"url":"https://api.github.com/repos/algorand/go-algorand/pulls/578","id":348088673,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ4MDg4Njcz","html_url":"https://github.com/algorand/go-algorand/pull/578","diff_url":"https://github.com/algorand/go-algorand/pull/578.diff","patch_url":"https://github.com/algorand/go-algorand/pull/578.patch","issue_url":"https://api.github.com/repos/algorand/go-algorand/issues/578","number":578,"state":"open","locked":false,"title":"DRAFT: static codegen for msgpack encode/decode","user":{"login":"zeldovich","id":828308,"node_id":"MDQ6VXNlcjgyODMwOA==","avatar_url":"https://avatars0.githubusercontent.com/u/828308?v=4","gravatar_id":"","url":"https://api.github.com/users/zeldovich","html_url":"https://github.com/zeldovich","followers_url":"https://api.github.com/users/zeldovich/followers","following_url":"https://api.github.com/users/zeldovich/following{/other_user}","gists_url":"https://api.github.com/users/zeldovich/gists{/gist_id}","starred_url":"https://api.github.com/users/zeldovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeldovich/subscriptions","organizations_url":"https://api.github.com/users/zeldovich/orgs","repos_url":"https://api.github.com/users/zeldovich/repos","events_url":"https://api.github.com/users/zeldovich/events{/privacy}","received_events_url":"https://api.github.com/users/zeldovich/received_events","type":"User","site_admin":false},"body":"This PR sketches out static code generation for msgpack encoding and decoding of blocks and transactions.  A basic benchmark suggests this is about 4x faster than our current use of go-codec.\r\n\r\nHaving fast encoding/decoding is not only good for performance, but will allow us to remove complex and dubious optimizations (like caching txid values or encoding lengths), and will allow us to perform checks that we previously thought would be too expensive (like making sure that an encoding is canonical, by re-encoding).\r\n\r\nHaving explicitly generated code also makes it easier to understand performance and tweak it further; I expect we could get even higher performance by benchmarking and optimizing the static code.  I haven't done any optimizations on this at all, but now pprof should be much less opaque (no reflection) and more actionable.\r\n\r\nThe code generation is done using a modified version of [github.com/tinylib/msgp](https://github.com/tinylib/msgp), forked as [github.com/zeldovich/msgp](https://github.com/zeldovich/msgp).  We should move it into the algorand github project once this is closer to merging.\r\n\r\nRemaining tasks here are to actually wire up some places in the code to call into the new encoders/decoders, and to write some randomized tests to ensure that go-codec and this new encoder agree, along the lines of what `cmd/msgpacktool/core_test.go` does.","created_at":"2019-12-03T02:59:54Z","updated_at":"2019-12-10T23:18:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7a63373b050080aeb2aabccb91f740e65f5a75b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"justicz","id":17011613,"node_id":"MDQ6VXNlcjE3MDExNjEz","avatar_url":"https://avatars2.githubusercontent.com/u/17011613?v=4","gravatar_id":"","url":"https://api.github.com/users/justicz","html_url":"https://github.com/justicz","followers_url":"https://api.github.com/users/justicz/followers","following_url":"https://api.github.com/users/justicz/following{/other_user}","gists_url":"https://api.github.com/users/justicz/gists{/gist_id}","starred_url":"https://api.github.com/users/justicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justicz/subscriptions","organizations_url":"https://api.github.com/users/justicz/orgs","repos_url":"https://api.github.com/users/justicz/repos","events_url":"https://api.github.com/users/justicz/events{/privacy}","received_events_url":"https://api.github.com/users/justicz/received_events","type":"User","site_admin":false},{"login":"tsachiherman","id":24438559,"node_id":"MDQ6VXNlcjI0NDM4NTU5","avatar_url":"https://avatars2.githubusercontent.com/u/24438559?v=4","gravatar_id":"","url":"https://api.github.com/users/tsachiherman","html_url":"https://github.com/tsachiherman","followers_url":"https://api.github.com/users/tsachiherman/followers","following_url":"https://api.github.com/users/tsachiherman/following{/other_user}","gists_url":"https://api.github.com/users/tsachiherman/gists{/gist_id}","starred_url":"https://api.github.com/users/tsachiherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsachiherman/subscriptions","organizations_url":"https://api.github.com/users/tsachiherman/orgs","repos_url":"https://api.github.com/users/tsachiherman/repos","events_url":"https://api.github.com/users/tsachiherman/events{/privacy}","received_events_url":"https://api.github.com/users/tsachiherman/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/algorand/go-algorand/pulls/578/commits","review_comments_url":"https://api.github.com/repos/algorand/go-algorand/pulls/578/comments","review_comment_url":"https://api.github.com/repos/algorand/go-algorand/pulls/comments{/number}","comments_url":"https://api.github.com/repos/algorand/go-algorand/issues/578/comments","statuses_url":"https://api.github.com/repos/algorand/go-algorand/statuses/364dad0644601ed2d13f4db5c20286bcbdef2c73","head":{"label":"zeldovich:msgp","ref":"msgp","sha":"364dad0644601ed2d13f4db5c20286bcbdef2c73","user":{"login":"zeldovich","id":828308,"node_id":"MDQ6VXNlcjgyODMwOA==","avatar_url":"https://avatars0.githubusercontent.com/u/828308?v=4","gravatar_id":"","url":"https://api.github.com/users/zeldovich","html_url":"https://github.com/zeldovich","followers_url":"https://api.github.com/users/zeldovich/followers","following_url":"https://api.github.com/users/zeldovich/following{/other_user}","gists_url":"https://api.github.com/users/zeldovich/gists{/gist_id}","starred_url":"https://api.github.com/users/zeldovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeldovich/subscriptions","organizations_url":"https://api.github.com/users/zeldovich/orgs","repos_url":"https://api.github.com/users/zeldovich/repos","events_url":"https://api.github.com/users/zeldovich/events{/privacy}","received_events_url":"https://api.github.com/users/zeldovich/received_events","type":"User","site_admin":false},"repo":{"id":191613908,"node_id":"MDEwOlJlcG9zaXRvcnkxOTE2MTM5MDg=","name":"go-algorand","full_name":"zeldovich/go-algorand","private":false,"owner":{"login":"zeldovich","id":828308,"node_id":"MDQ6VXNlcjgyODMwOA==","avatar_url":"https://avatars0.githubusercontent.com/u/828308?v=4","gravatar_id":"","url":"https://api.github.com/users/zeldovich","html_url":"https://github.com/zeldovich","followers_url":"https://api.github.com/users/zeldovich/followers","following_url":"https://api.github.com/users/zeldovich/following{/other_user}","gists_url":"https://api.github.com/users/zeldovich/gists{/gist_id}","starred_url":"https://api.github.com/users/zeldovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeldovich/subscriptions","organizations_url":"https://api.github.com/users/zeldovich/orgs","repos_url":"https://api.github.com/users/zeldovich/repos","events_url":"https://api.github.com/users/zeldovich/events{/privacy}","received_events_url":"https://api.github.com/users/zeldovich/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zeldovich/go-algorand","description":"Algorand's official implementation in Go. ","fork":true,"url":"https://api.github.com/repos/zeldovich/go-algorand","forks_url":"https://api.github.com/repos/zeldovich/go-algorand/forks","keys_url":"https://api.github.com/repos/zeldovich/go-algorand/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeldovich/go-algorand/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeldovich/go-algorand/teams","hooks_url":"https://api.github.com/repos/zeldovich/go-algorand/hooks","issue_events_url":"https://api.github.com/repos/zeldovich/go-algorand/issues/events{/number}","events_url":"https://api.github.com/repos/zeldovich/go-algorand/events","assignees_url":"https://api.github.com/repos/zeldovich/go-algorand/assignees{/user}","branches_url":"https://api.github.com/repos/zeldovich/go-algorand/branches{/branch}","tags_url":"https://api.github.com/repos/zeldovich/go-algorand/tags","blobs_url":"https://api.github.com/repos/zeldovich/go-algorand/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeldovich/go-algorand/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeldovich/go-algorand/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeldovich/go-algorand/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeldovich/go-algorand/statuses/{sha}","languages_url":"https://api.github.com/repos/zeldovich/go-algorand/languages","stargazers_url":"https://api.github.com/repos/zeldovich/go-algorand/stargazers","contributors_url":"https://api.github.com/repos/zeldovich/go-algorand/contributors","subscribers_url":"https://api.github.com/repos/zeldovich/go-algorand/subscribers","subscription_url":"https://api.github.com/repos/zeldovich/go-algorand/subscription","commits_url":"https://api.github.com/repos/zeldovich/go-algorand/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeldovich/go-algorand/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeldovich/go-algorand/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeldovich/go-algorand/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeldovich/go-algorand/contents/{+path}","compare_url":"https://api.github.com/repos/zeldovich/go-algorand/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeldovich/go-algorand/merges","archive_url":"https://api.github.com/repos/zeldovich/go-algorand/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeldovich/go-algorand/downloads","issues_url":"https://api.github.com/repos/zeldovich/go-algorand/issues{/number}","pulls_url":"https://api.github.com/repos/zeldovich/go-algorand/pulls{/number}","milestones_url":"https://api.github.com/repos/zeldovich/go-algorand/milestones{/number}","notifications_url":"https://api.github.com/repos/zeldovich/go-algorand/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeldovich/go-algorand/labels{/name}","releases_url":"https://api.github.com/repos/zeldovich/go-algorand/releases{/id}","deployments_url":"https://api.github.com/repos/zeldovich/go-algorand/deployments","created_at":"2019-06-12T17:12:44Z","updated_at":"2019-12-03T01:41:48Z","pushed_at":"2019-12-10T22:58:25Z","git_url":"git://github.com/zeldovich/go-algorand.git","ssh_url":"git@github.com:zeldovich/go-algorand.git","clone_url":"https://github.com/zeldovich/go-algorand.git","svn_url":"https://github.com/zeldovich/go-algorand","homepage":null,"size":19890,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"algorand:master","ref":"master","sha":"fe3e404f64ce5abdac680bd97c3c3b6075d868d6","user":{"login":"algorand","id":23182699,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTgyNjk5","avatar_url":"https://avatars2.githubusercontent.com/u/23182699?v=4","gravatar_id":"","url":"https://api.github.com/users/algorand","html_url":"https://github.com/algorand","followers_url":"https://api.github.com/users/algorand/followers","following_url":"https://api.github.com/users/algorand/following{/other_user}","gists_url":"https://api.github.com/users/algorand/gists{/gist_id}","starred_url":"https://api.github.com/users/algorand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algorand/subscriptions","organizations_url":"https://api.github.com/users/algorand/orgs","repos_url":"https://api.github.com/users/algorand/repos","events_url":"https://api.github.com/users/algorand/events{/privacy}","received_events_url":"https://api.github.com/users/algorand/received_events","type":"Organization","site_admin":false},"repo":{"id":191266671,"node_id":"MDEwOlJlcG9zaXRvcnkxOTEyNjY2NzE=","name":"go-algorand","full_name":"algorand/go-algorand","private":false,"owner":{"login":"algorand","id":23182699,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTgyNjk5","avatar_url":"https://avatars2.githubusercontent.com/u/23182699?v=4","gravatar_id":"","url":"https://api.github.com/users/algorand","html_url":"https://github.com/algorand","followers_url":"https://api.github.com/users/algorand/followers","following_url":"https://api.github.com/users/algorand/following{/other_user}","gists_url":"https://api.github.com/users/algorand/gists{/gist_id}","starred_url":"https://api.github.com/users/algorand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algorand/subscriptions","organizations_url":"https://api.github.com/users/algorand/orgs","repos_url":"https://api.github.com/users/algorand/repos","events_url":"https://api.github.com/users/algorand/events{/privacy}","received_events_url":"https://api.github.com/users/algorand/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/algorand/go-algorand","description":"Algorand's official implementation in Go. ","fork":false,"url":"https://api.github.com/repos/algorand/go-algorand","forks_url":"https://api.github.com/repos/algorand/go-algorand/forks","keys_url":"https://api.github.com/repos/algorand/go-algorand/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algorand/go-algorand/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algorand/go-algorand/teams","hooks_url":"https://api.github.com/repos/algorand/go-algorand/hooks","issue_events_url":"https://api.github.com/repos/algorand/go-algorand/issues/events{/number}","events_url":"https://api.github.com/repos/algorand/go-algorand/events","assignees_url":"https://api.github.com/repos/algorand/go-algorand/assignees{/user}","branches_url":"https://api.github.com/repos/algorand/go-algorand/branches{/branch}","tags_url":"https://api.github.com/repos/algorand/go-algorand/tags","blobs_url":"https://api.github.com/repos/algorand/go-algorand/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algorand/go-algorand/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algorand/go-algorand/git/refs{/sha}","trees_url":"https://api.github.com/repos/algorand/go-algorand/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algorand/go-algorand/statuses/{sha}","languages_url":"https://api.github.com/repos/algorand/go-algorand/languages","stargazers_url":"https://api.github.com/repos/algorand/go-algorand/stargazers","contributors_url":"https://api.github.com/repos/algorand/go-algorand/contributors","subscribers_url":"https://api.github.com/repos/algorand/go-algorand/subscribers","subscription_url":"https://api.github.com/repos/algorand/go-algorand/subscription","commits_url":"https://api.github.com/repos/algorand/go-algorand/commits{/sha}","git_commits_url":"https://api.github.com/repos/algorand/go-algorand/git/commits{/sha}","comments_url":"https://api.github.com/repos/algorand/go-algorand/comments{/number}","issue_comment_url":"https://api.github.com/repos/algorand/go-algorand/issues/comments{/number}","contents_url":"https://api.github.com/repos/algorand/go-algorand/contents/{+path}","compare_url":"https://api.github.com/repos/algorand/go-algorand/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algorand/go-algorand/merges","archive_url":"https://api.github.com/repos/algorand/go-algorand/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algorand/go-algorand/downloads","issues_url":"https://api.github.com/repos/algorand/go-algorand/issues{/number}","pulls_url":"https://api.github.com/repos/algorand/go-algorand/pulls{/number}","milestones_url":"https://api.github.com/repos/algorand/go-algorand/milestones{/number}","notifications_url":"https://api.github.com/repos/algorand/go-algorand/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algorand/go-algorand/labels{/name}","releases_url":"https://api.github.com/repos/algorand/go-algorand/releases{/id}","deployments_url":"https://api.github.com/repos/algorand/go-algorand/deployments","created_at":"2019-06-11T00:48:32Z","updated_at":"2019-12-10T22:05:51Z","pushed_at":"2019-12-10T22:58:29Z","git_url":"git://github.com/algorand/go-algorand.git","ssh_url":"git@github.com:algorand/go-algorand.git","clone_url":"https://github.com/algorand/go-algorand.git","svn_url":"https://github.com/algorand/go-algorand","homepage":"https://developer.algorand.org/","size":19740,"stargazers_count":230,"watchers_count":230,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":95,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":96,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":95,"open_issues":96,"watchers":230,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/algorand/go-algorand/pulls/578"},"html":{"href":"https://github.com/algorand/go-algorand/pull/578"},"issue":{"href":"https://api.github.com/repos/algorand/go-algorand/issues/578"},"comments":{"href":"https://api.github.com/repos/algorand/go-algorand/issues/578/comments"},"review_comments":{"href":"https://api.github.com/repos/algorand/go-algorand/pulls/578/comments"},"review_comment":{"href":"https://api.github.com/repos/algorand/go-algorand/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/algorand/go-algorand/pulls/578/commits"},"statuses":{"href":"https://api.github.com/repos/algorand/go-algorand/statuses/364dad0644601ed2d13f4db5c20286bcbdef2c73"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zeldovich"}}