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

ugprade cosmos-sdk to master #330

Merged
merged 1 commit into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion cmd/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func faucetService() *cobra.Command {
if err != nil {
return err
}
_, err = sdk.ParseCoin(args[4])
_, err = sdk.ParseCoinNormalized(args[4])
if err != nil {
return err
}
Expand Down
7 changes: 1 addition & 6 deletions cmd/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,8 @@ func createClientCmd() *cobra.Command {
return err
}

consensusParams, err := chains[dst].QueryConsensusParams()
if err != nil {
return err
}

return sendAndPrint([]sdk.Msg{chains[src].PathEnd.CreateClient(dstHeader,
chains[dst].GetTrustingPeriod(), ubdPeriod, consensusParams, chains[src].MustGetAddress())},
chains[dst].GetTrustingPeriod(), ubdPeriod, chains[src].MustGetAddress())},
chains[src], cmd)
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/testnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func faucetStartCmd() *cobra.Command {
if err != nil {
return err
}
amount, err := sdk.ParseCoins(args[2])
amount, err := sdk.ParseCoinsNormalized(args[2])
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/xfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func xfersend() *cobra.Command {
return err
}

amount, err := sdk.ParseCoin(args[2])
amount, err := sdk.ParseCoinNormalized(args[2])
if err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/avast/retry-go v2.6.0+incompatible
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/containerd/continuity v0.0.0-20200928162600-f2cc35102c2a // indirect
github.com/cosmos/cosmos-sdk v0.40.0-rc3
github.com/cosmos/cosmos-sdk v0.40.0-rc3.0.20201125180210-512b533242d3
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d
github.com/gogo/protobuf v1.3.1
github.com/gorilla/mux v1.8.0
Expand All @@ -17,8 +17,8 @@ require (
github.com/spf13/cobra v1.1.1
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.6.1
github.com/tendermint/tendermint v0.34.0-rc6
github.com/tendermint/tm-db v0.6.2
github.com/tendermint/tendermint v0.34.0
github.com/tendermint/tm-db v0.6.3
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 // indirect
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 // indirect
Expand Down
20 changes: 20 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,15 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cosmos/cosmos-sdk v0.40.0-rc3 h1:sS9BZ82dOxXiZPZdfrzSniEAzLLN0oTP5lFVyjnq2x4=
github.com/cosmos/cosmos-sdk v0.40.0-rc3/go.mod h1:eKgbkQO4FEvC+a1+eyRuL7UgluGK1ad4PufPTpQc6ZA=
github.com/cosmos/cosmos-sdk v0.40.0-rc3.0.20201125180210-512b533242d3 h1:JiRRwOJRsdCLZtsZ/9u7UzgnhkLfYxB2DCX5xl8rfUo=
github.com/cosmos/cosmos-sdk v0.40.0-rc3.0.20201125180210-512b533242d3/go.mod h1:U5Twv5RC7xsCvExSjjS2HbDhu5bxKM/fRosQ3KR5JUI=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE=
github.com/cosmos/iavl v0.15.0-rc4 h1:P1wmET7BueqCzfxsn+BzVkDWDLY9ij2JNwkbIdM7RG8=
github.com/cosmos/iavl v0.15.0-rc4/go.mod h1:5CsecJdh44Uj4vZ6WSPeWq84hNW5BwRI36ZsAbfJvRw=
github.com/cosmos/iavl v0.15.0-rc5 h1:AMKgaAjXwGANWv56NL4q4hV+a0puSkLYD6cCQAv3i44=
github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I=
github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4=
github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY=
github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI=
Expand Down Expand Up @@ -301,6 +305,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU=
github.com/grpc-ecosystem/grpc-gateway v1.15.2 h1:HC+hWRWf+v5zTMPyoaYTKIJih+4sd4XRWmj0qlG87Co=
github.com/grpc-ecosystem/grpc-gateway v1.15.2/go.mod h1:vO11I9oWA+KsxmfFQPhLnnIb1VDE24M+pdxZFiuZcA8=
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=
github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
Expand Down Expand Up @@ -525,6 +531,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4=
github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM=
github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
Expand Down Expand Up @@ -629,8 +637,12 @@ github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoM
github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4=
github.com/tendermint/tendermint v0.34.0-rc6 h1:SVuKGvvE22KxfuK8QUHctUrmOWJsncZSYXIYtcnoKN0=
github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg=
github.com/tendermint/tendermint v0.34.0 h1:eXCfMgoqVSzrjzOj6clI9GAejcHH0LvOlRjpCmMJksU=
github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ=
github.com/tendermint/tm-db v0.6.2 h1:DOn8jwCdjJblrCFJbtonEIPD1IuJWpbRUUdR8GWE4RM=
github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI=
github.com/tendermint/tm-db v0.6.3 h1:ZkhQcKnB8/2jr5EaZwGndN4owkPsGezW2fSisS9zGbg=
github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
Expand Down Expand Up @@ -679,6 +691,8 @@ golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI=
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand Down Expand Up @@ -730,6 +744,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrS
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc h1:zK/HqS5bZxDptfPJNq8v7vJfXtkU7r9TLIoSr1bXaP4=
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200930145003-4acb6c075d10 h1:YfxMZzv3PjGonQYNUaeU2+DhAdqOxerQ30JFB6WgAXo=
golang.org/x/net v0.0.0-20200930145003-4acb6c075d10/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 h1:42cLlJJdEh+ySyeUUbEQ5bsTiq8voBeTuweGVkY6Puw=
Expand Down Expand Up @@ -866,6 +881,8 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201014134559-03b6142f0dc9 h1:fG84H9C3EXfuDlzkG+VEPDYHHExklP6scH1QZ5gQTqU=
google.golang.org/genproto v0.0.0-20201014134559-03b6142f0dc9/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6 h1:iRN4+t0lvZX/l9gH14ARF9i58tsVa5a97k6aH95rC3Y=
google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
Expand All @@ -888,6 +905,9 @@ google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0=
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.0 h1:IBKSUNL2uBS2DkJBncPP+TwT0sp9tgA8A75NjHt6umg=
google.golang.org/grpc v1.33.0/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down
10 changes: 0 additions & 10 deletions relayer/client-tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@ func (c *Chain) CreateClients(dst *Chain) (err error) {
if err != nil {
return err
}
consensusParams, err := dst.QueryConsensusParams()
if err != nil {
return err
}
msg := c.PathEnd.CreateClient(
dstH,
dst.GetTrustingPeriod(),
ubdPeriod,
consensusParams,
c.MustGetAddress(),
)
clients.Src = append(clients.Src, msg)
Expand All @@ -49,15 +44,10 @@ func (c *Chain) CreateClients(dst *Chain) (err error) {
if err != nil {
return err
}
consensusParams, err := c.QueryConsensusParams()
if err != nil {
return err
}
msg := dst.PathEnd.CreateClient(
srcH,
c.GetTrustingPeriod(),
ubdPeriod,
consensusParams,
dst.MustGetAddress(),
)
clients.Dst = append(clients.Dst, msg)
Expand Down
2 changes: 1 addition & 1 deletion relayer/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ func MustGetHeight(h ibcexported.Height) uint64 {
if !ok {
panic("height is not an instance of height! wtf")
}
return height.GetVersionHeight()
return height.GetRevisionHeight()
}
2 changes: 1 addition & 1 deletion relayer/naive-strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ func relayPacketsFromResultTx(src, dst *PathEnd, res *ctypes.ResultTx, sh *SyncH

switch {
// If the packet has a timeout height, and it has been reached, return a timeout packet
case rp.timeout != 0 && block.GetHeight().GetVersionHeight() >= rp.timeout:
case rp.timeout != 0 && block.GetHeight().GetRevisionHeight() >= rp.timeout:
timeoutPackets = append(timeoutPackets, rp.timeoutPacket())
// If the packet has a timeout timestamp and it has been reached, return a timeout packet
case rp.timeoutStamp != 0 && block.GetTime().UnixNano() >= int64(rp.timeoutStamp):
Expand Down
11 changes: 1 addition & 10 deletions relayer/pathEnd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types"
ibcexported "github.com/cosmos/cosmos-sdk/x/ibc/core/exported"
tmclient "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/light"
)

Expand Down Expand Up @@ -81,7 +80,6 @@ func (pe *PathEnd) UpdateClient(dstHeader ibcexported.Header, signer sdk.AccAddr
func (pe *PathEnd) CreateClient(
dstHeader *tmclient.Header,
trustingPeriod, unbondingPeriod time.Duration,
consensusParams *abci.ConsensusParams,
signer sdk.AccAddress) sdk.Msg {
if err := dstHeader.ValidateBasic(); err != nil {
panic(err)
Expand All @@ -95,9 +93,8 @@ func (pe *PathEnd) CreateClient(
unbondingPeriod,
time.Minute*10,
dstHeader.GetHeight().(clienttypes.Height),
consensusParams,
commitmenttypes.GetSDKSpecs(),
"upgrade/upgradedClient",
[]string{"upgrade", "upgradedClient"},
false,
false,
)
Expand All @@ -122,9 +119,7 @@ func (pe *PathEnd) CreateClient(
func (pe *PathEnd) ConnInit(dst *PathEnd, signer sdk.AccAddress) sdk.Msg {
var version *conntypes.Version
return conntypes.NewMsgConnectionOpenInit(
pe.ConnectionID,
pe.ClientID,
dst.ConnectionID,
dst.ClientID,
defaultChainPrefix,
version,
Expand All @@ -146,7 +141,6 @@ func (pe *PathEnd) ConnTry(
panic(err)
}
msg := conntypes.NewMsgConnectionOpenTry(
pe.ConnectionID,
pe.ConnectionID,
pe.ClientID,
dst.ConnectionID,
Expand Down Expand Up @@ -209,12 +203,10 @@ func (pe *PathEnd) ConnConfirm(dstConnState *conntypes.QueryConnectionResponse,
func (pe *PathEnd) ChanInit(dst *PathEnd, signer sdk.AccAddress) sdk.Msg {
return chantypes.NewMsgChannelOpenInit(
pe.PortID,
pe.ChannelID,
pe.Version,
pe.GetOrder(),
[]string{pe.ConnectionID},
dst.PortID,
dst.ChannelID,
signer,
)
}
Expand All @@ -224,7 +216,6 @@ func (pe *PathEnd) ChanTry(dst *PathEnd, dstChanState *chantypes.QueryChannelRes
return chantypes.NewMsgChannelOpenTry(
pe.PortID,
pe.ChannelID,
pe.ChannelID,
pe.Version,
dstChanState.Channel.Ordering,
[]string{pe.ConnectionID},
Expand Down
13 changes: 7 additions & 6 deletions relayer/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"strings"
"time"

cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/store/rootmulti"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -331,9 +332,9 @@ func (c *Chain) QueryDenomTraces(offset, limit uint64, height int64) (*transfert
// QueryHistoricalInfo returns historical header data
func (c *Chain) QueryHistoricalInfo(height clienttypes.Height) (*stakingtypes.QueryHistoricalInfoResponse, error) {
//TODO: use epoch number in query once SDK gets updated
qc := stakingtypes.NewQueryClient(c.CLIContext(int64(height.GetVersionHeight())))
qc := stakingtypes.NewQueryClient(c.CLIContext(int64(height.GetRevisionHeight())))
return qc.HistoricalInfo(context.Background(), &stakingtypes.QueryHistoricalInfoRequest{
Height: int64(height.GetVersionHeight()),
Height: int64(height.GetRevisionHeight()),
})
}

Expand Down Expand Up @@ -377,11 +378,11 @@ func (c *Chain) toTmValidator(val stakingtypes.Validator) (*tmtypes.Validator, e
if err := c.Encoding.Marshaler.UnpackAny(val.ConsensusPubkey, &pk); err != nil {
return nil, err
}
intoTmPk, ok := pk.(cryptotypes.IntoTmPubKey)
if !ok {
return nil, fmt.Errorf("pubkey not a pub key *scratches head*")
tmkey, err := cryptocodec.ToTmPubKeyInterface(pk)
if err != nil {
return nil, fmt.Errorf("pubkey not a tendermint pub key %s", err)
}
return tmtypes.NewValidator(intoTmPk.AsTmPubKey(), val.ConsensusPower()), nil
return tmtypes.NewValidator(tmkey, val.ConsensusPower()), nil
}

// QueryUnbondingPeriod returns the unbonding period of the chain
Expand Down