-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Migrate to Gaia v3.0 #278
Migrate to Gaia v3.0 #278
Conversation
|
You have local replace directives in the |
Ok, so this branch is now compiling and running a developer environment with
|
Ok to reproduce the current error make sure you have
Blocked on cosmos/cosmos-sdk#7211 |
@@ -432,7 +432,8 @@ func relayPacketFromQueryResponse(src, dst *PathEnd, res *ctypes.ResultTx, | |||
rp.packetData = []byte(p.Value) | |||
} | |||
if string(p.Key) == "packet_timeout_height" { | |||
timeout, _ := strconv.ParseUint(strings.Split(string(p.Value), "-")[0], 10, 64) | |||
fmt.Println("TIMEOUT HEIGHT VALUE:", string(p.Value)) | |||
timeout, _ := strconv.ParseUint(strings.Split(string(p.Value), "-")[1], 10, 64) | |||
rp.timeout = timeout |
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.
NOTE: rp.timeout
should eventually become a clienttypes.Height
struct
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.
is there an open issue on the SDK for this? Do we need to track this workstream somewhere?
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.
This is already done in the SDK, this is a relayer issue. I mean that the relayer structs like relayMsgRecvPacket
and relayMsgTimeout
still use a uint64
to represent timeout height. The SDK uses clienttypes.Height
and the relayer currently hacks around this by getting the epoch height from the sending chain like so:
https://github.com/ovrclk/relayer/blob/jack%2Fgaiav3.0/relayer/naive-strategy.go#L434
And then recreating a clienttypes.Height for the receiving chain like so:
https://github.com/ovrclk/relayer/blob/jack%2Fgaiav3.0/relayer/relayPackets.go#L162
Instead, the relayer structs should have timeoutHeight
be a clienttypes.Height
struct and then simply parse the height from the events and place the clienttypes.Height
in the relayer struct. Then the full height with the epoch number can be sent to the receiving chain.
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.
This would allow the relayer to work for chains with non-zero epochs
Once the issue with |
Current Status: #281