{"id":24230890,"url":"https://github.com/nhussein11/merkle-tree","last_synced_at":"2025-10-29T08:05:51.979Z","repository":{"id":115087864,"uuid":"601749114","full_name":"nhussein11/merkle-tree","owner":"nhussein11","description":"Rust implementation and explanation of the Merkle Tree structure","archived":false,"fork":false,"pushed_at":"2023-04-01T14:49:56.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T13:41:43.297Z","etag":null,"topics":["blockchain","cryptography","rust","web3"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/nhussein11.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":"2023-02-14T18:29:48.000Z","updated_at":"2025-01-03T06:38:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea440202-1999-4522-8700-e1319d7744d3","html_url":"https://github.com/nhussein11/merkle-tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhussein11%2Fmerkle-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhussein11%2Fmerkle-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhussein11%2Fmerkle-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhussein11%2Fmerkle-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhussein11","download_url":"https://codeload.github.com/nhussein11/merkle-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241827079,"owners_count":20026599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blockchain","cryptography","rust","web3"],"created_at":"2025-01-14T13:31:20.962Z","updated_at":"2025-10-29T08:05:46.958Z","avatar_url":"https://github.com/nhussein11.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Merkle Tree\n\nA merkle tree is a data structure that allows you to verify the integrity of a large set of data. It is a binary tree where each leaf node is the hash of a block of data. Each non-leaf node is the hash of the two child nodes. The root node is the hash of the entire tree.\n\n![Merkle tree example](https://www.forex.academy/wp-content/uploads/2020/05/Merkle-Tree-FA.jpg)\n\nThe idea of this project is just to implement a simple version of a merkle tree in Rust. Anyway, if you want to learn more about merkle trees, I highly recommend you to read this [Wikipedia article](https://en.wikipedia.org/wiki/Merkle_tree) and also [Simplilearn Article](https://www.simplilearn.com/tutorials/blockchain-tutorial/merkle-tree-in-blockchain#:~:text=Merkle%20trees%2C%20also%20known%20as,data%20more%20efficiently%20and%20securely.).\n\n:rocket: Or even better, if you want to contribute to this humble implementation, feel free to open a pull request. :rocket:\n\n## Why it is important?\n\nMerkle trees are used in many applications, including blockchains, to verify the integrity of large sets of data. For example, in a blockchain, the merkle tree is used to verify that a transaction is included in a block. The merkle tree is also used to verify that a block is included in a blockchain.\n\n## How it works?\n\nEach item in the set is hashed and stored in a leaf node. The leaf nodes are then paired and hashed together. The resulting hash is stored in a non-leaf node. This process is repeated until there is only one node left, the root node.\n\nA Merkle tree totals all transactions in a block and generates a digital fingerprint of the entire set of operations, allowing the user to verify whether it includes a transaction in the block.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://www.simplilearn.com/ice9/free_resources_article_thumb/Merkle_Tree_In_Blockchain_4.png\" /\u003e\n\u003c/p\u003e\n\n## How to run the tests?\n\nI wrote a suite of unit tests to test the merkle tree.\n\nTo run the tests, run the following command:\n\n1 - Clone the project:\n\n```bash\ngit clone https://github.com/nhussein11/merkle-tree.git\n```\n\n2 - Run the tests:\n\n```bash\ncargo test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhussein11%2Fmerkle-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhussein11%2Fmerkle-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhussein11%2Fmerkle-tree/lists"}