-
Notifications
You must be signed in to change notification settings - Fork 1
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(lc/starknet): verify signed commitment proofs from starknet #242
base: main
Are you sure you want to change the base?
Conversation
cdd28da
to
124d5d0
Compare
124d5d0
to
07e36a1
Compare
@@ -126,7 +158,7 @@ where | |||
}, | |||
delay_period, | |||
update_height, | |||
proof_init: counterparty_payload.proof_init.proof_bytes, | |||
proof_init, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I successfully managed to sign the proof_init
@@ -126,7 +158,7 @@ where | |||
}, | |||
delay_period, | |||
update_height, | |||
proof_init: counterparty_payload.proof_init.proof_bytes, | |||
proof_init, | |||
// TODO(rano): counterparty_payload has empty proofs? | |||
// proof_client: counterparty_payload.proof_client.proof_bytes, | |||
proof_client: vec![0x1], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these two are skipped. Probably ibc-go
doesn't use them after cosmos/ibc-go#7129
// FIXME(rano): generate the signature | ||
proof_ack: dbg!(counterparty_payload.proof_ack.proof_bytes), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the signature verification fails here. But I don't know how to create the signature at this point without access to ConnectionEnd
and ConnectionId
at starknet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can query the stored counteryparty connection end (starknet) at cosmos, cosmos's own connection id to recreate the ConnectionEnd.
To generate the proofs -- specifically signatures, I hacked around. This is not ideal. To generate a signature, I need
When I am building the message with CosmosChain, I don't have access to StarknetChain. So I can't fetch the consensus_root (block_hash) for starknet. For now, I pass the @soareschen any idea how to do this properly? |
I think you need to include that in the payload. You can define a custom payload type for Starknet if needed. |
You could also modify the |
5828ef2
to
7722d4d
Compare
I ended up building the bytes that need to be signed at the Starknet (-to-Cosmos) payload builder step. But Starknet doesn't have access to the Cosmos's default signer. So I signed it at Cosmos's message builder step. But I don't see how I can sign the bytes for packet commitment, ack and receipt. |
One more question: is the ibc-starknet/relayer/crates/starknet-chain-components/src/impls/queries/packet_receipt.rs Lines 51 to 57 in a3248f9
... for |
currently fails because the |
Actually, I think, the
Starknet does have an equivalent to
But, it uses Probably, we can use ibc-starknet/relayer/crates/starknet-integration-tests/src/contexts/bootstrap.rs Lines 108 to 111 in a3248f9
|
closes #229