MCPcopy Index your code
hub / github.com/datachainlab/lcp

github.com/datachainlab/lcp @v0.2.17

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.17 ↗ · + Follow
1,028 symbols 2,341 edges 174 files 133 documented · 13% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LCP (Light Client Proxy)

LCP

LCP is a proxy for light client verification executed in TEE.

LCP uses Intel SGX, a representative TEE implementation, to provide light clients implemented in enclave. It also provides an on-chain client(called LCP Client) that verifies commitments indicating the results of verification by the light clients. In addition, LCP Client is compatible with ICS-02, so LCP can be integrated with IBC.

The design of LCP is based on the following principles:

  • Minimum trust assumptions: In addition to the trust assumptions of the Light Client scheme, which is the most secure verification scheme, LCP needs to add as little trust as possible, the TEE trust.
  • Ultra efficient on-chain verification: A client on the downstream verifies a single signature on a resulting commitment generated in the Enclave instead of verifying the upstream. It will reduce the verification cost and the size of verification transactions (e.g., no need to include validators' info in the upstream).
  • Extensible: No need for an on-chain light client implementation for each chain combination, only a light client implementation per chain that the Enclave can execute.

Documentation

For the details, please see here: https://docs.lcp.network

Supported light clients

Security Audit

Both lcp and lcp-solidity have been audited by Quantstamp, Inc. The audit report can be found on the Quantstamp's website or in this directory.

Related repositories

  • https://github.com/datachainlab/lcp-go provides a Go implementation for LCP client and e2e tests between two tendermint chains using LCP
  • https://github.com/datachainlab/lcp-solidity provides a Solidity implementation for LCP client
  • https://github.com/datachainlab/cosmos-ethereum-ibc-lcp provies an IBC bridge demo between ethereum and Cosmos chain
  • https://github.com/datachainlab/cosmos-bsc-ibc-lcp provides an IBC bridge demo between BNB Smart Chain and Cosmos chain

Extension points exported contracts — how you extend this code

KVStore (Interface)
(no doc) [13 implementers]
modules/store/src/store.rs
EthABIEncoder (Interface)
(no doc) [8 implementers]
modules/commitments/src/encoder.rs
HostStoreTxManager (Interface)
`HostStoreTxManager` is a transaction manager for the host store [3 implementers]
modules/enclave-api/src/enclave.rs
LightClientSpecificError (Interface)
Each Light Client's error type should implement this trait [2 implementers]
modules/light-client/src/errors.rs
Signer (Interface)
(no doc) [3 implementers]
modules/crypto/src/traits.rs
Env (Interface)
(no doc) [2 implementers]
enclave-modules/environment/src/environment.rs
EnclaveKeySelector (Interface)
(no doc) [2 implementers]
modules/ecall-commands/src/lib.rs
Query (Interface)
(no doc) [2 implementers]
proto/src/prost/lcp.service.elc.v1.rs

Core symbols most depended-on inside this repo

clone
called by 190
modules/service/src/service.rs
to_vec
called by 49
modules/crypto/src/key.rs
as_str
called by 24
modules/types/src/host.rs
as_bytes
called by 23
modules/types/src/host.rs
build_trusting_period_context
called by 21
modules/commitments/src/context.rs
is_empty
called by 19
modules/lcp-client/src/consensus_state.rs
B
called by 18
modules/store/src/cache.rs
get_key_manager
called by 17
modules/enclave-api/src/enclave.rs

Shape

Method 515
Class 224
Function 208
Enum 49
Interface 32

Languages

Rust100%

Modules by API surface

proto/src/prost/lcp.service.elc.v1.rs48 symbols
modules/store/src/rocksdb.rs45 symbols
proto/src/prost/google.protobuf.rs40 symbols
proto/src/prost/lcp.service.enclave.v1.rs37 symbols
modules/crypto/src/key.rs34 symbols
modules/light-client/src/ibc.rs32 symbols
modules/lcp-client/src/client_def.rs31 symbols
modules/keymanager/src/lib.rs27 symbols
modules/commitments/src/context.rs24 symbols
modules/attestation-report/src/report.rs20 symbols
app/src/commands/attestation.rs20 symbols
modules/ecall-commands/src/light_client.rs18 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add lcp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact