-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Submit MsgUpdateClient
to tendermint light client
#67
base: main
Are you sure you want to change the base?
Conversation
~ $ simd query ibc channelv2 unreceived-packets channel-0 height: revision_height: "475" revision_number: "0" sequences: [] ~ $ simd query ibc channelv2 unreceived-packets channel-1 height: revision_height: "475" revision_number: "0" sequences: []
failed to request state transition proof: rpc error: code = Internal desc = error sending request for url (http://localhost:8545/)
The request is hitting celestia-prover
Getting this error
I think the client ID may need to be the SP1 contract address |
|
I think this line in the docker-compose may be incorrect |
New error unlocked
|
I made the celestia-prover crash. Logs from before the crash
Looks like it OOMed
|
forge debugger makes me think the error is in the new trusted client state |
Old trustedClientState:
New trustedClientState:
Operator generated trustedClientState:
|
Can get the operator to create a client state with Groth16 using the --proof-type groth16 flag: +++ b/justfile
@@ -26,7 +26,7 @@ build-sp1-programs:
# Build and optimize the eth wasm light client using `cosmwasm/optimizer`. Requires `docker` and `gzip`
build-cw-ics08-wasm-eth:
docker run --rm -v "$(pwd)":/code --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry cosmwasm/optimizer:0.16.1 ./programs/cw-ics08-wasm-eth
- cp artifacts/cw_ics08_wasm_eth.wasm e2e/interchaintestv8/wasm
+ cp artifacts/cw_ics08_wasm_eth.wasm e2e/interchaintestv8/wasm
gzip e2e/interchaintestv8/wasm/cw_ics08_wasm_eth.wasm -f
# Clean up the cache and out directories
@@ -67,7 +67,7 @@ lint:
# Generate the ABI files for the contracts
generate-abi: build-contracts
jq '.abi' out/ICS26Router.sol/ICS26Router.json > abi/ICS26Router.json
- jq '.abi' out/ICSCore.sol/ICSCore.json > abi/ICSCore.json
+ jq '.abi' out/ICSCore.sol/ICSCore.json > abi/ICSCore.json
jq '.abi' out/ICS20Transfer.sol/ICS20Transfer.json > abi/ICS20Transfer.json
jq '.abi' ./out/SP1ICS07Tendermint.sol/SP1ICS07Tendermint.json > abi/SP1ICS07Tendermint.json
jq '.abi' out/ERC20.sol/ERC20.json > abi/ERC20.json
@@ -135,7 +135,10 @@ install-relayer:
# Note that the `scripts/genesis.json` file is ignored in the `.gitignore` file
genesis-sp1-ics07: build-sp1-programs
@echo "Generating the genesis file..."
- RUST_LOG=info cargo run --bin operator --release -- genesis -o scripts/genesis.json
+ RUST_LOG=info cargo run --bin operator --release -- genesis --proof-type groth16 -o scripts/genesis.json
+ @echo "--> Setting the verifier key in scripts/genesis.json"
+ @sed -i '' 's|"updateClientVkey": "0x00d003b09381282af2781e5ec015aae610d766a08fffd4ac45d2e6dad736ead3"|"updateClientVkey": "0x409417091e6e4961546661834d83a3f048814cde71efa42b034496540826523b"|' scripts/genesis.json
+ @echo "--> Set the verifier key to 0x409417091e6e4961546661834d83a3f048814cde71efa42b034496540826523b."
# Deploy the SP1ICS07Tendermint contract to the Eth Sepolia testnet if the `.env` file is present
deploy-sp1-ics07: genesis-sp1-ics07 |
New error unlocked:
|
The proof verifies off-chain:
|
The original public values are == to "reduced" public values, that is public values that have been modulo'ed the bn254 field limit. See https://www.diffchecker.com/rZxdMTKG/ |
I switched to returning a hex-encoded verifier key from the celestia-prover. Now I'm getting a verifier key mismatch error again. The logs
To find the verifier key in the contract:
The EVM error
which maps to the error
|
Updating the client finally works:
|
MsgUpdateClient
to tendermint light client
Closes step two of #31.
A few changes in this PR, can split them into separate PRs if reviewers request:
make relay
command that does step 2.solidity-ibc-eureka/justfile
. The diff is needed so that the Tendermint light client on the EVM roll-up supports Groth16 and has the correct verifier key (from the celestia-prover)curl
to the Celestia-prover for debugging purposes (can revert if requested)Info
endpointextractDeployedContractAddresses
to utils package so that it can be used in multiple placestransfer
scriptTesting
I can't run the celestia-prover in Docker because #89 but if I run it locally, it works: