{"id":25412305,"url":"https://github.com/datachainlab/tendermint-zk-ibc","last_synced_at":"2025-04-14T16:45:46.620Z","repository":{"id":235991924,"uuid":"791624086","full_name":"datachainlab/tendermint-zk-ibc","owner":"datachainlab","description":"Tendermint ZK Light Client for ibc-solidity","archived":false,"fork":false,"pushed_at":"2024-04-25T04:10:15.000Z","size":535,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-13T03:33:24.787Z","etag":null,"topics":["cometbft","cosmos","ibc","tendermint","zk-snarks"],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/datachainlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-04-25T04:01:35.000Z","updated_at":"2025-01-09T09:48:14.000Z","dependencies_parsed_at":"2024-04-25T08:35:50.845Z","dependency_job_id":null,"html_url":"https://github.com/datachainlab/tendermint-zk-ibc","commit_stats":null,"previous_names":["datachainlab/tendermint-zk-ibc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datachainlab%2Ftendermint-zk-ibc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datachainlab%2Ftendermint-zk-ibc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datachainlab%2Ftendermint-zk-ibc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datachainlab%2Ftendermint-zk-ibc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datachainlab","download_url":"https://codeload.github.com/datachainlab/tendermint-zk-ibc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248918721,"owners_count":21183243,"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":["cometbft","cosmos","ibc","tendermint","zk-snarks"],"created_at":"2025-02-16T11:18:40.724Z","updated_at":"2025-04-14T16:45:46.601Z","avatar_url":"https://github.com/datachainlab.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tendermint-zk-ibc\n\n## Overview\n\nThis repository provides `TendermintZKLightClient` contract, a Solidity implementation of a Zero-Knowledge Proof (ZKP)-based Tendermint light client for [IBC](https://github.com/cosmos/ibc). Furthermore, it also provides an IBC relayer support and a ZK prover using Succinct's [TendermintX](https://github.com/succinctlabs/tendermintx). By utilizing [ibc-solidity](https://github.com/hyperledger-labs/yui-ibc-solidity) and these components, we can achieve IBC between EVM chains(e.g. Ethereum mainnet) and Cosmos zones at a practical gas cost.\n\nThe following figure shows the high-level architecture of [the E2E demo](./github/workflows/test.yml) using the components included in this repository. Note that [Mock-LC](https://github.com/datachainlab/ibc-mock-client) is currently used as IBC Light Client on Tendermint instead of verifying Ethereum consensus. This will soon be replaced by [08-wasm](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/08-wasm) + [ethereum-ibc-rs](https://github.com/datachainlab/ethereum-ibc-rs).\n\n![Architecture](./docs/images/architecture.png)\n\n## Components\n\n### [TendermintZKLightClient](./contracts/TendermintZKLightClient.sol)\n\n`TendermintZKLightClient` is a Solidity contract that implements a ZKP-based light client for Tendermint and `ILightClient` interface of ibc-solidity. This consists of the following parts:\n\n- ZKP-verifier for header: It verifies a validity proof of header, which is a recursive proof with Groth16/PLONK for TendermintX circuit proof. Note that the trusting period validation and the merkle tree verification for block timestamp and appHash from the header are processed on-chain for now. We will soon improve the circuit to include these verifications.\n- State membership/non-membership verifier: A merkle proof verifier implementation optimized for Simple tree and IAVL tree proof specs\n\nDevelopers can construct their own LightClient contract using a zkp verifier contract according to the verifying key they performed setup and generated.\n\nAn example implementation can be found here:\n\n- [Groth16](./contracts/groth16/TendermintZKLightClientGroth16.sol)\n- [PLONK](./contracts/plonk/TendermintZKLightClientPlonk.sol)\n\n### [ZKProver](./src)\n\nZKProver is a component that prove validity of given header and provides its proof to the relayer.\n\nThis component consists of the following two sub-components:\n\n- [plonky2-prover](./src) that runs TendermintX circuit to generates proof and prove recursively it using Poseidon BN128 hash\n- [gnark-verifier](./go) that recursively proves the proof from plonky2-prover service utilizing [gnark-plonky2-verifier](https://github.com/succinctlabs/gnark-plonky2-verifier) for Groth16/PLONK proof\n\n### [Relayer](./go/relay)\n\nRelayer is a component that requests validity proof of the latest header from ZKProver and calls the updateClient function of the `TendermintZKLightClient` contract with the proof. This is implemented as [prover module](https://github.com/hyperledger-labs/yui-relayer?tab=readme-ov-file#glossary) of [yui-relayer](https://github.com/hyperledger-labs/yui-relayer).\n\n## Benchmark\n\nThe following is the gas report for the `TendermintZKLightClient` contract. The gas is measured using `forge test` and the below settings.\n\nSettings:\n- Solidity v0.8.24\n- optimizer_runs=9999999\n- via-ir=true\n- evm_version=paris\n\n| Method | Proving System | Gas Cost |\n| --- | --- | --- |\n| updateClient | Groth16 | 285k |\n| updateClient | Groth16 (w/commit range checker) | 407k |\n| updateClient | PLONK | 370k |\n| verifyMembership | * | 56k |\n\n## TODO\n\n- Add misbehaviour support\n- Further gas cost optimization\n    - Optimize circuit for IBC light client\n    - e.g. remove simple tree verification on-chain\n- Reduce ZKProver's proving time\n- Improve the E2E demo\n    - Replace Mock-LC with 08-wasm + ethereum-ibc-rs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatachainlab%2Ftendermint-zk-ibc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatachainlab%2Ftendermint-zk-ibc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatachainlab%2Ftendermint-zk-ibc/lists"}