{"id":13565542,"url":"https://github.com/cosmos/ics23","last_synced_at":"2025-12-12T13:20:40.758Z","repository":{"id":34784448,"uuid":"181555544","full_name":"cosmos/ics23","owner":"cosmos","description":"Building generic merkle proof format for IBC","archived":false,"fork":false,"pushed_at":"2025-04-07T21:27:49.000Z","size":3614,"stargazers_count":119,"open_issues_count":33,"forks_count":71,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-03T20:46:29.208Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-15T19:51:41.000Z","updated_at":"2025-04-04T03:57:12.000Z","dependencies_parsed_at":"2024-01-03T05:19:23.442Z","dependency_job_id":"150ddc35-10fb-4162-b0cb-f7d79f2230d6","html_url":"https://github.com/cosmos/ics23","commit_stats":{"total_commits":328,"total_committers":21,"mean_commits":"15.619047619047619","dds":0.301829268292683,"last_synced_commit":"f4deb054b697458e7f0aa353c2f45a365361e895"},"previous_names":["confio/ics23","confio/proofs"],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fics23","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fics23/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fics23/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fics23/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmos","download_url":"https://codeload.github.com/cosmos/ics23/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"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-08-01T13:01:49.706Z","updated_at":"2025-12-12T13:20:40.713Z","avatar_url":"https://github.com/cosmos.png","language":"Rust","funding_links":[],"categories":["Core Components","Rust"],"sub_categories":[],"readme":"[![Cosmos ecosystem][cosmos-shield]][cosmos-link]\n\n# ICS 23 [![Apache 2.0 Licensed][license-badge]][license-link]\n\n| Language           | Test Suite                                        | Code Coverage                                  |\n| ------------------ | ------------------------------------------------- | ---------------------------------------------- |\n| [Go](./go)         | [![Go Test][go-test-badge]][go-test-link]         | [![Go Cov][go-cov-badge]][go-cov-link]         |\n| [Rust](./rust)     | [![Rust Test][rust-test-badge]][rust-test-link]   | [![Rust Cov][rust-cov-badge]][rust-cov-link]   |\n\n[cosmos-link]: https://cosmos.network\n[go-test-link]: https://github.com/cosmos/ics23/actions/workflows/go.yml\n[go-test-badge]: https://github.com/cosmos/ics23/actions/workflows/go.yml/badge.svg?branch=master\n[go-cov-link]: https://sonarcloud.io/project/configuration?id=ics23-go\n[go-cov-badge]: https://sonarcloud.io/api/project_badges/measure?project=ics23-go\u0026metric=coverage\n[rust-test-link]: https://github.com/cosmos/ics23/actions/workflows/rust.yml\n[rust-test-badge]: https://github.com/cosmos/ics23/actions/workflows/rust.yml/badge.svg?branch=master\n[rust-cov-link]: https://codecov.io/gh/cosmos/ics23/tree/master/rust\n[rust-cov-badge]: https://codecov.io/github/cosmos/ics23/branch/master/graph/badge.svg?token=xlGriS907o\u0026flag=rust\n[license-link]: https://github.com/cosmos/ics23/blob/master/LICENSE\n[license-badge]: https://img.shields.io/badge/license-Apache2.0-blue.svg\n\n## Proofs\n\nThis is an attempt to define a generic, cross-language, binary representation\nof merkle proofs, which can be generated by many underlying merkle tree storage\nimplementations and validated by many client libraries over various languages.\n\nThe end goal is to provide a standard representation not only for light-client\nproofs of blockchains, but more specifically for proofs that accompany IBC\n(inter-blockchain communication) packets as defined in the cosmos specification.\n\n## Feature set\n\nThe features and naming follow the [ICS23: Vector Commitments](https://github.com/cosmos/ibc/tree/master/spec/core/ics-023-vector-commitments) Specification\n\n* Proof of Existence (key-value pair linked to root hash)\n* Hold Existence Proof to db-specific spec (avoid reinterpretation of bytes to different key-value pair)\n* Proof of Non-Existence (key proven not to be inside tree with given root hash)\n\n### Future features\n\n* Batch Proof or Range Proof (prove many keys at once, more efficiently than separate proofs)\n\n## Organization\n\nThe top level package will provide language-agnostic documentation and protobuf specifications.\nEvery language should have a sub-folder, containing both protobuf generated code,\nas well as client-side code for validating such proofs. The server-side code should\nlive alongside the various merkle tree representations (eg. not in this repository).\n\n### Supported client languages\n\n* [Go](./go)\n* [Rust](./rust)\n\nThe repository used to have a TypeScript implementation, but due to lack of maintenance and usage, it was removed in [#353](https://github.com/cosmos/ics23/pull/353).\n\nAnyone interested in adding support for Solidity could pick up where [#58](https://github.com/cosmos/ics23/pull/58) left off.\n\n### Compatibility table\n\n| ICS 023 Spec  | Go                | Rust                |\n|---------------|-------------------|---------------------|\n| 2019-08-25    | 0.9.x             | 0.9.x               |\n| 2019-08-25    | 0.10.x            | 0.10.x, 0.11.x      |\n\n## Supported merkle stores\n\n* [cosmos/iavl](https://github.com/cosmos/iavl)\n* [cometbft/crypto/merkle](https://github.com/cometbft/cometbft/tree/main/crypto/merkle)\n* [penumbra-zone/jmt](https://github.com/penumbra-zone/jmt)\n\nSupported merkle stores must be lexicographically ordered to maintain soundness. \n\n### Unsupported\n\n* [turbofish-org/merk](https://github.com/turbofish-org/merk)\n* [go-ethereum Merkle Patricia Trie](https://github.com/ethereum/go-ethereum/blob/master/trie/trie.go)\n\nEthan Frey [spent quite some time](https://github.com/confio/proofs-ethereum) to wrestle out a well-defined serialization and a validation logic that didn't involve importing too much code from go-ethereum (copying parts and stripping it down to the minimum). At the end, he realized the key is only present from parsing the entire path and is quite a painstaking process, even with go code that imports rlp and has the custom patricia key encodings. After a long time reflecting, he cannot see any way to implement this that doesn't either: (A) allow the provider to forge a different key that cannot be detected by the verifier or (B) include a huge amount of custom code in the client side.\n\nIf anyone has a solution to this, please open an issue in this repository.\n\n## Known limitations\n\nThis format is designed to support any merklized data store that encodes key-value pairs into\na node, and computes a root hash by repeatedly concatenating hashes and re-hashing them.\n\nNotably, this requires the *key* to be present in the leaf node in order to enforce the structure properly\nand prove the *key* provided matches the proof without extensive db-dependent code. Since some\ntries (such as Ethereum's Patricia Trie) do not store the key in the leaf, but require precise analysis of\nevery step along the path in order to reconstruct the path, these are not supported. Doing so would\nrequire a much more complex format and most likely custom code for each such database. The design goal\nwas to be able to add new data sources with only configuration (spec object), rather than custom code.\n\n[cosmos-shield]: https://img.shields.io/static/v1?label=\u0026labelColor=1B1E36\u0026color=1B1E36\u0026message=cosmos%20ecosystem\u0026style=for-the-badge\u0026logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjMuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0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5Ljh6Ii8+CjxjaXJjbGUgY2xhc3M9InN0MSIgY3g9IjEyNTAiIGN5PSIxMjUwIiByPSIxMjguNiIvPgo8ZWxsaXBzZSBjbGFzcz0ic3QxIiBjeD0iMTc3Ny4zIiBjeT0iNzU2LjIiIHJ4PSI3NC42IiByeT0iNzcuMiIvPgo8ZWxsaXBzZSBjbGFzcz0ic3QxIiBjeD0iNTUzIiBjeT0iMTAxOC41IiByeD0iNzQuNiIgcnk9Ijc3LjIiLz4KPGVsbGlwc2UgY2xhc3M9InN0MSIgY3g9IjEwOTguMiIgY3k9IjE5NjUiIHJ4PSI3NC42IiByeT0iNzcuMiIvPgo8L3N2Zz4K\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmos%2Fics23","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmos%2Fics23","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmos%2Fics23/lists"}