-
Notifications
You must be signed in to change notification settings - Fork 697
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
DNM: IBC-Gaia Integration #130
Conversation
bec3cdb
to
38e34ca
Compare
Codecov Report
@@ Coverage Diff @@
## master #130 +/- ##
==========================================
+ Coverage 65.65% 66.46% +0.81%
==========================================
Files 5 5
Lines 492 498 +6
==========================================
+ Hits 323 331 +8
+ Misses 138 136 -2
Partials 31 31 |
I'm in the process of turning this into a 2 chain tutorial. I'll be adding notes here:
|
https://github.com/cosmos/gaia/tree/joon/ibc-gaia-interface/cmd/gaiacli I tried to test ibc by referring to the above document.
|
@@ -87,8 +87,8 @@ else | |||
endif | |||
|
|||
install: go.sum check-ledger | |||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/gaiad | |||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/gaiacli | |||
go install $(BUILD_FLAGS) ./cmd/gaiad |
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.
mmmm how comes? Did you have any issues with -mod=readonly
? Is there anything I can help out with?
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.
Sure! I was having issues with -mod=readonly
!
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.
Why is this the case @alessio?
@wlsaud619 It looks like that isn't the right version of gaia. |
@jackzampolin Sorry, my mistake. I didn't apply branch ;) |
gaiacli --home ibc0/n0/gaiacli query ibc channel channel ibc-mock chan0 --trust-node | ||
``` | ||
|
||
## Send Packet |
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.
Both send-packet commands are using ibc0
, but all the other sections have matched pairs of ibc0
/ibc1
commands. Is this intentional? I'm guessing it's just a typo.
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.
How should the commands look? This part of the instructions are left over from the loopback demo
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.
flush
command is currently using ibc0
as its home but making transaction on ibc1
, which is bit misleading
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.
@mossid so how would you rewrite the example?
…fore 4th transaction in the handshake
@wlsaud619 It looks like the sequence is updating for me after the flush. |
gaiacli --home ibc0/n0/gaiacli q ibcmocksend sequence chan0 | ||
|
||
# Returns the next expected sequence number, for use in scripting | ||
gaiacli --home ibc0/n0/gaiacli q ibcmocksend next chan0 |
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.
On a fresh install:
Running gaiacli --home ibc0/n0/gaiacli q ibcmocksend sequence chan0
returns 0
Running gaiacli --home ibc0/n0/gaiacli q ibcmocksend next chan0
immediately afterward returns 2
(without having sent any packets)
I was able to reproduce the above after stopping the testnet gaiad processes, removing the entire ibc-testnets directory, and starting over. Will try on a new machine tomorrow (currently, on a Mac).
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.
Wanted to add that manually inputting the correct sequence number (should be 1
instead of 2
) to successfully send a packet the first time, then using the above to get subsequent "next sequence" numbers works.
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.
In L74 of the function add 1 to res, so if value is nil, res should be set to 0 instead of 1.
cmd/gaiacli/README.md
Outdated
--node1 tcp://localhost:26657 \ | ||
--node2 tcp://localhost:26557 \ | ||
--chain-id2 ibc1 \ | ||
--from1 n0 --from2 n1 -y -o text |
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.
The -y
option doesn't seem to exist for this build and running this command results in this error:
ERROR: unknown shorthand flag: 'y' in -y
Ran gaiacli --home ibc0/n0/gaiacli tx ibc channel flush ibcmocksend --help
and didn't see the option/flag listed either (edit: oh lol it was to confirm the transaction - getting late here).
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This PR is the tracking PR for Gaia/IBC integration. To try it out, pull down this branch and build
gaia
using the instructions incmd/gaiacli/README.md
.