-
Notifications
You must be signed in to change notification settings - Fork 2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
a5f39fd
update ibc-client-cw patch branch
rnbguy 01290a9
fix cw context methods
rnbguy e3080cf
impl cw client state execution for starknet
rnbguy de53ed2
add membership proof signer
rnbguy 07e36a1
sign connection open try message
rnbguy 59ec68f
ignore client and consensus proof
rnbguy d71ba5d
open ack proof
rnbguy 776aa81
todo comment
rnbguy 311be49
generate membership proof message at starknet payload
rnbguy 4c465ac
membership proof msg for channel end
rnbguy cbaf6be
membership proof msg for packet commitment
rnbguy 02d4d6b
membership proof msg for packet ack
rnbguy 7722d4d
membership proof msg for packet receipt
rnbguy cb4fa8d
rename field in StarknetCommitmentProof
rnbguy c14166f
rm redundant todos
rnbguy 426a861
sign self client and consensus state proofs
rnbguy fd25041
use chain_status height as proof height
rnbguy 043f2a1
add tiny-bip39 dep
rnbguy e233c3e
proof_signer components
rnbguy 56b8427
add proof_signer field to StarknetChain
rnbguy 0ad7614
generate secp256k1 keypair from felt signing key
rnbguy da71d3c
sign with starknet proof signer
rnbguy c6ba01e
Merge branch 'main' into rano/starknet-to-cosmos-commitment-proofs
rnbguy becea65
nits
rnbguy 7644902
rm redundant endpoint
rnbguy 46931e2
use packet_receipt endpoint
rnbguy e1e9c15
ibc-go compatible packet commitment
rnbguy aa5bc01
test consistent packet commitment in cairo and rust
rnbguy 8f5ce48
happy clippy
rnbguy 1db25f1
rm test steps with dummy proofs
rnbguy 205756e
cargo fmt
rnbguy b84c5c4
cargo clippy
rnbguy b8f240b
update expected commitment hash after fix
rnbguy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use ibc_client_cw::api::CwClientStateExecution; | ||
use ibc_client_cw::context::client_ctx::CwClientExecution; | ||
|
||
use super::ClientState; | ||
use crate::ConsensusState; | ||
|
||
impl<'a, E> CwClientStateExecution<'a, E> for ClientState | ||
where | ||
E: CwClientExecution<'a, ClientStateMut = ClientState, ConsensusStateRef = ConsensusState>, | ||
{ | ||
fn public_key(&self) -> Option<Vec<u8>> { | ||
Some(self.0.pub_key.clone()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod common; | ||
pub mod cw; | ||
pub mod execution; | ||
pub mod validation; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
relayer/crates/starknet-chain-components/src/impls/proof_signer.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use core::marker::PhantomData; | ||
|
||
use cgp::prelude::*; | ||
|
||
use crate::traits::proof_signer::{ | ||
HasStarknetProofSignerType, ProvideStarknetProofSignerType, StarknetProofSignerGetter, | ||
}; | ||
|
||
pub struct GetStarknetProofSignerField<Tag>(pub PhantomData<Tag>); | ||
|
||
impl<Chain, Tag> ProvideStarknetProofSignerType<Chain> for GetStarknetProofSignerField<Tag> | ||
where | ||
Chain: Async + HasField<Tag>, | ||
Tag: Async, | ||
Chain::Value: Async, | ||
{ | ||
type ProofSigner = Chain::Value; | ||
} | ||
|
||
impl<Chain, Tag> StarknetProofSignerGetter<Chain> for GetStarknetProofSignerField<Tag> | ||
where | ||
Chain: Async + HasStarknetProofSignerType + HasField<Tag, Value = Chain::ProofSigner>, | ||
Tag: Async, | ||
{ | ||
fn proof_signer(chain: &Chain) -> &Chain::ProofSigner { | ||
chain.get_field(PhantomData) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fixed this as part of this PR.
cc @Farhad-Shabani