IFT transfer demo#1
Conversation
PLAT-998 IBC<>EVM Interop Demo Spec
SummaryReference demo for IBC↔EVM interop:
Context Background / link to PRD:
Persona / use case:
User stories Asset issuer
DevOps team
Problem to solve:
Scope In
Acceptance criteria + success metric
Success metric(s):
Approach (lightweight) Implementation notes / proposed steps:
Open questions / decisions:
Definition of Ready (DoR) checklist
Definition of Done (DoD) checklist
|
Greptile SummaryThis PR introduces a full Cosmos ↔ EVM IBC demo (
Confidence Score: 3/5Not ready to merge without fixing the tokenfactory denom idempotency bug; several pre-existing issues from prior review rounds also remain open. One confirmed P1 (tokenfactory
|
| Filename | Overview |
|---|---|
| demo/cosmos-evm/lib/ibc.sh | Core IBC setup orchestrator: generally well-structured with idempotency guards, but the tokenfactory denom check (line 735) silently fails because it compares a bare subdenom against full factory paths; cast to-check-sum-address typo (line 713, 820) silently falls back to unchecksummed address |
| demo/cosmos-evm/lib/demo.sh | User-story demos; timeout_ts for both cosmos_ibc_transfer and iftTransfer uses $(date +%s) + N in seconds — IBC standard expects nanoseconds, which would cause packets to appear immediately timed-out |
| demo/cosmos-evm/lib/common.sh | render_template uses eval + heredoc to expand templates, executing any $(...) in template content or in expanded variables; state_set is correct but subtly relies on ` |
| demo/cosmos-evm/setup.sh | Top-level orchestrator; clean subcommand routing with state.env sourcing; SOLIDITY_IBC_TAG="main" is a known-deferred mutable ref that makes CI non-reproducible; COSMOS_IFT_MODULE_ADDR not included in default variable initializations |
| .github/workflows/demo-ift.yml | timeout-minutes: 20 is insufficient for the full end-to-end run including demo_failure_and_retry plus EVM→Cosmos finality waits on cold ubuntu-latest; CI will be cancelled before teardown |
| demo/cosmos-evm/lib/chains.sh | Chain init (Cosmos + Ethereum Besu/Teku) with correct idempotency guards for validator key, JWT secret, and CL genesis; ownership fix for Linux CI hosts is well-handled |
| demo/cosmos-evm/ibc/scripts/MinimalDeploy.s.sol | Minimal forge deploy script for ICS26Router + ICS27GMP + TestIFT; returns a JSON label map consumed by _forge_return_addr; auth model (deployer = AccessManager admin) is appropriate for single-validator devnet |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[./setup.sh] --> B[cmd_chains]
B --> B1[init_cosmos]
B --> B2[init_ethereum / Besu+Teku]
B --> B3[wait_for_services]
A --> C[setup_ibc / cmd_ibc]
C --> C1[4A0 fetch solidity-ibc-eureka]
C1 --> C2[4A deploy IBC contracts on Besu]
C2 --> C3[4A1 resolve IFT_CONTRACT_ADDR]
C3 --> C4[4B fetch + checksum ethereum-lc.wasm]
C4 --> C5[4C setup relayer key]
C5 --> C6[4B5 reconcile IBC client pair]
C6 --> C7[4B5 create attestation client on Cosmos]
C7 --> C8[4D generate relayer + attestor configs]
C8 --> C9[4E start postgres + relayer + attestors + proof-api]
C9 --> C10[4E3 deploy AttestationLightClient on EVM]
C10 --> C11[4F wait for clients on both sides]
C11 --> C12[4F2 register counterparty on Cosmos]
C12 --> C13[4F3 register IFT bridge on Cosmos]
C13 --> C14[4F3a register IFT bridge on EVM]
C14 --> C15[4F4 finalize relayer config + restart]
C15 --> D[demo_all]
D --> D1[Cosmos to EVM IFT transfer]
D --> D2[EVM to Cosmos IFT transfer]
D --> D3[track packet status]
D --> D4[failure + retry demo]
D --> D5[observability / Prometheus]
Reviews (7): Last reviewed commit: "After code review" | Re-trigger Greptile
|
@greptile review |
|
@greptile review |
|
@greptile review |
|
@greptile review |
This reverts commit 488da18.
srdtrk
left a comment
There was a problem hiding this comment.
My initial review is pointing out two high level issues.
- We want to demo against a besu + qbft chain rather than besu + teku. Teku is a beacon consensus implementation for Ethereum Mainnet only. So we should not be using it.
- I noticed that you are using the 08-wasm beacon light client rather than attestation. This is only possible because you're using teku as your consensus. We don't want to do this in this demo.
| return _toJson(d); | ||
| } | ||
|
|
||
| function _deploy() internal returns (Deployed memory d) { |
There was a problem hiding this comment.
This script does not configure the access manager. This means that the roles have not yet been setup. And also, the only role granted is ADMIN_ROLE.
The access manager setup can also be done during the runtime or by using another script. So, this is not a big issue
| { | ||
| "name": "eth_to_cosmos", | ||
| "src_chain": "${ETH_CHAIN_ID}", | ||
| "dst_chain": "${COSMOS_CHAIN_ID}", | ||
| "config": { | ||
| "tm_rpc_url": "http://cosmos:26657", | ||
| "ics26_address": "${ICS26_ROUTER_ADDR}", | ||
| "eth_rpc_url": "http://besu:8545", | ||
| "eth_beacon_api_url": "http://teku:5051", | ||
| "signer_address": "${RELAYER_ADDR}", | ||
| "mode": {"attested": { | ||
| "attestor": { | ||
| "quorum_threshold": 1, | ||
| "attestor_endpoints": ["http://attestor:9101"], | ||
| "attestor_query_timeout_ms": 10000 | ||
| } | ||
| }} | ||
| } | ||
| } |
There was a problem hiding this comment.
We don't want to use this since this is only meant to be used for eth mainnet
points addressed and resolved, removed wasm clients and teku-> qbft |
Demo minor fixes
No description provided.