{"id":18654892,"url":"https://github.com/mynameisvinn/merkle","last_synced_at":"2026-06-20T01:32:01.828Z","repository":{"id":98221059,"uuid":"100861182","full_name":"mynameisvinn/merkle","owner":"mynameisvinn","description":"merkle merkle merkle","archived":false,"fork":false,"pushed_at":"2017-12-02T19:18:06.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-08T12:46:15.156Z","etag":null,"topics":["algorithm","hash","merkle","merkle-dag","merkle-tree"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mynameisvinn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-20T12:52:03.000Z","updated_at":"2021-02-24T09:30:09.000Z","dependencies_parsed_at":"2023-06-03T19:45:47.301Z","dependency_job_id":null,"html_url":"https://github.com/mynameisvinn/merkle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mynameisvinn/merkle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2Fmerkle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2Fmerkle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2Fmerkle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2Fmerkle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mynameisvinn","download_url":"https://codeload.github.com/mynameisvinn/merkle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mynameisvinn%2Fmerkle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34554511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","hash","merkle","merkle-dag","merkle-tree"],"created_at":"2024-11-07T07:16:58.293Z","updated_at":"2026-06-20T01:32:01.815Z","avatar_url":"https://github.com/mynameisvinn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# merkle\ncombining hash functions with graphs was ralph merkle’s big idea. merkle dags are everywhere you want data integrity *through self verification*: git, ipfs, blockchain.\n\n#### whats a merkle tree?\nwe have a hashing function $h(x)$ and four records a, b, c, d. a merkle tree would be y:\n```\nh_ab = h[h(a) + h(b)]\nh_cd = h[h(c) + h(d)]\nroot_hash = h(h_ab + h_cd)\n```\n\n#### whats a merkle dag?\na merkle dag is an *acylic* collection of merkle trees. by referencing its predecessor's root hash, a merkle dag tracks history.\n```\nh_ab = h[h(a) + h(b)]\nh_cd = h[h(c) + h(d)]\nroot_hash_1 = h(h_ab + h_cd)\n\nh_ef = h[h(e) + h(f)]\nh_gh = h[h(g) + h(h)]\nroot_hash_2 = h(h_ef + h_gh + root_hash_1)  # 2nd root hash knows its parent\n```\n\n## usage\n```python\nimport merkle\n\nfrom merkle import generate_merkle_root\ntransactions = ['tx1', 'tx2', 'tx3', 'tx4', 'tx5']\ngenerate_merkle_root(transactions)  # returns e5fb69843938b939e7f1823414b2e3aaa52c1eaa\n```\n\nassuming you have the hash `e5fb69843938b939e7f1823414b2e3aaa52c1eaa` from a trusted authority, you can download chunks of data from various sources, compare its merkle root hash with the trusted one, and be confident that it's the same set of data.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmynameisvinn%2Fmerkle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmynameisvinn%2Fmerkle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmynameisvinn%2Fmerkle/lists"}