{"action":"created","issue":{"url":"https://api.github.com/repos/NebulousLabs/Sia/issues/364","labels_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/364/labels{/name}","comments_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/364/comments","events_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/364/events","html_url":"https://github.com/NebulousLabs/Sia/pull/364","id":59242627,"number":364,"title":"Merkle package","user":{"login":"DavidVorick","id":2316841,"avatar_url":"https://avatars.githubusercontent.com/u/2316841?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidVorick","html_url":"https://github.com/DavidVorick","followers_url":"https://api.github.com/users/DavidVorick/followers","following_url":"https://api.github.com/users/DavidVorick/following{/other_user}","gists_url":"https://api.github.com/users/DavidVorick/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidVorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidVorick/subscriptions","organizations_url":"https://api.github.com/users/DavidVorick/orgs","repos_url":"https://api.github.com/users/DavidVorick/repos","events_url":"https://api.github.com/users/DavidVorick/events{/privacy}","received_events_url":"https://api.github.com/users/DavidVorick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-27T14:28:36Z","updated_at":"2015-03-01T09:19:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/364","html_url":"https://github.com/NebulousLabs/Sia/pull/364","diff_url":"https://github.com/NebulousLabs/Sia/pull/364.diff","patch_url":"https://github.com/NebulousLabs/Sia/pull/364.patch"},"body":"I left all of the other merkle stuff because it's working well enough. I put the new merkle stuff into it's own package.\r\n\r\nI sat down and worked through everything, and I feel like I have a pretty pristine understanding of how and why all this code works. I haven't documented it well, but I plan on it. The proof builder needs a few more tests, marked with TODO. Unfortunately, they have 15 nodes each, so it'll be a decent amount of code to build everything by hand.\r\n\r\nI would like more thorough coverage of the smaller numbers too, but practically speaking we can't manually build all of the possible trees. I don't think that the existing merkle code would pass the tests I have written, we never did any manual testing for the proof building and verification.\r\n\r\nVerification is not implemented, though it's probably going to be quite a bit simpler than everything else. Testing it should also be pretty simple, just build stuff with the already-tested builder and see that the verifier passes it. (then change the index and see that the verifier fails it for all possible other indices). No need to make anything by hand."},"comment":{"url":"https://api.github.com/repos/NebulousLabs/Sia/issues/comments/76589197","html_url":"https://github.com/NebulousLabs/Sia/pull/364#issuecomment-76589197","issue_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/364","id":76589197,"user":{"login":"DavidVorick","id":2316841,"avatar_url":"https://avatars.githubusercontent.com/u/2316841?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidVorick","html_url":"https://github.com/DavidVorick","followers_url":"https://api.github.com/users/DavidVorick/followers","following_url":"https://api.github.com/users/DavidVorick/following{/other_user}","gists_url":"https://api.github.com/users/DavidVorick/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidVorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidVorick/subscriptions","organizations_url":"https://api.github.com/users/DavidVorick/orgs","repos_url":"https://api.github.com/users/DavidVorick/repos","events_url":"https://api.github.com/users/DavidVorick/events{/privacy}","received_events_url":"https://api.github.com/users/DavidVorick/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T09:19:56Z","updated_at":"2015-03-01T09:19:56Z","body":"About merging the trees: there's 100% code overlap between the proof tree and the standard root tree. All of the code that appears in the root tree also appears in the build tree.\r\n\r\nBut you can't have use the root tree functions in a proof tree because you need to interject logic mid-function. The proof tree would look almost identical to how it currently does if we pulled the root tree out. But you would have a cleaner root tree to stare at."}}