Skip to content
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

Handshake impls from relayer loop #421

Merged
merged 42 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
31bd354
Added logic to generate GRPC client from cosmos.auth proto (#337)
andynog Nov 3, 2020
352a6d9
Adding logic to use GRPC client (#337)
andynog Nov 4, 2020
388c380
Grpc client connection retrieves account sequence (#337)
andynog Nov 4, 2020
57de7bc
Removed the account sequence flag from the tx raw commands (#337)
andynog Nov 4, 2020
3b54eb6
Removed instructions to query and specify account sequence from tx ra…
andynog Nov 4, 2020
49a787c
Logic to fetch GRPC endpoint address from config (#337)
andynog Nov 4, 2020
16776a6
Fixing tests (#361)
andynog Nov 5, 2020
15b46a1
Logic to use the address from the key seed (#337)
andynog Nov 5, 2020
0bf8230
Added boilerplate code for a keys add command to the relayer (#363)
andynog Nov 5, 2020
8ed590a
Merge branch 'andy/acct-sequence' into andy/add-key-cmd
andynog Nov 5, 2020
f1b2e50
Removing key flag from tx cmds
andynog Nov 6, 2020
833a200
Adding logic to get key specified in the config
andynog Nov 6, 2020
6a38918
Logic to get the key specified in the config (#363)
andynog Nov 6, 2020
164a130
Removed the -k flag from the tx raw commands (#363)
andynog Nov 6, 2020
3c89481
More logic to add key command (#363)
andynog Nov 11, 2020
1bc1046
key add command for memory store working (#363)
andynog Nov 11, 2020
f356a4d
Merging master into andy/add-key-cmd. Will re-implement changes lost …
andynog Nov 11, 2020
e60fa7c
Added logic to persist key seed in 'home' folder (#363)
andynog Nov 17, 2020
c45aa58
Changes implemented (#363):
andynog Nov 18, 2020
03e9880
Logic to use the key_name parameter from the config to add key. Remov…
andynog Nov 18, 2020
3eb5fd6
Changed the logic to get the key from the test keyring file store (#363)
andynog Nov 18, 2020
c695734
Implemented changes: (#363)
andynog Nov 19, 2020
6240317
Merging master and fixing merging conflicts. Merging fixed tx issues …
andynog Nov 19, 2020
4fcec4a
Updated the README instructions (#363)
andynog Nov 19, 2020
ce1aa53
Disable the 'keys restore' command for now (#363)
andynog Nov 19, 2020
cd1fd8b
Added 'keys list' command to show key added on a chain (#363)
andynog Nov 19, 2020
15eb796
Added entry for issue #363 (PR #408)
andynog Nov 19, 2020
f363896
Refactored the bound variables to use the full name per comment sugge…
andynog Nov 20, 2020
ac6e485
Merge branch 'master' into andy/add-key-cmd
ancazamfir Nov 23, 2020
d3ed4da
Move key retrieval, memo and timeout height inside send_tx
ancazamfir Nov 23, 2020
6f214d9
Add the client creation, connection and channel handshake
ancazamfir Nov 25, 2020
1eb3626
Merge branch 'master' into anca/relayer_loop
ancazamfir Nov 25, 2020
4f17f56
Merge branch 'master' into anca/relayer_loop
ancazamfir Nov 25, 2020
2b37758
remove sleeps
ancazamfir Nov 25, 2020
3fef556
More error handling, cleanup
ancazamfir Nov 25, 2020
304ee75
Macro for channel CLIs
ancazamfir Nov 25, 2020
ab12e76
Macro for connection CLIs
ancazamfir Nov 26, 2020
50886d7
Where src/dst make no sense rename to a/b, also fix a few bugs after …
ancazamfir Nov 26, 2020
cc532be
cleanup
ancazamfir Nov 26, 2020
adfc64a
cargo fmt
ancazamfir Nov 26, 2020
741aea2
Use Romain's skip-verif until backwards verification is done
ancazamfir Nov 26, 2020
2bc4d44
fix CLI bugs
ancazamfir Nov 27, 2020
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
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ members = [
exclude = [
"proto-compiler"
]

[patch.crates-io]

tendermint = { git = "https://github.com/informalsystems/tendermint-rs", branch = "romac/skip-verif" }
tendermint-rpc = { git = "https://github.com/informalsystems/tendermint-rs", branch = "romac/skip-verif" }
tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs", branch = "romac/skip-verif" }
tendermint-light-client = { git = "https://github.com/informalsystems/tendermint-rs", branch = "romac/skip-verif" }
18 changes: 10 additions & 8 deletions modules/src/ics04_channel/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ impl ChannelEnd {
}
self.counterparty().validate_basic()
}

/// Helper function to compare the state of this end with another state.
pub fn state_matches(&self, other: &State) -> bool {
self.state.eq(other)
}
}

#[derive(Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -236,18 +241,16 @@ impl FromStr for Order {

#[derive(Clone, Debug, PartialEq)]
pub enum State {
Uninitialized = 0,
Init,
TryOpen,
Open,
Closed,
Init = 1,
TryOpen = 2,
Open = 3,
Closed = 4,
}

impl State {
/// Yields the state as a string
pub fn as_string(&self) -> &'static str {
match self {
Self::Uninitialized => "UNINITIALIZED",
Self::Init => "INIT",
Self::TryOpen => "TRYOPEN",
Self::Open => "OPEN",
Expand All @@ -258,7 +261,6 @@ impl State {
// Parses the State out from a i32.
pub fn from_i32(s: i32) -> Result<Self, Error> {
match s {
0 => Ok(Self::Uninitialized),
1 => Ok(Self::Init),
2 => Ok(Self::TryOpen),
3 => Ok(Self::Open),
Expand Down Expand Up @@ -291,7 +293,7 @@ pub mod test_util {
/// Returns a dummy `RawChannel`, for testing only!
pub fn get_dummy_raw_channel_end() -> RawChannel {
RawChannel {
state: 0,
state: 1,
ordering: 0,
counterparty: Some(get_dummy_raw_counterparty()),
connection_hops: vec![],
Expand Down
Loading