Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
sudo bash ./lcp/.github/scripts/install_sgx_sdk.sh /opt
- name: Run E2E test
run: |
docker system prune -a --volumes -f
source /opt/sgxsdk/environment
make prepare-contracts
make build-images
make e2e-test
make E2E_OPTIONS="--mock_zkdcap" e2e-test
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is a cross-chain messaging demo between Cosmos and BSC using IBC and LCP (L

## Supported Versions
- [ibc-solidity v0.3.40](https://github.com/hyperledger-labs/yui-ibc-solidity/releases/tag/v0.3.40)
- [lcp v0.2.15](https://github.com/datachainlab/lcp/releases/tag/v0.2.15)
- [lcp-go v0.2.21](https://github.com/datachainlab/lcp-go/releases/tag/v0.2.21)
- [lcp-solidity v0.2.0-rc3](https://github.com/datachainlab/lcp-solidity/releases/tag/v0.2.0-rc3)
- [lcp v0.2.17](https://github.com/datachainlab/lcp/releases/tag/v0.2.17)
- [lcp-go v0.2.22](https://github.com/datachainlab/lcp-go/releases/tag/v0.2.22)
- [lcp-solidity v0.2.1](https://github.com/datachainlab/lcp-solidity/releases/tag/v0.2.1)
- [yui-relayer v0.5.16](https://github.com/hyperledger-labs/yui-relayer/releases/tag/v0.5.16)
- [ethereum-ibc-relay-chain v0.3.18](https://github.com/datachainlab/ethereum-ibc-relay-chain/releases/tag/v0.3.18)
- [parlia-elc v0.3.10](https://github.com/datachainlab/parlia-elc/releases/tag/v0.3.10)
- [ibc-parlia-relay v0.3.20](https://github.com/datachainlab/ibc-parlia-relay/releases/tag/v0.3.20)
- [ibc-parlia-relay v0.3.21](https://github.com/datachainlab/ibc-parlia-relay/releases/tag/v0.3.21)

## Pre-requisites

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.22.2
require (
github.com/datachainlab/ethereum-ibc-relay-chain v0.3.18
github.com/datachainlab/ibc-hd-signer v0.1.2
github.com/datachainlab/ibc-parlia-relay v0.3.20
github.com/datachainlab/lcp-go v0.2.21
github.com/datachainlab/ibc-parlia-relay v0.3.21
github.com/datachainlab/lcp-go v0.2.22
github.com/hyperledger-labs/yui-relayer v0.5.16
)

Expand Down Expand Up @@ -74,7 +74,7 @@ require (
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/datachainlab/go-risc0-verifier v0.1.1 // indirect
github.com/datachainlab/go-risc0-verifier v0.1.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,14 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
github.com/datachainlab/ethereum-ibc-relay-chain v0.3.18 h1:bfHPAZv7BXCWjlnhiWuBifhA65C81x23GtSjsyZINss=
github.com/datachainlab/ethereum-ibc-relay-chain v0.3.18/go.mod h1:Hqfxa2dcbK7P6yheoVwu09q8rN1kiC1HxSL0S9K4dDU=
github.com/datachainlab/go-risc0-verifier v0.1.1 h1:M+GjE4tcbLAxJGX8oCC70yWv5gSXSgPJpBHZuyFB9kk=
github.com/datachainlab/go-risc0-verifier v0.1.1/go.mod h1:O+uLSIdkN9rvqDXuZCnAOSPf/IT5SVjK/PxxJP3sPPU=
github.com/datachainlab/go-risc0-verifier v0.1.3 h1:iEIVqGzLK1+AdZCfNqSxXJhMLDg7lEzbAfOZ8b/stRM=
github.com/datachainlab/go-risc0-verifier v0.1.3/go.mod h1:O+uLSIdkN9rvqDXuZCnAOSPf/IT5SVjK/PxxJP3sPPU=
github.com/datachainlab/ibc-hd-signer v0.1.2 h1:fWAYjMBVyM390OllX/l58mZYA7we0spEBFLYKWYTwfw=
github.com/datachainlab/ibc-hd-signer v0.1.2/go.mod h1:nwH0Z3TK/7jbu/oInGGWGRimQ+LCn6yvDyjMZrw9mR4=
github.com/datachainlab/ibc-parlia-relay v0.3.20 h1:LYRViwuk8OV9Mq1f/urSkHXXV9kU625vTD+l2tgzFvA=
github.com/datachainlab/ibc-parlia-relay v0.3.20/go.mod h1:cD7LUXfUcLSlIz1V5S1g2H1NOaREI+2a9W0m1AS7OiY=
github.com/datachainlab/lcp-go v0.2.21 h1:ECMUqlVr0G13BOSC1GvQVWlfbzEgRfSFZzKYss7lNdQ=
github.com/datachainlab/lcp-go v0.2.21/go.mod h1:3YHfhCywH8SNd6qS3MLgeMMeGJm7l4kfPAEQI0Egf7o=
github.com/datachainlab/ibc-parlia-relay v0.3.21 h1:kPdJ0L8fgWUfvO6BOp5yx0/8apBMg6jCWZt7g9yRoQ8=
github.com/datachainlab/ibc-parlia-relay v0.3.21/go.mod h1:cD7LUXfUcLSlIz1V5S1g2H1NOaREI+2a9W0m1AS7OiY=
github.com/datachainlab/lcp-go v0.2.22 h1:NGxmYEDE1Hh7lAvNJqaqcKchy0PO2Y6XfqDyMSBKst8=
github.com/datachainlab/lcp-go v0.2.22/go.mod h1:SpxlVp4hECm9Lgr4+ob4ZKJfbg6Q7SVsbkgBelBnaWk=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
50 changes: 50 additions & 0 deletions tests/e2e/cases/tm2bsc/configs/templates/ibc-0-zkdcap.json.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"chain": {
"@type": "/relayer.chains.tendermint.config.ChainConfig",
"key": "testkey",
"chain_id": "ibc0",
"rpc_addr": "http://localhost:26657",
"account_prefix": "cosmos",
"gas_adjustment": 1.5,
"gas_prices": "0.025stake",
"average_block_time_msec": 1000,
"max_retry_for_commit": 5
},
"prover": {
"@type": "/relayer.provers.lcp.config.ProverConfig",
"origin_prover": {
"@type": "/relayer.chains.tendermint.config.ProverConfig",
"trusting_period": "336h",
"refresh_threshold_rate": {
"numerator": 2,
"denominator": 3
}
},
"lcp_service_address": "localhost:50051",
"mrenclave": $MRENCLAVE,
"allowed_quote_statuses": ["GROUP_OUT_OF_DATE","SW_HARDENING_NEEDED"],
"allowed_advisory_ids": ["INTEL-SA-00219","INTEL-SA-00289","INTEL-SA-00334","INTEL-SA-00477","INTEL-SA-00614","INTEL-SA-00615","INTEL-SA-00617", "INTEL-SA-00828"],
"key_expiration": $LCP_KEY_EXPIRATION,
"key_update_buffer_time":3600,
"elc_client_id": "07-tendermint-1",
"message_aggregation": true,
"is_debug_enclave": $IS_DEBUG_ENCLAVE,
"current_tcb_evaluation_data_number": 1,
"tcb_evaluation_data_number_update_grace_period": 0,
"risc0_zkvm_config": {
"image_id": $RISC0_IMAGE_ID,
"mock": $LCP_ZKDCAP_RISC0_MOCK
},
"operators": [
"0xcb96F8d6C2d543102184d679D7829b39434E4EEc"
],
"operator_signer": {
"@type": "/relayer.provers.lcp.signers.raw.SignerConfig",
"private_key": "0x99b107441d0bce8e5b0078450f10f309910d8c0a2cc91671bd6cc1a284809642"
},
"operators_eip712_evm_chain_params": {
"chain_id": 9999,
"verifying_contract_address": $LC_ADDRESS
}
}
}
74 changes: 74 additions & 0 deletions tests/e2e/cases/tm2bsc/configs/templates/ibc-1-zkdcap.json.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"chain": {
"@type": "/relayer.chains.ethereum.config.ChainConfig",
"chain_id": "ibc1",
"eth_chain_id": 9999,
"rpc_addr": "http://localhost:8545",
"signer": {
"@type": "/relayer.signers.hd.SignerConfig",
"mnemonic": "math razor capable expose worth grape metal sunset metal sudden usage scheme",
"path": "m/44'/60'/0'/0/0"
},
"ibc_address": $IBC_ADDRESS,
"initial_send_checkpoint": 0,
"initial_recv_checkpoint": 0,
"enable_debug_trace": true,
"average_block_time_msec": 6000,
"max_retry_for_inclusion": 5,
"allow_lc_functions": {
"lc_address": $LC_ADDRESS,
"selectors": [
"0xa97c61d6",
"0x6ac73aa0"
]
},
"gas_estimate_rate": {
"numerator": 3,
"denominator": 2
},
"max_gas_limit": 10000000,
"tx_type": "auto",
"blocks_per_event_query": 1000,
"abi_paths": ["../../chains/bsc/contracts/abis"]
},
"prover": {
"@type": "/relayer.provers.lcp.config.ProverConfig",
"origin_prover": {
"@type": "/relayer.provers.parlia.config.ProverConfig",
"trusting_period": "86400s",
"max_clock_drift": "0",
"refresh_threshold_rate": {
"numerator": 1,
"denominator": 2
},
"refreshBlockDifferenceThreshold": 10000,
"network": "localnet"
},
"lcp_service_address": "localhost:50051",
"mrenclave": $MRENCLAVE,
"allowed_quote_statuses": ["GROUP_OUT_OF_DATE", "SW_HARDENING_NEEDED"],
"allowed_advisory_ids": ["INTEL-SA-00219","INTEL-SA-00289","INTEL-SA-00334","INTEL-SA-00477","INTEL-SA-00614","INTEL-SA-00615","INTEL-SA-00617", "INTEL-SA-00828"],
"key_expiration": $LCP_KEY_EXPIRATION,
"key_update_buffer_time": 3600,
"elc_client_id": "xx-parlia-1",
"message_aggregation": true,
"is_debug_enclave": $IS_DEBUG_ENCLAVE,
"current_tcb_evaluation_data_number": 1,
"tcb_evaluation_data_number_update_grace_period": 0,
"risc0_zkvm_config": {
"image_id": $RISC0_IMAGE_ID,
"mock": $LCP_ZKDCAP_RISC0_MOCK
},
"operators": [
"0x9722414d09f43fb02235d739B50F4C027F43e657"
],
"operator_signer": {
"@type": "/relayer.provers.lcp.signers.raw.SignerConfig",
"private_key": "0x8a94e9f944a297c402a997aa9a60026ce47a6e018192d111c1703176bbc26651"
},
"operators_eip712_cosmos_chain_params": {
"chain_id": "ibc0",
"prefix": "ibc"
}
}
}
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/e2e/chains/bsc/contracts/lib/risc0-ethereum
Submodule risc0-ethereum updated 222 files
6 changes: 4 additions & 2 deletions tests/e2e/chains/bsc/contracts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/e2e/chains/bsc/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "TBD",
"devDependencies": {
"@datachainlab/ethereum-ibc-relay-chain": "git+https://github.com/datachainlab/ethereum-ibc-relay-chain.git#semver:v0.3.10",
"@datachainlab/lcp-solidity": "git+https://github.com/datachainlab/lcp-solidity.git#semver:v0.2.0-rc.3",
"@datachainlab/lcp-solidity": "git+https://github.com/datachainlab/lcp-solidity.git#semver:v0.2.1",
"@hyperledger-labs/yui-ibc-solidity": "git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#semver:v0.3.40",
"@nomicfoundation/hardhat-foundry": "^1.1.3",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/chains/bsc/contracts/scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ async function deployLCPClientZKDCAP(deployer, ibcHandler, developMode, rootCert
} else {
console.log("Deploying RiscZeroGroth16Verifier");
// CONTROL_ROOT and BN254_CONTROL_ROOT must match the version of risc0 utilized by the LCP
// ref. https://github.com/risc0/risc0-ethereum/blob/b9b22c396a0d5ef97bf02702da9415d5bb79a85a/contracts/src/groth16/ControlID.sol#L22 (v1.2)
// ref. https://github.com/risc0/risc0-ethereum/blob/v3.0.1/contracts/src/groth16/ControlID.sol
riscZeroVerifier = await deploy(deployer, "RiscZeroGroth16Verifier", [
// CONTROL_ROOT
"0x8cdad9242664be3112aba377c5425a4df735eb1c6966472b561d2855932c0469",
"0xa54dc85ac99f851c92d7c96d7318af41dbe7c0194edfcc37eb4d422a998c1f56",
// BN254_CONTROL_ROOT
"0x04446e66d300eb7fb45c9726bb53c793dda407a62e9601618bb43c5c14657ac0"
]);
Expand Down
38 changes: 19 additions & 19 deletions tests/e2e/chains/tendermint/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ require (
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.2.1
github.com/datachainlab/ibc-mock-app v0.1.1
github.com/datachainlab/lcp-go v0.2.17-0.20250326101114-4f484197aeb4
github.com/datachainlab/lcp-go v0.2.22
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
)

require (
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/storage v1.38.0 // indirect
cosmossdk.io/collections v0.4.0 // indirect
Expand All @@ -48,7 +48,7 @@ require (
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
Expand All @@ -74,7 +74,7 @@ require (
github.com/creachadair/atomicfile v0.3.1 // indirect
github.com/creachadair/tomledit v0.0.24 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/datachainlab/go-risc0-verifier v0.1.1 // indirect
github.com/datachainlab/go-risc0-verifier v0.1.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
Expand Down Expand Up @@ -108,7 +108,7 @@ require (
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand Down Expand Up @@ -194,26 +194,26 @@ require (
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/metric v1.33.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/oauth2 v0.26.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/term v0.29.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.171.0 // indirect
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/grpc v1.71.0 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading
Loading