{"id":18483809,"url":"https://github.com/mindbeam/design-study-hashfusion","last_synced_at":"2025-05-13T20:35:31.501Z","repository":{"id":90981025,"uuid":"288590140","full_name":"mindbeam/design-study-hashfusion","owner":"mindbeam","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-19T00:01:15.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T20:33:51.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mindbeam.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":"2020-08-19T00:00:52.000Z","updated_at":"2020-08-19T00:01:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3bc3005-928d-428f-acc8-f9be556c0ab4","html_url":"https://github.com/mindbeam/design-study-hashfusion","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/mindbeam%2Fdesign-study-hashfusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindbeam%2Fdesign-study-hashfusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindbeam%2Fdesign-study-hashfusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindbeam%2Fdesign-study-hashfusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindbeam","download_url":"https://codeload.github.com/mindbeam/design-study-hashfusion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254021618,"owners_count":22000959,"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":[],"created_at":"2024-11-06T12:37:25.050Z","updated_at":"2025-05-13T20:35:31.474Z","avatar_url":"https://github.com/mindbeam.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goal of this design study\n\nThe Goal of this design study is to try to understand the Hashfusion algorithm, and determine its potential applicability to Unbase/Mindbase as pertains to comutative/associative hashing. Determine if there exists any potential for hash parity between a subgraph of operations versus an intermediate state projection of same.\n\nOne of the key requirements of unbase, which has proven stymieing up to this point, is that each host node must be able to share the work of projecting state for a given entity without seeing all the events that contributed it.\n\n## Scenario:\n\nGiven Operations A + B + C = State S\nNode 1 observes only A and B. Performs X := (A + B)\nNode 2 Observes only B and C. Performs Y := (B + C)\nNode 3 Observes only A and C. Performs Z := (A + C)\nNode 1 Observes Y and arrives at X + Y = S\nNode 2 Observes Z and arrives at Y + Z = S\nNode 3 Observes X and arrives at Z + X = S\n\n## Three distinct requirements:\n\n1. The operations themselves are able to commute\n2. The hashes are identical once all operations are applied\n3. Partial states which are fully overlapping those already applied must be ignored or otherwise applied idempotently. Eg: (A+B) + C + (C+A) still equals S. Not S + (C+A)\n\nSome limited exploration of this idea has occurred within design-study-text-editor.\n\nPotential Alternative (Albeit costly)\nThe alternative to HashFusion is a form of tree hashing whereby all hashes are computed on the \"maximum fragmentation tree\" of all operations and state, such that all orderings of operations\n\nBibliography:\n\n- https://www.labs.hpe.com/techreports/2017/HPE-2017-08.pdf\n- https://github.com/BrianMonahan/HashFusion/blob/master/src/app/hmt.c (suggest we port this to rust)\n- https://www.figma.com/blog/realtime-editing-of-ordered-sequences/\n- Real Differences between OT andn CRDT in Building Co-Editiing Systems and Real world applications Sun et al. https://arxiv.org/abs/1905.01517\n- https://arxiv.org/abs/1810.00644\n- https://www.semanticscholar.org/paper/HashFusion-–-a-method-for-combining-cryptographic-Monahan-Chen/9d70806482b90f2af240c803ed28cdbd7c3ab582\n- https://keccak.team/files/TreeHashing.pdf\n- https://crypto.stackexchange.com/questions/17935/associative-standard-cryptographic-hash-function\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindbeam%2Fdesign-study-hashfusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindbeam%2Fdesign-study-hashfusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindbeam%2Fdesign-study-hashfusion/lists"}