ibc: rename epoch -> version (#7429)
* ibc: rename epoch -> version * more renaming * update spec
This commit is contained in:
parent
22b47f426e
commit
72353902e2
2028
client/docs/swagger-ui/swagger.yaml
vendored
2028
client/docs/swagger-ui/swagger.yaml
vendored
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
## Changelog
|
||||
|
||||
- 2020/06/23: Initial version
|
||||
- 2020/08/06: Revisions per review & to reference epoch
|
||||
- 2020/08/06: Revisions per review & to reference version
|
||||
|
||||
## Status
|
||||
|
||||
|
||||
@ -37,8 +37,8 @@ service Query {
|
||||
// ChannelConsensusState queries for the consensus state for the channel
|
||||
// associated with the provided channel identifiers.
|
||||
rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/"
|
||||
"{epoch_number}/height/{epoch_height}";
|
||||
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/"
|
||||
"{version_number}/height/{version_height}";
|
||||
}
|
||||
|
||||
// PacketCommitment queries a stored packet commitment hash.
|
||||
@ -165,10 +165,10 @@ message QueryChannelConsensusStateRequest {
|
||||
string port_id = 1;
|
||||
// channel unique identifier
|
||||
string channel_id = 2;
|
||||
// epoch number of the consensus state
|
||||
uint64 epoch_number = 3;
|
||||
// epoch height of the consensus state
|
||||
uint64 epoch_height = 4;
|
||||
// version number of the consensus state
|
||||
uint64 version_number = 3;
|
||||
// version height of the consensus state
|
||||
uint64 version_height = 4;
|
||||
}
|
||||
|
||||
// QueryChannelClientStateResponse is the Response type for the
|
||||
|
||||
@ -108,17 +108,17 @@ message MsgSubmitMisbehaviour {
|
||||
// that can be compared against another Height for the purposes of updating and
|
||||
// freezing clients
|
||||
//
|
||||
// Normally the EpochHeight is incremented at each height while keeping epoch
|
||||
// Normally the VersionHeight is incremented at each height while keeping version
|
||||
// number the same However some consensus algorithms may choose to reset the
|
||||
// height in certain conditions e.g. hard forks, state-machine breaking changes
|
||||
// In these cases, the epoch number is incremented so that height continues to
|
||||
// be monitonically increasing even as the EpochHeight gets reset
|
||||
// In these cases, the version number is incremented so that height continues to
|
||||
// be monitonically increasing even as the VersionHeight gets reset
|
||||
message Height {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
// the epoch that the client is currently on
|
||||
uint64 epoch_number = 1 [(gogoproto.moretags) = "yaml:\"epoch_number\""];
|
||||
// the height within the given epoch
|
||||
uint64 epoch_height = 2 [(gogoproto.moretags) = "yaml:\"epoch_height\""];
|
||||
// the version that the client is currently on
|
||||
uint64 version_number = 1 [(gogoproto.moretags) = "yaml:\"version_number\""];
|
||||
// the height within the given version
|
||||
uint64 version_height = 2 [(gogoproto.moretags) = "yaml:\"version_height\""];
|
||||
}
|
||||
|
||||
@ -24,8 +24,8 @@ service Query {
|
||||
// ConsensusState queries a consensus state associated with a client state at
|
||||
// a given height.
|
||||
rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/"
|
||||
"height/{epoch_height}";
|
||||
option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/version/{version_number}/"
|
||||
"height/{version_height}";
|
||||
}
|
||||
|
||||
// ConsensusStates queries all the consensus state associated with a given
|
||||
@ -78,10 +78,10 @@ message QueryClientStatesResponse {
|
||||
message QueryConsensusStateRequest {
|
||||
// client identifier
|
||||
string client_id = 1;
|
||||
// consensus state epoch number
|
||||
uint64 epoch_number = 2;
|
||||
// consensus state epoch height
|
||||
uint64 epoch_height = 3;
|
||||
// consensus state version number
|
||||
uint64 version_number = 2;
|
||||
// consensus state version height
|
||||
uint64 version_height = 3;
|
||||
// latest_height overrrides the height field and queries the latest stored
|
||||
// ConsensusState
|
||||
bool latest_height = 4;
|
||||
|
||||
@ -38,7 +38,7 @@ service Query {
|
||||
// connection.
|
||||
rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) {
|
||||
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/"
|
||||
"epoch/{epoch_number}/height/{epoch_height}";
|
||||
"version/{version_number}/height/{version_height}";
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,9 +124,9 @@ message QueryConnectionClientStateResponse {
|
||||
// Query/ConnectionConsensusState RPC method
|
||||
message QueryConnectionConsensusStateRequest {
|
||||
// connection identifier
|
||||
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
uint64 epoch_number = 2;
|
||||
uint64 epoch_height = 3;
|
||||
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
||||
uint64 version_number = 2;
|
||||
uint64 version_height = 3;
|
||||
}
|
||||
|
||||
// QueryConnectionConsensusStateResponse is the response type for the
|
||||
|
||||
@ -85,8 +85,8 @@ to the counterparty channel. Any timeout set to 0 is disabled.`),
|
||||
|
||||
if !timeoutHeight.IsZero() {
|
||||
absoluteHeight := height
|
||||
absoluteHeight.EpochNumber += timeoutHeight.EpochNumber
|
||||
absoluteHeight.EpochHeight += timeoutHeight.EpochHeight
|
||||
absoluteHeight.VersionNumber += timeoutHeight.VersionNumber
|
||||
absoluteHeight.VersionHeight += timeoutHeight.VersionHeight
|
||||
timeoutHeight = absoluteHeight
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ func TestMsgTransferGetSignBytes(t *testing.T) {
|
||||
msg := NewMsgTransfer(validPort, validChannel, coin, addr1, addr2, clienttypes.NewHeight(0, 110), 10)
|
||||
res := msg.GetSignBytes()
|
||||
|
||||
expected := fmt.Sprintf(`{"receiver":"cosmos1w3jhxarpv3j8yvs7f9y7g","sender":"%s","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"110","epoch_number":"0"},"timeout_timestamp":"10","token":{"amount":"100","denom":"atom"}}`, addr1.String())
|
||||
expected := fmt.Sprintf(`{"receiver":"cosmos1w3jhxarpv3j8yvs7f9y7g","sender":"%s","source_channel":"testchannel","source_port":"testportid","timeout_height":{"version_height":"110","version_number":"0"},"timeout_timestamp":"10","token":{"amount":"100","denom":"atom"}}`, addr1.String())
|
||||
require.Equal(t, expected, string(res))
|
||||
}
|
||||
|
||||
|
||||
@ -77,10 +77,10 @@ func QueryConsensusState(
|
||||
|
||||
queryClient := types.NewQueryClient(clientCtx)
|
||||
req := &types.QueryConsensusStateRequest{
|
||||
ClientId: clientID,
|
||||
EpochNumber: height.GetEpochNumber(),
|
||||
EpochHeight: height.GetEpochHeight(),
|
||||
LatestHeight: latestHeight,
|
||||
ClientId: clientID,
|
||||
VersionNumber: height.GetEpochNumber(),
|
||||
VersionHeight: height.GetEpochHeight(),
|
||||
LatestHeight: latestHeight,
|
||||
}
|
||||
|
||||
return queryClient.ConsensusState(context.Background(), req)
|
||||
|
||||
@ -44,9 +44,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) {
|
||||
}
|
||||
|
||||
// client id is always "localhost"
|
||||
epoch := types.ParseChainID(ctx.ChainID())
|
||||
version := types.ParseChainID(ctx.ChainID())
|
||||
clientState := localhosttypes.NewClientState(
|
||||
ctx.ChainID(), types.NewHeight(epoch, uint64(ctx.BlockHeight())),
|
||||
ctx.ChainID(), types.NewHeight(version, uint64(ctx.BlockHeight())),
|
||||
)
|
||||
|
||||
if err := k.CreateClient(ctx, exported.Localhost, clientState, nil); err != nil {
|
||||
|
||||
@ -148,7 +148,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() {
|
||||
}, false},
|
||||
{"valid past update before client was frozen", func() error {
|
||||
clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false)
|
||||
clientState.FrozenHeight = types.NewHeight(0, testClientHeight.EpochHeight-1)
|
||||
clientState.FrozenHeight = types.NewHeight(0, testClientHeight.VersionHeight-1)
|
||||
err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
|
||||
@ -108,11 +108,11 @@ func (q Keeper) ConsensusState(c context.Context, req *types.QueryConsensusState
|
||||
found bool
|
||||
)
|
||||
|
||||
height := types.NewHeight(req.EpochNumber, req.EpochHeight)
|
||||
height := types.NewHeight(req.VersionNumber, req.VersionHeight)
|
||||
if req.LatestHeight {
|
||||
consensusState, found = q.GetLatestClientConsensusState(ctx, req.ClientId)
|
||||
} else {
|
||||
if req.EpochHeight == 0 {
|
||||
if req.VersionHeight == 0 {
|
||||
return nil, status.Error(codes.InvalidArgument, "consensus state height cannot be 0")
|
||||
}
|
||||
|
||||
|
||||
@ -188,10 +188,10 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() {
|
||||
"invalid height",
|
||||
func() {
|
||||
req = &types.QueryConsensusStateRequest{
|
||||
ClientId: testClientID,
|
||||
EpochNumber: 0,
|
||||
EpochHeight: 0,
|
||||
LatestHeight: false,
|
||||
ClientId: testClientID,
|
||||
VersionNumber: 0,
|
||||
VersionHeight: 0,
|
||||
LatestHeight: false,
|
||||
}
|
||||
},
|
||||
false,
|
||||
@ -240,9 +240,9 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() {
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &types.QueryConsensusStateRequest{
|
||||
ClientId: testClientID,
|
||||
EpochNumber: 0,
|
||||
EpochHeight: height,
|
||||
ClientId: testClientID,
|
||||
VersionNumber: 0,
|
||||
VersionHeight: height,
|
||||
}
|
||||
},
|
||||
true,
|
||||
|
||||
@ -157,7 +157,7 @@ func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string)
|
||||
|
||||
// GetClientConsensusStateLTE will get the latest ConsensusState of a particular client at the latest height
|
||||
// less than or equal to the given height
|
||||
// It will only search for heights within the same epoch
|
||||
// It will only search for heights within the same version
|
||||
func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, maxHeight exported.Height) (exported.ConsensusState, bool) {
|
||||
h := maxHeight
|
||||
ok := true
|
||||
@ -173,18 +173,18 @@ func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, max
|
||||
|
||||
// GetSelfConsensusState introspects the (self) past historical info at a given height
|
||||
// and returns the expected consensus state at that height.
|
||||
// For now, can only retrieve self consensus states for the current epoch
|
||||
// For now, can only retrieve self consensus states for the current version
|
||||
func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, bool) {
|
||||
selfHeight, ok := height.(types.Height)
|
||||
if !ok {
|
||||
return nil, false
|
||||
}
|
||||
// check that height epoch matches chainID epoch
|
||||
epoch := types.ParseChainID(ctx.ChainID())
|
||||
if epoch != height.GetEpochNumber() {
|
||||
// check that height version matches chainID version
|
||||
version := types.ParseChainID(ctx.ChainID())
|
||||
if version != height.GetEpochNumber() {
|
||||
return nil, false
|
||||
}
|
||||
histInfo, found := k.stakingKeeper.GetHistoricalInfo(ctx, int64(selfHeight.EpochHeight))
|
||||
histInfo, found := k.stakingKeeper.GetHistoricalInfo(ctx, int64(selfHeight.VersionHeight))
|
||||
if !found {
|
||||
return nil, false
|
||||
}
|
||||
@ -199,7 +199,7 @@ func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (
|
||||
|
||||
// ValidateSelfClient validates the client parameters for a client of the running chain
|
||||
// This function is only used to validate the client state the counterparty stores for this chain
|
||||
// Client must be in same epoch as the executing chain
|
||||
// Client must be in same version as the executing chain
|
||||
func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error {
|
||||
tmClient, ok := clientState.(*ibctmtypes.ClientState)
|
||||
if !ok {
|
||||
@ -216,15 +216,15 @@ func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientS
|
||||
ctx.ChainID(), tmClient.ChainId)
|
||||
}
|
||||
|
||||
epoch := types.ParseChainID(ctx.ChainID())
|
||||
version := types.ParseChainID(ctx.ChainID())
|
||||
|
||||
// client must be in the same epoch as executing chain
|
||||
if tmClient.LatestHeight.EpochNumber != epoch {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidClient, "client is not in the same epoch as the chain. expected epoch: %d, got: %d",
|
||||
tmClient.LatestHeight.EpochNumber, epoch)
|
||||
// client must be in the same version as executing chain
|
||||
if tmClient.LatestHeight.VersionNumber != version {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidClient, "client is not in the same version as the chain. expected version: %d, got: %d",
|
||||
tmClient.LatestHeight.VersionNumber, version)
|
||||
}
|
||||
|
||||
selfHeight := types.NewHeight(epoch, uint64(ctx.BlockHeight()))
|
||||
selfHeight := types.NewHeight(version, uint64(ctx.BlockHeight()))
|
||||
if tmClient.LatestHeight.GT(selfHeight) {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidClient, "client has LatestHeight %d greater than chain height %d",
|
||||
tmClient.LatestHeight, ctx.BlockHeight())
|
||||
|
||||
@ -173,11 +173,11 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() {
|
||||
},
|
||||
{
|
||||
"invalid client height",
|
||||
ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, testClientHeight.EpochHeight+10), commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false),
|
||||
ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, testClientHeight.VersionHeight+10), commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false),
|
||||
false,
|
||||
},
|
||||
{
|
||||
"invalid client epoch",
|
||||
"invalid client version",
|
||||
ibctmtypes.NewClientState(testChainIDEpoch1, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeightEpoch1, commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false),
|
||||
false,
|
||||
},
|
||||
|
||||
@ -449,16 +449,16 @@ var xxx_messageInfo_MsgSubmitMisbehaviour proto.InternalMessageInfo
|
||||
// that can be compared against another Height for the purposes of updating and
|
||||
// freezing clients
|
||||
//
|
||||
// Normally the EpochHeight is incremented at each height while keeping epoch
|
||||
// Normally the VersionHeight is incremented at each height while keeping version
|
||||
// number the same However some consensus algorithms may choose to reset the
|
||||
// height in certain conditions e.g. hard forks, state-machine breaking changes
|
||||
// In these cases, the epoch number is incremented so that height continues to
|
||||
// be monitonically increasing even as the EpochHeight gets reset
|
||||
// In these cases, the version number is incremented so that height continues to
|
||||
// be monitonically increasing even as the VersionHeight gets reset
|
||||
type Height struct {
|
||||
// the epoch that the client is currently on
|
||||
EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty" yaml:"epoch_number"`
|
||||
// the height within the given epoch
|
||||
EpochHeight uint64 `protobuf:"varint,2,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty" yaml:"epoch_height"`
|
||||
// the version that the client is currently on
|
||||
VersionNumber uint64 `protobuf:"varint,1,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty" yaml:"version_number"`
|
||||
// the height within the given version
|
||||
VersionHeight uint64 `protobuf:"varint,2,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty" yaml:"version_height"`
|
||||
}
|
||||
|
||||
func (m *Height) Reset() { *m = Height{} }
|
||||
@ -508,50 +508,50 @@ func init() {
|
||||
func init() { proto.RegisterFile("ibc/client/client.proto", fileDescriptor_226f80e576f20abd) }
|
||||
|
||||
var fileDescriptor_226f80e576f20abd = []byte{
|
||||
// 675 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3d, 0x6f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 0x68, 0x9e, 0xad, 0x1f, 0xc0, 0xfa, 0x28, 0xd3, 0xe2,
|
||||
0x4a, 0x4d, 0x72, 0x99, 0xd7, 0x50, 0xe6, 0x3d, 0x80, 0x15, 0xf5, 0xa8, 0xf6, 0x60, 0x1d, 0x87,
|
||||
0xd4, 0x1d, 0xec, 0x07, 0xf1, 0xc8, 0xc1, 0x91, 0x00, 0x57, 0xce, 0xd2, 0x98, 0x8d, 0x22, 0xab,
|
||||
0x26, 0xcc, 0xa7, 0xc2, 0x9a, 0xd6, 0xaa, 0x67, 0xb9, 0x78, 0x79, 0xad, 0x8c, 0x9e, 0xd5, 0xca,
|
||||
0xb9, 0x12, 0xcc, 0xe7, 0x43, 0xbd, 0xd0, 0x7f, 0x72, 0x74, 0xd2, 0x06, 0xc7, 0x27, 0x6d, 0xf0,
|
||||
0xf3, 0xa4, 0x0d, 0x3e, 0x9c, 0xb6, 0x0b, 0xc7, 0xa7, 0xed, 0xc2, 0x8f, 0xd3, 0x76, 0xe1, 0x55,
|
||||
0xd7, 0x27, 0x7c, 0x10, 0x3b, 0x86, 0x4b, 0x47, 0xa6, 0x4b, 0xd9, 0x88, 0x32, 0xf5, 0xd9, 0x60,
|
||||
0xde, 0x6b, 0xf3, 0xad, 0x99, 0xfe, 0x21, 0x37, 0xbb, 0x1b, 0xea, 0x27, 0xc9, 0xc7, 0x21, 0x66,
|
||||
0x4e, 0x45, 0x10, 0x73, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xba, 0xc4, 0xe6, 0x7d, 0x3f,
|
||||
0x07, 0x00, 0x00,
|
||||
// 679 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3d, 0x6f, 0xd3, 0x40,
|
||||
0x18, 0xce, 0x25, 0x21, 0x6a, 0x2e, 0xe9, 0x87, 0x4c, 0xd2, 0xa6, 0x1d, 0xe2, 0xe8, 0xc4, 0xd0,
|
||||
0x81, 0xda, 0x25, 0x2c, 0x28, 0x12, 0x12, 0xa4, 0x0b, 0x95, 0x28, 0xaa, 0x5c, 0x21, 0x3e, 0x96,
|
||||
0xca, 0x1f, 0x57, 0xe7, 0x44, 0xe2, 0xb3, 0x7c, 0xe7, 0x8a, 0xfc, 0x03, 0x46, 0x24, 0x10, 0x62,
|
||||
0x60, 0xe8, 0xc4, 0x3f, 0x60, 0xe3, 0x07, 0x74, 0xec, 0xc8, 0x64, 0xa1, 0x76, 0x61, 0x62, 0xc8,
|
||||
0x2f, 0x40, 0xbe, 0xbb, 0x92, 0xb8, 0x25, 0xa5, 0xca, 0xd4, 0xc9, 0xf7, 0x7e, 0xdc, 0x73, 0xcf,
|
||||
0xfb, 0x3c, 0xa7, 0x33, 0x5c, 0x21, 0x8e, 0x6b, 0xba, 0x7d, 0x82, 0x03, 0xae, 0x3e, 0x46, 0x18,
|
||||
0x51, 0x4e, 0x35, 0x48, 0x1c, 0xd7, 0x90, 0x99, 0xb5, 0x9a, 0x4f, 0x7d, 0x2a, 0xd2, 0x66, 0xba,
|
||||
0x92, 0x1d, 0x6b, 0xab, 0x3e, 0xa5, 0x7e, 0x1f, 0x9b, 0x22, 0x72, 0xe2, 0x03, 0xd3, 0x0e, 0x86,
|
||||
0xb2, 0x84, 0xbe, 0x00, 0x58, 0xdf, 0xf6, 0x70, 0xc0, 0xc9, 0x01, 0xc1, 0xde, 0x96, 0x40, 0xd9,
|
||||
0xe3, 0x36, 0xc7, 0xda, 0x3d, 0x58, 0x96, 0xa0, 0xfb, 0xc4, 0x6b, 0x80, 0x16, 0x58, 0x2f, 0x77,
|
||||
0x6b, 0xa3, 0x44, 0x5f, 0x1a, 0xda, 0x83, 0x7e, 0x07, 0xfd, 0x2d, 0x21, 0x6b, 0x4e, 0xae, 0xb7,
|
||||
0x3d, 0x6d, 0x17, 0x56, 0x55, 0x9e, 0xa5, 0x10, 0x8d, 0x7c, 0x0b, 0xac, 0x57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x4b, 0xea, 0x51, 0x7d, 0x04, 0x17, 0x0e,
|
||||
0x71, 0xc4, 0x08, 0x0d, 0xf6, 0x83, 0x78, 0xe0, 0xe0, 0x48, 0xd0, 0x2b, 0x8e, 0xdf, 0xc2, 0x0e,
|
||||
0xca, 0xd6, 0x91, 0x35, 0xaf, 0x12, 0xcf, 0x44, 0x3c, 0x89, 0xa0, 0x9e, 0xe7, 0xfc, 0x34, 0x04,
|
||||
0x59, 0x1f, 0x23, 0x48, 0x0e, 0x92, 0xd8, 0xe7, 0x23, 0x3d, 0xd7, 0x7d, 0x7a, 0x7c, 0xda, 0x04,
|
||||
0x27, 0xa7, 0x4d, 0xf0, 0xf3, 0xb4, 0x09, 0xde, 0x9f, 0x35, 0x73, 0x27, 0x67, 0xcd, 0xdc, 0x8f,
|
||||
0xb3, 0x66, 0xee, 0x75, 0xdb, 0x27, 0xbc, 0x17, 0x3b, 0x86, 0x4b, 0x07, 0xa6, 0x4b, 0xd9, 0x80,
|
||||
0x32, 0xf5, 0xd9, 0x60, 0xde, 0x1b, 0xf3, 0xad, 0x99, 0xfe, 0x2d, 0x37, 0xdb, 0x1b, 0xea, 0x87,
|
||||
0xc9, 0x87, 0x21, 0x66, 0x4e, 0x49, 0x88, 0x74, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc,
|
||||
0xaf, 0x5c, 0x74, 0x4b, 0x07, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *IdentifiedClientState) Marshal() (dAtA []byte, err error) {
|
||||
@ -976,13 +976,13 @@ func (m *Height) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.EpochHeight != 0 {
|
||||
i = encodeVarintClient(dAtA, i, uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
i = encodeVarintClient(dAtA, i, uint64(m.VersionHeight))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if m.EpochNumber != 0 {
|
||||
i = encodeVarintClient(dAtA, i, uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
i = encodeVarintClient(dAtA, i, uint64(m.VersionNumber))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
@ -1174,11 +1174,11 @@ func (m *Height) Size() (n int) {
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.EpochNumber != 0 {
|
||||
n += 1 + sovClient(uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
n += 1 + sovClient(uint64(m.VersionNumber))
|
||||
}
|
||||
if m.EpochHeight != 0 {
|
||||
n += 1 + sovClient(uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
n += 1 + sovClient(uint64(m.VersionHeight))
|
||||
}
|
||||
return n
|
||||
}
|
||||
@ -2449,9 +2449,9 @@ func (m *Height) Unmarshal(dAtA []byte) error {
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType)
|
||||
}
|
||||
m.EpochNumber = 0
|
||||
m.VersionNumber = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowClient
|
||||
@ -2461,16 +2461,16 @@ func (m *Height) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochNumber |= uint64(b&0x7F) << shift
|
||||
m.VersionNumber |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType)
|
||||
}
|
||||
m.EpochHeight = 0
|
||||
m.VersionHeight = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowClient
|
||||
@ -2480,7 +2480,7 @@ func (m *Height) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochHeight |= uint64(b&0x7F) << shift
|
||||
m.VersionHeight |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
|
||||
@ -24,21 +24,21 @@ func ZeroHeight() Height {
|
||||
}
|
||||
|
||||
// NewHeight is a constructor for the IBC height type
|
||||
func NewHeight(epochNumber, epochHeight uint64) Height {
|
||||
func NewHeight(versionNumber, versionHeight uint64) Height {
|
||||
return Height{
|
||||
EpochNumber: epochNumber,
|
||||
EpochHeight: epochHeight,
|
||||
VersionNumber: versionNumber,
|
||||
VersionHeight: versionHeight,
|
||||
}
|
||||
}
|
||||
|
||||
// GetEpochNumber returns the epoch-number of the height
|
||||
// GetEpochNumber returns the version-number of the height
|
||||
func (h Height) GetEpochNumber() uint64 {
|
||||
return h.EpochNumber
|
||||
return h.VersionNumber
|
||||
}
|
||||
|
||||
// GetEpochHeight returns the epoch-height of the height
|
||||
// GetEpochHeight returns the version-height of the height
|
||||
func (h Height) GetEpochHeight() uint64 {
|
||||
return h.EpochHeight
|
||||
return h.VersionHeight
|
||||
}
|
||||
|
||||
// Compare implements a method to compare two heights. When comparing two heights a, b
|
||||
@ -47,18 +47,18 @@ func (h Height) GetEpochHeight() uint64 {
|
||||
// 0 if a = b
|
||||
// 1 if a > b
|
||||
//
|
||||
// It first compares based on epoch numbers, whichever has the higher epoch number is the higher height
|
||||
// If epoch number is the same, then the epoch height is compared
|
||||
// It first compares based on version numbers, whichever has the higher version number is the higher height
|
||||
// If version number is the same, then the version height is compared
|
||||
func (h Height) Compare(other exported.Height) int64 {
|
||||
height, ok := other.(Height)
|
||||
if !ok {
|
||||
panic(fmt.Sprintf("cannot compare against invalid height type: %T. expected height type: %T", other, h))
|
||||
}
|
||||
var cmp int64
|
||||
if h.EpochNumber != height.EpochNumber {
|
||||
cmp = int64(h.EpochNumber) - int64(height.EpochNumber)
|
||||
if h.VersionNumber != height.VersionNumber {
|
||||
cmp = int64(h.VersionNumber) - int64(height.VersionNumber)
|
||||
} else {
|
||||
cmp = int64(h.EpochHeight) - int64(height.EpochHeight)
|
||||
cmp = int64(h.VersionHeight) - int64(height.VersionHeight)
|
||||
}
|
||||
if cmp < 0 {
|
||||
return -1
|
||||
@ -97,27 +97,27 @@ func (h Height) EQ(other exported.Height) bool {
|
||||
|
||||
// String returns a string representation of Height
|
||||
func (h Height) String() string {
|
||||
return fmt.Sprintf("%d-%d", h.EpochNumber, h.EpochHeight)
|
||||
return fmt.Sprintf("%d-%d", h.VersionNumber, h.VersionHeight)
|
||||
}
|
||||
|
||||
// Decrement will return a new height with the EpochHeight decremented
|
||||
// If the EpochHeight is already at lowest value (1), then false success flag is returend
|
||||
// Decrement will return a new height with the VersionHeight decremented
|
||||
// If the VersionHeight is already at lowest value (1), then false success flag is returend
|
||||
func (h Height) Decrement() (decremented exported.Height, success bool) {
|
||||
if h.EpochHeight == 0 {
|
||||
if h.VersionHeight == 0 {
|
||||
return Height{}, false
|
||||
}
|
||||
return NewHeight(h.EpochNumber, h.EpochHeight-1), true
|
||||
return NewHeight(h.VersionNumber, h.VersionHeight-1), true
|
||||
}
|
||||
|
||||
// Increment will return a height with the same epoch number but an
|
||||
// incremented epoch height
|
||||
// Increment will return a height with the same version number but an
|
||||
// incremented version height
|
||||
func (h Height) Increment() Height {
|
||||
return NewHeight(h.EpochNumber, h.EpochHeight+1)
|
||||
return NewHeight(h.VersionNumber, h.VersionHeight+1)
|
||||
}
|
||||
|
||||
// IsZero returns true if height epoch and epoch-height are both 0
|
||||
// IsZero returns true if height version and version-height are both 0
|
||||
func (h Height) IsZero() bool {
|
||||
return h.EpochNumber == 0 && h.EpochHeight == 0
|
||||
return h.VersionNumber == 0 && h.VersionHeight == 0
|
||||
}
|
||||
|
||||
// MustParseHeight will attempt to parse a string representation of a height and panic if
|
||||
@ -136,55 +136,55 @@ func MustParseHeight(heightStr string) Height {
|
||||
func ParseHeight(heightStr string) (Height, error) {
|
||||
splitStr := strings.Split(heightStr, "-")
|
||||
if len(splitStr) != 2 {
|
||||
return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {epoch}-{height}. Got: %s", heightStr)
|
||||
return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {version}-{height}. Got: %s", heightStr)
|
||||
}
|
||||
epochNumber, err := strconv.ParseUint(splitStr[0], 10, 64)
|
||||
versionNumber, err := strconv.ParseUint(splitStr[0], 10, 64)
|
||||
if err != nil {
|
||||
return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid epoch number. parse err: %s", err)
|
||||
return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version number. parse err: %s", err)
|
||||
}
|
||||
epochHeight, err := strconv.ParseUint(splitStr[1], 10, 64)
|
||||
versionHeight, err := strconv.ParseUint(splitStr[1], 10, 64)
|
||||
if err != nil {
|
||||
return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid epoch height. parse err: %s", err)
|
||||
return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version height. parse err: %s", err)
|
||||
}
|
||||
return NewHeight(epochNumber, epochHeight), nil
|
||||
return NewHeight(versionNumber, versionHeight), nil
|
||||
}
|
||||
|
||||
// SetEpochNumber takes a chainID in valid epoch format and swaps the epoch number
|
||||
// in the chainID with the given epoch number.
|
||||
func SetEpochNumber(chainID string, epoch uint64) (string, error) {
|
||||
// SetEpochNumber takes a chainID in valid version format and swaps the version number
|
||||
// in the chainID with the given version number.
|
||||
func SetEpochNumber(chainID string, version uint64) (string, error) {
|
||||
if !IsEpochFormat(chainID) {
|
||||
return "", sdkerrors.Wrapf(
|
||||
sdkerrors.ErrInvalidChainID, "chainID is not in epoch format: %s", chainID,
|
||||
sdkerrors.ErrInvalidChainID, "chainID is not in version format: %s", chainID,
|
||||
)
|
||||
}
|
||||
|
||||
splitStr := strings.Split(chainID, "-")
|
||||
// swap out epoch number with given epoch
|
||||
splitStr[len(splitStr)-1] = strconv.Itoa(int(epoch))
|
||||
// swap out version number with given version
|
||||
splitStr[len(splitStr)-1] = strconv.Itoa(int(version))
|
||||
return strings.Join(splitStr, "-"), nil
|
||||
}
|
||||
|
||||
// ParseChainID is a utility function that returns an epoch number from the given ChainID.
|
||||
// ParseChainID is a utility function that returns an version number from the given ChainID.
|
||||
// ParseChainID attempts to parse a chain id in the format: `{chainID}-{version}`
|
||||
// and return the epochnumber as a uint64.
|
||||
// If the chainID is not in the expected format, a default epoch value of 0 is returned.
|
||||
// If the chainID is not in the expected format, a default version value of 0 is returned.
|
||||
func ParseChainID(chainID string) uint64 {
|
||||
if !IsEpochFormat(chainID) {
|
||||
// chainID is not in epoch format, return 0 as default
|
||||
// chainID is not in version format, return 0 as default
|
||||
return 0
|
||||
}
|
||||
splitStr := strings.Split(chainID, "-")
|
||||
epoch, err := strconv.ParseUint(splitStr[len(splitStr)-1], 10, 64)
|
||||
version, err := strconv.ParseUint(splitStr[len(splitStr)-1], 10, 64)
|
||||
// sanity check: error should always be nil since regex only allows numbers in last element
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("regex allowed non-number value as last split element for chainID: %s", chainID))
|
||||
}
|
||||
return epoch
|
||||
return version
|
||||
}
|
||||
|
||||
// GetSelfHeight is a utility function that returns self height given context
|
||||
// Epoch number is retrieved from ctx.ChainID()
|
||||
func GetSelfHeight(ctx sdk.Context) Height {
|
||||
epoch := ParseChainID(ctx.ChainID())
|
||||
return NewHeight(epoch, uint64(ctx.BlockHeight()))
|
||||
version := ParseChainID(ctx.ChainID())
|
||||
return NewHeight(version, uint64(ctx.BlockHeight()))
|
||||
}
|
||||
|
||||
@ -19,10 +19,10 @@ func TestCompareHeights(t *testing.T) {
|
||||
height2 types.Height
|
||||
compareSign int64
|
||||
}{
|
||||
{"epoch number 1 is lesser", types.NewHeight(1, 3), types.NewHeight(3, 4), -1},
|
||||
{"epoch number 1 is greater", types.NewHeight(7, 5), types.NewHeight(4, 5), 1},
|
||||
{"epoch height 1 is lesser", types.NewHeight(3, 4), types.NewHeight(3, 9), -1},
|
||||
{"epoch height 1 is greater", types.NewHeight(3, 8), types.NewHeight(3, 3), 1},
|
||||
{"version number 1 is lesser", types.NewHeight(1, 3), types.NewHeight(3, 4), -1},
|
||||
{"version number 1 is greater", types.NewHeight(7, 5), types.NewHeight(4, 5), 1},
|
||||
{"version height 1 is lesser", types.NewHeight(3, 4), types.NewHeight(3, 9), -1},
|
||||
{"version height 1 is greater", types.NewHeight(3, 8), types.NewHeight(3, 3), 1},
|
||||
{"height is equal", types.NewHeight(4, 4), types.NewHeight(4, 4), 0},
|
||||
}
|
||||
|
||||
@ -63,11 +63,11 @@ func TestString(t *testing.T) {
|
||||
_, err := types.ParseHeight("height")
|
||||
require.Error(t, err, "invalid height string passed")
|
||||
|
||||
_, err = types.ParseHeight("epoch-10")
|
||||
require.Error(t, err, "invalid epoch string passed")
|
||||
_, err = types.ParseHeight("version-10")
|
||||
require.Error(t, err, "invalid version string passed")
|
||||
|
||||
_, err = types.ParseHeight("3-height")
|
||||
require.Error(t, err, "invalid epoch-height string passed")
|
||||
require.Error(t, err, "invalid version-height string passed")
|
||||
|
||||
height := types.NewHeight(3, 4)
|
||||
recovered, err := types.ParseHeight(height.String())
|
||||
@ -97,7 +97,7 @@ func (suite *TypesTestSuite) TestMustParseHeight() {
|
||||
func TestParseChainID(t *testing.T) {
|
||||
cases := []struct {
|
||||
chainID string
|
||||
epoch uint64
|
||||
version uint64
|
||||
formatted bool
|
||||
}{
|
||||
{"gaiamainnet-3", 3, true},
|
||||
@ -113,8 +113,8 @@ func TestParseChainID(t *testing.T) {
|
||||
for i, tc := range cases {
|
||||
require.Equal(t, tc.formatted, types.IsEpochFormat(tc.chainID), "case %d does not match expected format", i)
|
||||
|
||||
epoch := types.ParseChainID(tc.chainID)
|
||||
require.Equal(t, tc.epoch, epoch, "case %d returns incorrect epoch", i)
|
||||
version := types.ParseChainID(tc.chainID)
|
||||
require.Equal(t, tc.version, version, "case %d returns incorrect version", i)
|
||||
}
|
||||
|
||||
}
|
||||
@ -122,25 +122,25 @@ func TestParseChainID(t *testing.T) {
|
||||
func TestSetEpochNumber(t *testing.T) {
|
||||
// Test SetEpochNumber
|
||||
chainID, err := types.SetEpochNumber("gaiamainnet", 3)
|
||||
require.Error(t, err, "invalid epoch format passed SetEpochNumber")
|
||||
require.Equal(t, "", chainID, "invalid epoch format returned non-empty string on SetEpochNumber")
|
||||
require.Error(t, err, "invalid version format passed SetEpochNumber")
|
||||
require.Equal(t, "", chainID, "invalid version format returned non-empty string on SetEpochNumber")
|
||||
chainID = "gaiamainnet-3"
|
||||
|
||||
chainID, err = types.SetEpochNumber(chainID, 4)
|
||||
require.NoError(t, err, "valid epoch format failed SetEpochNumber")
|
||||
require.Equal(t, "gaiamainnet-4", chainID, "valid epoch format returned incorrect string on SetEpochNumber")
|
||||
require.NoError(t, err, "valid version format failed SetEpochNumber")
|
||||
require.Equal(t, "gaiamainnet-4", chainID, "valid version format returned incorrect string on SetEpochNumber")
|
||||
}
|
||||
|
||||
func (suite *TypesTestSuite) TestSelfHeight() {
|
||||
ctx := suite.chainA.GetContext()
|
||||
|
||||
// Test default epoch
|
||||
// Test default version
|
||||
ctx = ctx.WithChainID("gaiamainnet")
|
||||
ctx = ctx.WithBlockHeight(10)
|
||||
height := types.GetSelfHeight(ctx)
|
||||
suite.Require().Equal(types.NewHeight(0, 10), height, "default self height failed")
|
||||
|
||||
// Test successful epoch format
|
||||
// Test successful version format
|
||||
ctx = ctx.WithChainID("gaiamainnet-3")
|
||||
ctx = ctx.WithBlockHeight(18)
|
||||
height = types.GetSelfHeight(ctx)
|
||||
|
||||
@ -262,10 +262,10 @@ func (m *QueryClientStatesResponse) GetPagination() *query.PageResponse {
|
||||
type QueryConsensusStateRequest struct {
|
||||
// client identifier
|
||||
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
// consensus state epoch number
|
||||
EpochNumber uint64 `protobuf:"varint,2,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"`
|
||||
// consensus state epoch height
|
||||
EpochHeight uint64 `protobuf:"varint,3,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty"`
|
||||
// consensus state version number
|
||||
VersionNumber uint64 `protobuf:"varint,2,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty"`
|
||||
// consensus state version height
|
||||
VersionHeight uint64 `protobuf:"varint,3,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty"`
|
||||
// latest_height overrrides the height field and queries the latest stored
|
||||
// ConsensusState
|
||||
LatestHeight bool `protobuf:"varint,4,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty"`
|
||||
@ -311,16 +311,16 @@ func (m *QueryConsensusStateRequest) GetClientId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *QueryConsensusStateRequest) GetEpochNumber() uint64 {
|
||||
func (m *QueryConsensusStateRequest) GetVersionNumber() uint64 {
|
||||
if m != nil {
|
||||
return m.EpochNumber
|
||||
return m.VersionNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *QueryConsensusStateRequest) GetEpochHeight() uint64 {
|
||||
func (m *QueryConsensusStateRequest) GetVersionHeight() uint64 {
|
||||
if m != nil {
|
||||
return m.EpochHeight
|
||||
return m.VersionHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -532,54 +532,54 @@ func init() {
|
||||
func init() { proto.RegisterFile("ibc/client/query.proto", fileDescriptor_320a7d3a97b17345) }
|
||||
|
||||
var fileDescriptor_320a7d3a97b17345 = []byte{
|
||||
// 748 bytes of a gzipped FileDescriptorProto
|
||||
0x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 0x72,
|
||||
0xe2, 0x10, 0x3b, 0x51, 0x44, 0xb9, 0xb8, 0x90, 0x29, 0xef, 0xa0, 0x4f, 0x7d, 0x2a, 0x3e, 0x71,
|
||||
0xeb, 0x4b, 0x5a, 0x2b, 0x57, 0xe0, 0xd0, 0xfd, 0x16, 0x92, 0x5b, 0xa2, 0xc6, 0x03, 0xee, 0x70,
|
||||
0x62, 0x93, 0xf5, 0x26, 0x61, 0x1c, 0x8d, 0xc0, 0x5e, 0x59, 0x79, 0x39, 0xac, 0x97, 0xc0, 0x18,
|
||||
0xa8, 0xf6, 0xda, 0x3d, 0xd2, 0xb0, 0x58, 0xaf, 0x7c, 0x02, 0xb0, 0x74, 0x34, 0x91, 0xc5, 0x34,
|
||||
0x62, 0x04, 0x5d, 0x85, 0x86, 0xca, 0x64, 0x2d, 0xbb, 0x48, 0x2e, 0xd6, 0x06, 0x2d, 0x89, 0xcf,
|
||||
0x4a, 0xa0, 0x5b, 0x37, 0xa3, 0x0d, 0xbb, 0xe8, 0xb5, 0x2f, 0x40, 0x83, 0xb0, 0x3b, 0x6e, 0x50,
|
||||
0xba, 0x52, 0xea, 0x18, 0x03, 0x55, 0xc3, 0x96, 0x07, 0x74, 0x16, 0x42, 0xf1, 0xb1, 0x1c, 0x3b,
|
||||
0x3c, 0x28, 0x75, 0x0a, 0x24, 0xbd, 0xc2, 0xb2, 0xe4, 0xf0, 0x00, 0x5d, 0x87, 0x86, 0x74, 0x07,
|
||||
0x24, 0xf4, 0x03, 0x5e, 0xea, 0x12, 0xd5, 0x90, 0xd5, 0x66, 0xde, 0xba, 0x23, 0x3c, 0xf3, 0x5d,
|
||||
0x3b, 0xdf, 0xcf, 0x15, 0xec, 0xa2, 0x88, 0x96, 0xa6, 0x8a, 0x7b, 0xb4, 0x0d, 0x96, 0x10, 0xb0,
|
||||
0x00, 0x61, 0x5b, 0x17, 0xd5, 0xc4, 0x94, 0x25, 0x45, 0xb4, 0x5a, 0x22, 0x5a, 0x52, 0x69, 0x25,
|
||||
0xa2, 0xb5, 0xe4, 0xf8, 0x09, 0x79, 0xb6, 0x96, 0x59, 0xf9, 0x00, 0xe0, 0x70, 0x46, 0x11, 0x45,
|
||||
0xd6, 0x02, 0xec, 0xd3, 0xc9, 0x62, 0x25, 0x30, 0xd6, 0x59, 0x2d, 0xd6, 0xc6, 0x75, 0xfc, 0x8b,
|
||||
0x75, 0x12, 0xf1, 0x70, 0x25, 0x24, 0x75, 0x9d, 0x6e, 0x43, 0xa3, 0x8e, 0xa1, 0xdb, 0x29, 0xb4,
|
||||
0x1d, 0x02, 0xed, 0x74, 0x2e, 0x5a, 0x09, 0x22, 0x05, 0xf7, 0x3d, 0x80, 0xa6, 0x84, 0xdb, 0x72,
|
||||
0x45, 0xac, 0xc9, 0x4e, 0x3c, 0x16, 0x68, 0x1c, 0x1a, 0x24, 0xa6, 0x5e, 0xb0, 0x1c, 0x35, 0xd7,
|
||||
0x5c, 0xd2, 0x10, 0x30, 0xba, 0xec, 0xa2, 0xb0, 0xdd, 0x13, 0xa6, 0x76, 0x88, 0x92, 0xab, 0x53,
|
||||
0x0b, 0x91, 0xa2, 0xa0, 0x09, 0xd8, 0xb7, 0xda, 0xea, 0x89, 0xeb, 0x92, 0xf6, 0xd8, 0x86, 0x34,
|
||||
0x2a, 0xe5, 0xbe, 0x00, 0x38, 0x92, 0x09, 0x53, 0xf1, 0x7a, 0x03, 0x0e, 0x78, 0x89, 0xe7, 0x04,
|
||||
0x73, 0xd8, 0xef, 0xa5, 0xae, 0xf9, 0x0f, 0xa3, 0xb8, 0x9d, 0xdd, 0x10, 0x3b, 0x11, 0xf1, 0x0b,
|
||||
0x19, 0xea, 0xff, 0xcd, 0xac, 0x7e, 0x04, 0x70, 0x34, 0x1b, 0x84, 0xa2, 0xf5, 0x21, 0x3c, 0x7d,
|
||||
0x88, 0xd6, 0x64, 0x62, 0x27, 0xf5, 0x36, 0xd3, 0xe9, 0x8f, 0x42, 0x1e, 0xa4, 0x1a, 0x1f,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, 0x43, 0x1e, 0x34,
|
||||
0x5d, 0xcb, 0xa3, 0x6b, 0x58, 0xfd, 0x31, 0x90, 0x3f, 0x33, 0xac, 0xfe, 0x0c, 0xbf, 0x10, 0x95,
|
||||
0x66, 0x6b, 0x33, 0xaa, 0x18, 0xdf, 0x88, 0x09, 0x73, 0x4f, 0x89, 0x95, 0x75, 0xe9, 0x57, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff, 0xeb, 0xcf, 0x28, 0xb5, 0x6e, 0x08, 0x00, 0x00,
|
||||
// 747 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4d, 0x4f, 0x13, 0x4f,
|
||||
0x18, 0xef, 0xf0, 0xf2, 0x0f, 0x4c, 0x0b, 0xfc, 0x33, 0x21, 0x52, 0x16, 0xac, 0x50, 0xde, 0xaa,
|
||||
0x09, 0x3b, 0x50, 0xe3, 0x4b, 0x62, 0x3c, 0x88, 0x09, 0x4a, 0x62, 0x0c, 0xae, 0x31, 0x26, 0x5e,
|
||||
0xc8, 0xee, 0x76, 0xd8, 0x4e, 0x84, 0x9d, 0xa5, 0x33, 0x25, 0x12, 0xc2, 0x85, 0x83, 0x57, 0x8d,
|
||||
0xde, 0xfd, 0x04, 0x7e, 0x06, 0x6f, 0x26, 0x1c, 0x8c, 0x21, 0xf1, 0xe2, 0xc9, 0x18, 0xf0, 0x83,
|
||||
0x98, 0xce, 0xcc, 0xd2, 0xd9, 0xb2, 0xb2, 0x68, 0x4c, 0x3c, 0x75, 0xe7, 0x79, 0x99, 0xe7, 0xf7,
|
||||
0xfc, 0x7e, 0xcf, 0x3c, 0x29, 0xbc, 0x40, 0x3d, 0x1f, 0xfb, 0x1b, 0x94, 0x84, 0x02, 0x6f, 0x35,
|
||||
0x49, 0x63, 0xc7, 0x8e, 0x1a, 0x4c, 0x30, 0x04, 0xa9, 0xe7, 0xdb, 0xca, 0x6e, 0x5d, 0xf1, 0x19,
|
||||
0xdf, 0x64, 0x1c, 0x7b, 0x2e, 0x27, 0x2a, 0x08, 0x6f, 0x2f, 0x7a, 0x44, 0xb8, 0x8b, 0x38, 0x72,
|
||||
0x03, 0x1a, 0xba, 0x82, 0xb2, 0x50, 0xe5, 0x59, 0x23, 0xc6, 0x7d, 0xea, 0x47, 0x3b, 0x46, 0x03,
|
||||
0xc6, 0x82, 0x0d, 0x82, 0xe5, 0xc9, 0x6b, 0xae, 0x63, 0x37, 0xd4, 0xb5, 0xac, 0x71, 0xed, 0x72,
|
||||
0x23, 0x8a, 0xdd, 0x30, 0x64, 0x42, 0x5e, 0xc8, 0xb5, 0x77, 0x38, 0x60, 0x01, 0x93, 0x9f, 0xb8,
|
||||
0xf5, 0xa5, 0xac, 0xe5, 0xeb, 0x70, 0xe4, 0x51, 0x0b, 0xc9, 0x5d, 0x59, 0xe3, 0xb1, 0x70, 0x05,
|
||||
0x71, 0xc8, 0x56, 0x93, 0x70, 0x81, 0xc6, 0x60, 0xbf, 0xaa, 0xbc, 0x46, 0x6b, 0x45, 0x30, 0x01,
|
||||
0x2a, 0xfd, 0x4e, 0x9f, 0x32, 0xac, 0xd4, 0xca, 0x1f, 0x01, 0x2c, 0x9e, 0x4e, 0xe4, 0x11, 0x0b,
|
||||
0x39, 0x41, 0x37, 0x60, 0x41, 0x67, 0xf2, 0x96, 0x5d, 0x26, 0xe7, 0xab, 0xc3, 0xb6, 0xc2, 0x67,
|
||||
0xc7, 0xd0, 0xed, 0x3b, 0xe1, 0x8e, 0x93, 0xf7, 0xdb, 0x17, 0xa0, 0x61, 0xd8, 0x1b, 0x35, 0x18,
|
||||
0x5b, 0x2f, 0x76, 0x4d, 0x80, 0x4a, 0xc1, 0x51, 0x07, 0x74, 0x11, 0x42, 0xf9, 0xb1, 0x16, 0xb9,
|
||||
0xa2, 0x5e, 0xec, 0x96, 0x48, 0xfa, 0xa5, 0x65, 0xd5, 0x15, 0x75, 0x74, 0x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a, 0xef, 0xa1, 0x77, 0x00, 0x0e, 0x75, 0xcc, 0x2b,
|
||||
0xca, 0xc2, 0x79, 0xc2, 0x6e, 0x25, 0x3b, 0x50, 0x77, 0x74, 0x53, 0x76, 0x54, 0x45, 0x0b, 0xbf,
|
||||
0xdb, 0xd1, 0xd2, 0x83, 0x83, 0xa3, 0x12, 0x38, 0x3c, 0x2a, 0x81, 0xef, 0x47, 0x25, 0xf0, 0xfa,
|
||||
0xb8, 0x94, 0x3b, 0x3c, 0x2e, 0xe5, 0xbe, 0x1e, 0x97, 0x72, 0xcf, 0xaa, 0x01, 0x15, 0xf5, 0xa6,
|
||||
0x67, 0xfb, 0x6c, 0x13, 0xeb, 0xbf, 0x09, 0xea, 0x67, 0x9e, 0xd7, 0x9e, 0xe3, 0x17, 0xb2, 0xd2,
|
||||
0x42, 0x75, 0x5e, 0x17, 0x13, 0x3b, 0x11, 0xe1, 0xde, 0x7f, 0x72, 0x71, 0x5d, 0xfd, 0x19, 0x00,
|
||||
0x00, 0xff, 0xff, 0x96, 0x0d, 0x83, 0x67, 0x7c, 0x08, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -985,13 +985,13 @@ func (m *QueryConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, err
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if m.EpochHeight != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.VersionHeight))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.EpochNumber != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.VersionNumber))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
@ -1244,11 +1244,11 @@ func (m *QueryConsensusStateRequest) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.EpochNumber != 0 {
|
||||
n += 1 + sovQuery(uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
n += 1 + sovQuery(uint64(m.VersionNumber))
|
||||
}
|
||||
if m.EpochHeight != 0 {
|
||||
n += 1 + sovQuery(uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
n += 1 + sovQuery(uint64(m.VersionHeight))
|
||||
}
|
||||
if m.LatestHeight {
|
||||
n += 2
|
||||
@ -1869,9 +1869,9 @@ func (m *QueryConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType)
|
||||
}
|
||||
m.EpochNumber = 0
|
||||
m.VersionNumber = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
@ -1881,16 +1881,16 @@ func (m *QueryConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochNumber |= uint64(b&0x7F) << shift
|
||||
m.VersionNumber |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType)
|
||||
}
|
||||
m.EpochHeight = 0
|
||||
m.VersionHeight = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
@ -1900,7 +1900,7 @@ func (m *QueryConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochHeight |= uint64(b&0x7F) << shift
|
||||
m.VersionHeight |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ func local_request_Query_ClientStates_0(ctx context.Context, marshaler runtime.M
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_ConsensusState_0 = &utilities.DoubleArray{Encoding: map[string]int{"client_id": 0, "epoch_number": 1, "epoch_height": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}}
|
||||
filter_Query_ConsensusState_0 = &utilities.DoubleArray{Encoding: map[string]int{"client_id": 0, "version_number": 1, "version_height": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}}
|
||||
)
|
||||
|
||||
func request_Query_ConsensusState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
@ -147,26 +147,26 @@ func request_Query_ConsensusState_0(ctx context.Context, marshaler runtime.Marsh
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client_id", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_number"]
|
||||
val, ok = pathParams["version_number"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number")
|
||||
}
|
||||
|
||||
protoReq.EpochNumber, err = runtime.Uint64(val)
|
||||
protoReq.VersionNumber, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_height"]
|
||||
val, ok = pathParams["version_height"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height")
|
||||
}
|
||||
|
||||
protoReq.EpochHeight, err = runtime.Uint64(val)
|
||||
protoReq.VersionHeight, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
@ -203,26 +203,26 @@ func local_request_Query_ConsensusState_0(ctx context.Context, marshaler runtime
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client_id", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_number"]
|
||||
val, ok = pathParams["version_number"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number")
|
||||
}
|
||||
|
||||
protoReq.EpochNumber, err = runtime.Uint64(val)
|
||||
protoReq.VersionNumber, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_height"]
|
||||
val, ok = pathParams["version_height"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height")
|
||||
}
|
||||
|
||||
protoReq.EpochHeight, err = runtime.Uint64(val)
|
||||
protoReq.VersionHeight, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
@ -524,7 +524,7 @@ var (
|
||||
|
||||
pattern_Query_ClientStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ibc", "client", "v1beta1", "client_states"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_Query_ConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id", "epoch", "epoch_number", "height", "epoch_height"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_ConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_Query_ConsensusStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
@ -79,7 +79,7 @@ func GetCmdQueryConnection() *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
clientCtx = clientCtx.WithHeight(int64(connRes.ProofHeight.EpochHeight))
|
||||
clientCtx = clientCtx.WithHeight(int64(connRes.ProofHeight.VersionHeight))
|
||||
return clientCtx.PrintOutput(connRes)
|
||||
},
|
||||
}
|
||||
@ -113,7 +113,7 @@ func GetCmdQueryClientConnections() *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
clientCtx = clientCtx.WithHeight(int64(connPathsRes.ProofHeight.EpochHeight))
|
||||
clientCtx = clientCtx.WithHeight(int64(connPathsRes.ProofHeight.VersionHeight))
|
||||
return clientCtx.PrintOutput(connPathsRes)
|
||||
},
|
||||
}
|
||||
|
||||
@ -143,9 +143,9 @@ func QueryConnectionConsensusState(
|
||||
|
||||
queryClient := types.NewQueryClient(clientCtx)
|
||||
req := &types.QueryConnectionConsensusStateRequest{
|
||||
ConnectionId: connectionID,
|
||||
EpochNumber: height.EpochNumber,
|
||||
EpochHeight: height.EpochHeight,
|
||||
ConnectionId: connectionID,
|
||||
VersionNumber: height.VersionNumber,
|
||||
VersionHeight: height.VersionHeight,
|
||||
}
|
||||
|
||||
res, err := queryClient.ConnectionConsensusState(context.Background(), req)
|
||||
|
||||
@ -160,7 +160,7 @@ func (q Keeper) ConnectionConsensusState(c context.Context, req *types.QueryConn
|
||||
)
|
||||
}
|
||||
|
||||
height := clienttypes.NewHeight(req.EpochNumber, req.EpochHeight)
|
||||
height := clienttypes.NewHeight(req.VersionNumber, req.VersionHeight)
|
||||
consensusState, found := q.clientKeeper.GetClientConsensusState(ctx, connection.ClientId, height)
|
||||
if !found {
|
||||
return nil, status.Error(
|
||||
|
||||
@ -338,9 +338,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() {
|
||||
"invalid connection ID",
|
||||
func() {
|
||||
req = &types.QueryConnectionConsensusStateRequest{
|
||||
ConnectionId: "",
|
||||
EpochNumber: 0,
|
||||
EpochHeight: 1,
|
||||
ConnectionId: "",
|
||||
VersionNumber: 0,
|
||||
VersionHeight: 1,
|
||||
}
|
||||
},
|
||||
false,
|
||||
@ -349,9 +349,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() {
|
||||
"connection not found",
|
||||
func() {
|
||||
req = &types.QueryConnectionConsensusStateRequest{
|
||||
ConnectionId: "test-connection-id",
|
||||
EpochNumber: 0,
|
||||
EpochHeight: 1,
|
||||
ConnectionId: "test-connection-id",
|
||||
VersionNumber: 0,
|
||||
VersionHeight: 1,
|
||||
}
|
||||
},
|
||||
false,
|
||||
@ -362,9 +362,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() {
|
||||
_, _, connA, _, _, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED)
|
||||
|
||||
req = &types.QueryConnectionConsensusStateRequest{
|
||||
ConnectionId: connA.ID,
|
||||
EpochNumber: 0,
|
||||
EpochHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height
|
||||
ConnectionId: connA.ID,
|
||||
VersionNumber: 0,
|
||||
VersionHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height
|
||||
}
|
||||
}, false,
|
||||
},
|
||||
@ -379,9 +379,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() {
|
||||
expClientID = clientA
|
||||
|
||||
req = &types.QueryConnectionConsensusStateRequest{
|
||||
ConnectionId: connA.ID,
|
||||
EpochNumber: clientState.GetLatestHeight().GetEpochNumber(),
|
||||
EpochHeight: clientState.GetLatestHeight().GetEpochHeight(),
|
||||
ConnectionId: connA.ID,
|
||||
VersionNumber: clientState.GetLatestHeight().GetEpochNumber(),
|
||||
VersionHeight: clientState.GetLatestHeight().GetEpochHeight(),
|
||||
}
|
||||
},
|
||||
true,
|
||||
|
||||
@ -511,9 +511,9 @@ func (m *QueryConnectionClientStateResponse) GetProofHeight() types.Height {
|
||||
// Query/ConnectionConsensusState RPC method
|
||||
type QueryConnectionConsensusStateRequest struct {
|
||||
// connection identifier
|
||||
ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
|
||||
EpochNumber uint64 `protobuf:"varint,2,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"`
|
||||
EpochHeight uint64 `protobuf:"varint,3,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty"`
|
||||
ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
|
||||
VersionNumber uint64 `protobuf:"varint,2,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty"`
|
||||
VersionHeight uint64 `protobuf:"varint,3,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryConnectionConsensusStateRequest) Reset() { *m = QueryConnectionConsensusStateRequest{} }
|
||||
@ -556,16 +556,16 @@ func (m *QueryConnectionConsensusStateRequest) GetConnectionId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *QueryConnectionConsensusStateRequest) GetEpochNumber() uint64 {
|
||||
func (m *QueryConnectionConsensusStateRequest) GetVersionNumber() uint64 {
|
||||
if m != nil {
|
||||
return m.EpochNumber
|
||||
return m.VersionNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *QueryConnectionConsensusStateRequest) GetEpochHeight() uint64 {
|
||||
func (m *QueryConnectionConsensusStateRequest) GetVersionHeight() uint64 {
|
||||
if m != nil {
|
||||
return m.EpochHeight
|
||||
return m.VersionHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -669,63 +669,63 @@ func init() {
|
||||
func init() { proto.RegisterFile("ibc/connection/query.proto", fileDescriptor_5ee60d8b08ce3606) }
|
||||
|
||||
var fileDescriptor_5ee60d8b08ce3606 = []byte{
|
||||
// 891 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0xe3, 0x44,
|
||||
0x14, 0xce, 0x24, 0xe9, 0x42, 0x5e, 0xc2, 0x02, 0xa3, 0x2c, 0x35, 0x86, 0xa6, 0xad, 0xf7, 0x57,
|
||||
0x00, 0xd5, 0xb3, 0x4d, 0xd9, 0x15, 0x62, 0x29, 0x82, 0x20, 0x4a, 0x7b, 0x41, 0xc5, 0x9c, 0xe0,
|
||||
0x12, 0xd9, 0xce, 0xd4, 0xb1, 0x68, 0x3c, 0x6e, 0xec, 0x54, 0x44, 0x55, 0x2e, 0xdc, 0x91, 0x90,
|
||||
0xb8, 0xf1, 0x2f, 0x70, 0xe3, 0xc0, 0x8d, 0x7b, 0xc5, 0xa9, 0x12, 0x17, 0x2e, 0x54, 0xa8, 0xe5,
|
||||
0x1f, 0x00, 0x89, 0x33, 0xc8, 0x33, 0xe3, 0xda, 0xce, 0x0f, 0xdc, 0x56, 0x48, 0x3d, 0xc5, 0x9e,
|
||||
0xf7, 0xde, 0xcc, 0xf7, 0x7d, 0xef, 0xcd, 0xe7, 0x80, 0xea, 0x5a, 0x36, 0xb1, 0x99, 0xe7, 0x51,
|
||||
0x3b, 0x74, 0x99, 0x47, 0x0e, 0x86, 0x74, 0x30, 0xd2, 0xfd, 0x01, 0x0b, 0x19, 0xbe, 0xed, 0x5a,
|
||||
0xb6, 0x9e, 0xc4, 0xd4, 0xba, 0xc3, 0x1c, 0xc6, 0x43, 0x24, 0x7a, 0x12, 0x59, 0xea, 0xeb, 0x36,
|
||||
0x0b, 0xfa, 0x2c, 0x20, 0x96, 0x19, 0x50, 0x51, 0x4e, 0x0e, 0xd7, 0x2d, 0x1a, 0x9a, 0xeb, 0xc4,
|
||||
0x37, 0x1d, 0xd7, 0x33, 0xa3, 0x5a, 0x99, 0xbb, 0xc8, 0x4f, 0xdb,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, 0x14, 0xd4, 0x70, 0xe4, 0xd3, 0xc0, 0xba, 0xc5, 0x7d, 0x6b, 0xe3, 0xdf, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x06, 0x48, 0xe9, 0x03, 0x3f, 0x0b, 0x00, 0x00,
|
||||
// 890 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x4f, 0x33, 0x45,
|
||||
0x18, 0xee, 0xb4, 0x05, 0xed, 0x5b, 0x40, 0x9d, 0x14, 0x59, 0x57, 0x29, 0xb0, 0xfc, 0xaa, 0x1a,
|
||||
0x76, 0xa0, 0x08, 0x31, 0x22, 0x46, 0x6b, 0x44, 0xb8, 0x18, 0x5c, 0x4f, 0x7a, 0x21, 0xbb, 0xed,
|
||||
0xb0, 0xdd, 0x48, 0x77, 0x4b, 0x67, 0x4b, 0x6c, 0xb0, 0x17, 0x13, 0x8f, 0x26, 0x26, 0xde, 0xfc,
|
||||
0x33, 0xf4, 0xaa, 0x77, 0xe2, 0x89, 0xc4, 0x8b, 0x17, 0x89, 0x01, 0xff, 0x01, 0x4d, 0xbe, 0xfb,
|
||||
0x97, 0x9d, 0x99, 0xb2, 0xbb, 0xfd, 0xf1, 0x2d, 0x90, 0x2f, 0xe1, 0xd4, 0xdd, 0x79, 0xdf, 0x77,
|
||||
0xe6, 0x79, 0x9e, 0xf7, 0x9d, 0x67, 0x0b, 0xaa, 0x63, 0x55, 0x49, 0xd5, 0x73, 0x5d, 0x5a, 0xf5,
|
||||
0x1d, 0xcf, 0x25, 0xa7, 0x6d, 0xda, 0xea, 0xe8, 0xcd, 0x96, 0xe7, 0x7b, 0x78, 0xca, 0xb1, 0xaa,
|
||||
0x7a, 0x18, 0x53, 0x0b, 0xb6, 0x67, 0x7b, 0x3c, 0x44, 0x82, 0x27, 0x91, 0xa5, 0xbe, 0x55, 0xf5,
|
||||
0x58, 0xc3, 0x63, 0xc4, 0x32, 0x19, 0x15, 0xe5, 0xe4, 0x6c, 0xc3, 0xa2, 0xbe, 0xb9, 0x41, 0x9a,
|
||||
0xa6, 0xed, 0xb8, 0x66, 0x50, 0x2b, 0x73, 0x67, 0xf8, 0x69, 0x27, 0x0e, 0x75, 0x7d, 0xf9, 0x23,
|
||||
0x03, 0x73, 0x7d, 0x30, 0xc2, 0x47, 0x99, 0xf0, 0x86, 0xed, 0x79, 0xf6, 0x09, 0x25, 0x66, 0xd3,
|
||||
0x21, 0xa6, 0xeb, 0x7a, 0x3e, 0xdf, 0x96, 0xc9, 0xe8, 0x6b, 0x32, 0xca, 0xdf, 0xac, 0xf6, 0x31,
|
||||
0x31, 0x5d, 0x49, 0x42, 0xdb, 0x85, 0x57, 0x3f, 0x0f, 0x40, 0x7d, 0x7c, 0xbb, 0xa3, 0x41, 0x4f,
|
||||
0xdb, 0x94, 0xf9, 0x78, 0x11, 0x26, 0xc3, 0x63, 0x8e, 0x9c, 0x9a, 0x82, 0xe6, 0x51, 0x29, 0x67,
|
||||
0x4c, 0x84, 0x8b, 0x07, 0x35, 0xed, 0x0f, 0x04, 0x33, 0x03, 0xf5, 0xac, 0xe9, 0xb9, 0x8c, 0xe2,
|
||||
0x5d, 0x80, 0x30, 0x97, 0x57, 0xe7, 0xcb, 0xb3, 0x7a, 0x5c, 0x34, 0x3d, 0xac, 0xfb, 0xc4, 0xad,
|
||||
0x19, 0x91, 0x02, 0x5c, 0x80, 0xb1, 0x66, 0xcb, 0xf3, 0x8e, 0x95, 0xf4, 0x3c, 0x2a, 0x4d, 0x18,
|
||||
0xe2, 0x05, 0xcf, 0x02, 0xf0, 0x87, 0xa3, 0xa6, 0xe9, 0xd7, 0x95, 0x0c, 0x87, 0x94, 0xe3, 0x2b,
|
||||
0x87, 0xa6, 0x5f, 0xc7, 0x3b, 0x30, 0x21, 0xc2, 0x75, 0xea, 0xd8, 0x75, 0x5f, 0xc9, 0xf2, 0x53,
|
||||
0xb1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 0x4b, 0xaf,
|
||||
0x7a, 0x0d, 0x22, 0xff, 0xd5, 0x8a, 0x9f, 0x35, 0x56, 0xfb, 0x9a, 0x7c, 0xc3, 0xd1, 0xae, 0x6f,
|
||||
0xae, 0x45, 0x00, 0xfb, 0x9d, 0x26, 0x65, 0xd6, 0x38, 0x77, 0xaf, 0xcd, 0xa7, 0x01, 0x00, 0x00,
|
||||
0xff, 0xff, 0x5a, 0x9a, 0x2c, 0x5d, 0x4d, 0x0b, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -1346,13 +1346,13 @@ func (m *QueryConnectionConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.EpochHeight != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.VersionHeight))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.EpochNumber != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.VersionNumber))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
@ -1597,11 +1597,11 @@ func (m *QueryConnectionConsensusStateRequest) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.EpochNumber != 0 {
|
||||
n += 1 + sovQuery(uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
n += 1 + sovQuery(uint64(m.VersionNumber))
|
||||
}
|
||||
if m.EpochHeight != 0 {
|
||||
n += 1 + sovQuery(uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
n += 1 + sovQuery(uint64(m.VersionHeight))
|
||||
}
|
||||
return n
|
||||
}
|
||||
@ -2762,9 +2762,9 @@ func (m *QueryConnectionConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType)
|
||||
}
|
||||
m.EpochNumber = 0
|
||||
m.VersionNumber = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
@ -2774,16 +2774,16 @@ func (m *QueryConnectionConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochNumber |= uint64(b&0x7F) << shift
|
||||
m.VersionNumber |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType)
|
||||
}
|
||||
m.EpochHeight = 0
|
||||
m.VersionHeight = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
@ -2793,7 +2793,7 @@ func (m *QueryConnectionConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochHeight |= uint64(b&0x7F) << shift
|
||||
m.VersionHeight |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
|
||||
@ -251,26 +251,26 @@ func request_Query_ConnectionConsensusState_0(ctx context.Context, marshaler run
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "connection_id", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_number"]
|
||||
val, ok = pathParams["version_number"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number")
|
||||
}
|
||||
|
||||
protoReq.EpochNumber, err = runtime.Uint64(val)
|
||||
protoReq.VersionNumber, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_height"]
|
||||
val, ok = pathParams["version_height"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height")
|
||||
}
|
||||
|
||||
protoReq.EpochHeight, err = runtime.Uint64(val)
|
||||
protoReq.VersionHeight, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err)
|
||||
}
|
||||
|
||||
msg, err := client.ConnectionConsensusState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
@ -300,26 +300,26 @@ func local_request_Query_ConnectionConsensusState_0(ctx context.Context, marshal
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "connection_id", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_number"]
|
||||
val, ok = pathParams["version_number"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number")
|
||||
}
|
||||
|
||||
protoReq.EpochNumber, err = runtime.Uint64(val)
|
||||
protoReq.VersionNumber, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_height"]
|
||||
val, ok = pathParams["version_height"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height")
|
||||
}
|
||||
|
||||
protoReq.EpochHeight, err = runtime.Uint64(val)
|
||||
protoReq.VersionHeight, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err)
|
||||
}
|
||||
|
||||
msg, err := server.ConnectionConsensusState(ctx, &protoReq)
|
||||
@ -586,7 +586,7 @@ var (
|
||||
|
||||
pattern_Query_ConnectionClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_Query_ConnectionConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "consensus_state", "epoch", "epoch_number", "height", "epoch_height"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_ConnectionConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -381,7 +381,7 @@ func GetCmdQueryNextSequenceReceive() *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
clientCtx = clientCtx.WithHeight(int64(sequenceRes.ProofHeight.EpochHeight))
|
||||
clientCtx = clientCtx.WithHeight(int64(sequenceRes.ProofHeight.VersionHeight))
|
||||
return clientCtx.PrintOutput(sequenceRes)
|
||||
},
|
||||
}
|
||||
|
||||
@ -140,10 +140,10 @@ func QueryChannelConsensusState(
|
||||
|
||||
queryClient := types.NewQueryClient(clientCtx)
|
||||
req := &types.QueryChannelConsensusStateRequest{
|
||||
PortId: portID,
|
||||
ChannelId: channelID,
|
||||
EpochNumber: height.EpochNumber,
|
||||
EpochHeight: height.EpochHeight,
|
||||
PortId: portID,
|
||||
ChannelId: channelID,
|
||||
VersionNumber: height.VersionNumber,
|
||||
VersionHeight: height.VersionHeight,
|
||||
}
|
||||
|
||||
res, err := queryClient.ChannelConsensusState(context.Background(), req)
|
||||
|
||||
@ -201,7 +201,7 @@ func (q Keeper) ChannelConsensusState(c context.Context, req *types.QueryChannel
|
||||
)
|
||||
}
|
||||
|
||||
consHeight := clienttypes.NewHeight(req.EpochNumber, req.EpochHeight)
|
||||
consHeight := clienttypes.NewHeight(req.VersionNumber, req.VersionHeight)
|
||||
consensusState, found := q.clientKeeper.GetClientConsensusState(ctx, connection.ClientId, consHeight)
|
||||
if !found {
|
||||
return nil, status.Error(
|
||||
|
||||
@ -437,10 +437,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() {
|
||||
"invalid port ID",
|
||||
func() {
|
||||
req = &types.QueryChannelConsensusStateRequest{
|
||||
PortId: "",
|
||||
ChannelId: "test-channel-id",
|
||||
EpochNumber: 0,
|
||||
EpochHeight: 1,
|
||||
PortId: "",
|
||||
ChannelId: "test-channel-id",
|
||||
VersionNumber: 0,
|
||||
VersionHeight: 1,
|
||||
}
|
||||
},
|
||||
false,
|
||||
@ -449,10 +449,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() {
|
||||
"invalid channel ID",
|
||||
func() {
|
||||
req = &types.QueryChannelConsensusStateRequest{
|
||||
PortId: "test-port-id",
|
||||
ChannelId: "",
|
||||
EpochNumber: 0,
|
||||
EpochHeight: 1,
|
||||
PortId: "test-port-id",
|
||||
ChannelId: "",
|
||||
VersionNumber: 0,
|
||||
VersionHeight: 1,
|
||||
}
|
||||
},
|
||||
false,
|
||||
@ -461,10 +461,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() {
|
||||
"channel not found",
|
||||
func() {
|
||||
req = &types.QueryChannelConsensusStateRequest{
|
||||
PortId: "test-port-id",
|
||||
ChannelId: "test-channel-id",
|
||||
EpochNumber: 0,
|
||||
EpochHeight: 1,
|
||||
PortId: "test-port-id",
|
||||
ChannelId: "test-channel-id",
|
||||
VersionNumber: 0,
|
||||
VersionHeight: 1,
|
||||
}
|
||||
},
|
||||
false,
|
||||
@ -482,10 +482,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() {
|
||||
suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainA.GetContext(), channelA.PortID, channelA.ID, channel)
|
||||
|
||||
req = &types.QueryChannelConsensusStateRequest{
|
||||
PortId: channelA.PortID,
|
||||
ChannelId: channelA.ID,
|
||||
EpochNumber: 0,
|
||||
EpochHeight: 1,
|
||||
PortId: channelA.PortID,
|
||||
ChannelId: channelA.ID,
|
||||
VersionNumber: 0,
|
||||
VersionHeight: 1,
|
||||
}
|
||||
}, false,
|
||||
},
|
||||
@ -495,10 +495,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() {
|
||||
_, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED)
|
||||
|
||||
req = &types.QueryChannelConsensusStateRequest{
|
||||
PortId: channelA.PortID,
|
||||
ChannelId: channelA.ID,
|
||||
EpochNumber: 0,
|
||||
EpochHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height
|
||||
PortId: channelA.PortID,
|
||||
ChannelId: channelA.ID,
|
||||
VersionNumber: 0,
|
||||
VersionHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height
|
||||
}
|
||||
}, false,
|
||||
},
|
||||
@ -516,10 +516,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() {
|
||||
expClientID = clientA
|
||||
|
||||
req = &types.QueryChannelConsensusStateRequest{
|
||||
PortId: channelA.PortID,
|
||||
ChannelId: channelA.ID,
|
||||
EpochNumber: clientState.GetLatestHeight().GetEpochNumber(),
|
||||
EpochHeight: clientState.GetLatestHeight().GetEpochHeight(),
|
||||
PortId: channelA.PortID,
|
||||
ChannelId: channelA.ID,
|
||||
VersionNumber: clientState.GetLatestHeight().GetEpochNumber(),
|
||||
VersionHeight: clientState.GetLatestHeight().GetEpochHeight(),
|
||||
}
|
||||
},
|
||||
true,
|
||||
|
||||
@ -416,7 +416,7 @@ func (suite *TypesTestSuite) TestMsgRecvPacketGetSignBytes() {
|
||||
res := msg.GetSignBytes()
|
||||
|
||||
expected := fmt.Sprintf(
|
||||
`{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"100","epoch_number":"0"},"timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":{"epoch_height":"1","epoch_number":"0"},"signer":"%s"}`,
|
||||
`{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":{"version_height":"100","version_number":"0"},"timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":{"version_height":"1","version_number":"0"},"signer":"%s"}`,
|
||||
string(msg.GetDataSignBytes()),
|
||||
addr1.String(),
|
||||
)
|
||||
|
||||
@ -530,10 +530,10 @@ type QueryChannelConsensusStateRequest struct {
|
||||
PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
|
||||
// channel unique identifier
|
||||
ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
|
||||
// epoch number of the consensus state
|
||||
EpochNumber uint64 `protobuf:"varint,3,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"`
|
||||
// epoch height of the consensus state
|
||||
EpochHeight uint64 `protobuf:"varint,4,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty"`
|
||||
// version number of the consensus state
|
||||
VersionNumber uint64 `protobuf:"varint,3,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty"`
|
||||
// version height of the consensus state
|
||||
VersionHeight uint64 `protobuf:"varint,4,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryChannelConsensusStateRequest) Reset() { *m = QueryChannelConsensusStateRequest{} }
|
||||
@ -583,16 +583,16 @@ func (m *QueryChannelConsensusStateRequest) GetChannelId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *QueryChannelConsensusStateRequest) GetEpochNumber() uint64 {
|
||||
func (m *QueryChannelConsensusStateRequest) GetVersionNumber() uint64 {
|
||||
if m != nil {
|
||||
return m.EpochNumber
|
||||
return m.VersionNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *QueryChannelConsensusStateRequest) GetEpochHeight() uint64 {
|
||||
func (m *QueryChannelConsensusStateRequest) GetVersionHeight() uint64 {
|
||||
if m != nil {
|
||||
return m.EpochHeight
|
||||
return m.VersionHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -1489,92 +1489,92 @@ func init() {
|
||||
func init() { proto.RegisterFile("ibc/channel/query.proto", fileDescriptor_2150995751d4f15a) }
|
||||
|
||||
var fileDescriptor_2150995751d4f15a = []byte{
|
||||
// 1345 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0x1b, 0xc5,
|
||||
0x1b, 0xce, 0xc4, 0xce, 0xd7, 0xeb, 0xfc, 0x7e, 0x25, 0x93, 0x44, 0x49, 0xb6, 0x89, 0x93, 0xac,
|
||||
0x44, 0x1b, 0x5a, 0xb2, 0xdb, 0xa6, 0x08, 0xa1, 0x02, 0x95, 0x92, 0x48, 0xb4, 0x41, 0x4a, 0x9b,
|
||||
0x3a, 0xaa, 0xd4, 0xf4, 0x80, 0x59, 0xaf, 0x27, 0xf6, 0x2a, 0xf6, 0xee, 0xd6, 0xbb, 0x6e, 0x12,
|
||||
0x82, 0x11, 0xea, 0x05, 0x8e, 0x88, 0x1e, 0x7a, 0x44, 0xfc, 0x05, 0x88, 0x1b, 0xc7, 0x4a, 0x70,
|
||||
0x88, 0x84, 0x84, 0x2a, 0xf5, 0xd2, 0x13, 0xa0, 0x04, 0xae, 0x1c, 0x38, 0xc0, 0x15, 0xed, 0x7c,
|
||||
0xac, 0x77, 0xed, 0x5d, 0xc7, 0xc4, 0x69, 0x23, 0x4e, 0xde, 0x9d, 0x79, 0x67, 0xde, 0xe7, 0x79,
|
||||
0xde, 0x77, 0x67, 0x9f, 0x35, 0x8c, 0x19, 0x39, 0x5d, 0xd5, 0x8b, 0x9a, 0x69, 0x92, 0x92, 0x7a,
|
||||
0xbf, 0x4a, 0x2a, 0xbb, 0x8a, 0x5d, 0xb1, 0x5c, 0x0b, 0xa7, 0x8c, 0x9c, 0xae, 0xf0, 0x09, 0x89,
|
||||
0x45, 0x95, 0x0c, 0x62, 0xba, 0xfc, 0x87, 0x45, 0x49, 0x17, 0x74, 0xcb, 0x29, 0x5b, 0x8e, 0x9a,
|
||||
0xd3, 0x1c, 0xc2, 0x96, 0xab, 0x0f, 0x2e, 0xe7, 0x88, 0xab, 0x5d, 0x56, 0x6d, 0xad, 0x60, 0x98,
|
||||
0x9a, 0x6b, 0x58, 0x26, 0x8f, 0x9d, 0x08, 0xa6, 0xe2, 0xbf, 0x7c, 0x6a, 0xb2, 0x60, 0x59, 0x85,
|
||||
0x12, 0x51, 0x35, 0xdb, 0x50, 0x35, 0xd3, 0xb4, 0x5c, 0xba, 0xce, 0x11, 0x0b, 0xf9, 0x2c, 0xbd,
|
||||
0xcb, 0x55, 0x37, 0x55, 0xcd, 0xe4, 0x28, 0xa5, 0x91, 0x82, 0x55, 0xb0, 0xe8, 0xa5, 0xea, 0x5d,
|
||||
0xb1, 0x51, 0x79, 0x15, 0x86, 0x6f, 0x7b, 0x58, 0x96, 0x59, 0x92, 0x0c, 0xb9, 0x5f, 0x25, 0x8e,
|
||||
0x8b, 0xc7, 0xa0, 0xcf, 0xb6, 0x2a, 0x6e, 0xd6, 0xc8, 0x8f, 0xa3, 0x19, 0x34, 0x37, 0x90, 0xe9,
|
||||
0xf5, 0x6e, 0x57, 0xf2, 0x78, 0x0a, 0x80, 0xe3, 0xf1, 0xe6, 0xba, 0xe9, 0xdc, 0x00, 0x1f, 0x59,
|
||||
0xc9, 0xcb, 0xdf, 0x21, 0x18, 0x09, 0xef, 0xe7, 0xd8, 0x96, 0xe9, 0x10, 0xac, 0x40, 0x1f, 0x8f,
|
||||
0xa2, 0x1b, 0xa6, 0x16, 0x46, 0x94, 0x80, 0x6a, 0x8a, 0x08, 0x17, 0x41, 0x78, 0x04, 0x7a, 0xec,
|
||||
0x8a, 0x65, 0x6d, 0xd2, 0x14, 0x83, 0x19, 0x76, 0xe3, 0x65, 0xa7, 0x17, 0x59, 0x5b, 0x73, 0x8b,
|
||||
0xe3, 0x09, 0x96, 0x9d, 0x8e, 0xac, 0x69, 0x6e, 0x11, 0xbf, 0x0d, 0x83, 0x6c, 0xba, 0x48, 0x8c,
|
||||
0x42, 0xd1, 0x1d, 0x4f, 0xd2, 0x4c, 0x98, 0x65, 0x62, 0xb5, 0xb8, 0x41, 0x67, 0x96, 0x92, 0xfb,
|
||||
0x3f, 0x4f, 0x77, 0x65, 0x52, 0x34, 0x9a, 0x0d, 0xc9, 0x1f, 0x84, 0x91, 0x3b, 0x42, 0x8a, 0xf7,
|
||||
0x00, 0xea, 0xf5, 0xe1, 0xe0, 0xcf, 0x29, 0xac, 0x98, 0x8a, 0x57, 0x4c, 0x85, 0xf5, 0x02, 0x2f,
|
||||
0xa6, 0xb2, 0xa6, 0x15, 0x08, 0x5f, 0x9b, 0x09, 0xac, 0x94, 0x7f, 0x42, 0x30, 0xda, 0x90, 0x80,
|
||||
0x6b, 0x73, 0x15, 0xfa, 0x39, 0x6d, 0x67, 0x1c, 0xcd, 0x24, 0xe6, 0x52, 0x0b, 0xe9, 0x90, 0x38,
|
||||
0x2b, 0x79, 0x62, 0xba, 0xc6, 0xa6, 0x41, 0xf2, 0x42, 0x26, 0x3f, 0x1e,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2c, 0x9a, 0xbb, 0x99, 0xff, 0xeb,
|
||||
0xa1, 0x6d, 0xf0, 0x59, 0x18, 0xe0, 0xb5, 0xf4, 0x99, 0xf4, 0xb3, 0x81, 0x95, 0x7c, 0xbd, 0x30,
|
||||
0x89, 0xf8, 0xc2, 0x24, 0x8f, 0x2a, 0x4c, 0xcf, 0xbf, 0x29, 0x4c, 0x05, 0x26, 0x29, 0xe7, 0x35,
|
||||
0x4d, 0xdf, 0x22, 0xee, 0xb2, 0x55, 0x2e, 0x1b, 0x6e, 0x99, 0x98, 0x6e, 0xa7, 0x25, 0x91, 0xa0,
|
||||
0xdf, 0xf1, 0xb6, 0x30, 0x75, 0xc2, 0xcb, 0xe1, 0xdf, 0xcb, 0xdf, 0x22, 0x98, 0x8a, 0x49, 0xca,
|
||||
0x35, 0xa6, 0x87, 0x97, 0x18, 0xa5, 0x89, 0x07, 0x33, 0x81, 0x91, 0x53, 0x68, 0xe0, 0xaf, 0xe2,
|
||||
0x30, 0x3b, 0x9d, 0x2a, 0x15, 0x3e, 0x88, 0x13, 0xc7, 0x3e, 0x88, 0x7f, 0x11, 0xef, 0x84, 0x08,
|
||||
0x84, 0x5c, 0xd6, 0x25, 0x48, 0xd5, 0x45, 0x14, 0x47, 0xf1, 0x4c, 0xe8, 0x28, 0x66, 0x8b, 0x17,
|
||||
0xf5, 0xad, 0x40, 0x55, 0x82, 0x8b, 0x4e, 0xf3, 0x3c, 0xde, 0xe6, 0x67, 0x88, 0x8f, 0xd1, 0xb4,
|
||||
0xb6, 0x4b, 0x24, 0x5f, 0x20, 0x2f, 0xba, 0x61, 0x9f, 0x88, 0x93, 0x21, 0x26, 0x33, 0x97, 0x77,
|
||||
0x0e, 0xce, 0x68, 0xe1, 0x29, 0xde, 0xba, 0x8d, 0xc3, 0xa7, 0xd0, 0xbf, 0x8f, 0x45, 0xff, 0xde,
|
||||
0x31, 0x2b, 0x44, 0x27, 0xc6, 0x03, 0x92, 0x67, 0x64, 0x3a, 0xee, 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 0x3e, 0xa5, 0xe8, 0x6c, 0x49, 0x6e,
|
||||
0x15, 0xc2, 0x61, 0xbd, 0x4a, 0x61, 0x4d, 0xe3, 0xa9, 0x96, 0xb0, 0xf0, 0x37, 0x08, 0x70, 0xb3,
|
||||
0xe1, 0xc7, 0x17, 0x23, 0x32, 0xc4, 0x7d, 0xa1, 0x48, 0xaf, 0xb7, 0x17, 0xcc, 0x81, 0x5d, 0xa3,
|
||||
0xc0, 0xde, 0xc2, 0x6f, 0x46, 0x03, 0xf3, 0x17, 0x7a, 0x92, 0xf9, 0x37, 0xb5, 0x3a, 0xe2, 0x27,
|
||||
0x1e, 0xe2, 0x26, 0xb7, 0x1d, 0x89, 0x38, 0xce, 0xee, 0x47, 0x22, 0x8e, 0x35, 0xf0, 0xf2, 0x2d,
|
||||
0x8a, 0x78, 0x05, 0x5f, 0x3f, 0x7e, 0x85, 0xd5, 0xa0, 0xed, 0xc7, 0x7f, 0x23, 0x18, 0x8d, 0xf4,
|
||||
0xa6, 0x58, 0x89, 0x07, 0x16, 0x65, 0xb4, 0x25, 0xb5, 0xed, 0x78, 0xce, 0xa5, 0x46, 0xb9, 0x6c,
|
||||
0xe3, 0x6a, 0x27, 0x5c, 0xc2, 0xae, 0x59, 0xa5, 0xde, 0x5b, 0xdd, 0x0b, 0x3a, 0xf7, 0x9a, 0xca,
|
||||
0x9e, 0x52, 0x31, 0xca, 0xee, 0x6a, 0xf8, 0x47, 0x04, 0xaf, 0x34, 0xda, 0x1a, 0xfc, 0x5a, 0x33,
|
||||
0x89, 0x18, 0x17, 0x2b, 0x5d, 0x68, 0x27, 0x94, 0x53, 0xfd, 0x90, 0x52, 0xbd, 0x87, 0xef, 0x76,
|
||||
0x40, 0xb5, 0xe9, 0x45, 0xe0, 0xa8, 0x7b, 0xe2, 0xa4, 0xab, 0xe1, 0xef, 0x11, 0x0c, 0x35, 0x99,
|
||||
0x34, 0xdc, 0x06, 0x46, 0xff, 0xd1, 0xb9, 0xd8, 0x56, 0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, 0xfc, 0x7f, 0x6f, 0xf6, 0x33, 0xef, 0xe4, 0xb7,
|
||||
0xd4, 0x1d, 0x8a, 0xe0, 0xd2, 0x1b, 0xf3, 0x02, 0x84, 0xbb, 0x6b, 0x13, 0x27, 0xd7, 0x4b, 0xff,
|
||||
0xb3, 0xb8, 0xf2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0x33, 0x85, 0xa4, 0x69, 0x17, 0x00,
|
||||
0x00,
|
||||
// 1350 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4f, 0x6c, 0x1b, 0xc5,
|
||||
0x17, 0xce, 0xc4, 0x6e, 0x9b, 0xbc, 0xf4, 0xcf, 0xaf, 0xd3, 0x44, 0x4d, 0xb7, 0x89, 0x93, 0xac,
|
||||
0xd4, 0x36, 0xbf, 0x96, 0xec, 0xb6, 0x29, 0x42, 0xa8, 0x40, 0xa5, 0x24, 0x12, 0x6d, 0x90, 0xd2,
|
||||
0xa6, 0x8e, 0x2a, 0x35, 0x3d, 0x60, 0xd6, 0xeb, 0x89, 0xbd, 0x8a, 0xbd, 0xbb, 0xf5, 0xae, 0xd3,
|
||||
0x84, 0x60, 0x84, 0xca, 0x01, 0x8e, 0x88, 0x1e, 0xb8, 0xc1, 0x99, 0x13, 0xe2, 0xc6, 0xb1, 0x12,
|
||||
0x1c, 0x22, 0x21, 0xa1, 0x4a, 0xbd, 0xf4, 0x04, 0x28, 0x81, 0x2b, 0x07, 0x0e, 0x1c, 0x11, 0xda,
|
||||
0x99, 0xb7, 0xeb, 0x5d, 0x7b, 0xd7, 0x31, 0x71, 0xda, 0x88, 0x93, 0xbd, 0x33, 0x6f, 0xe6, 0x7d,
|
||||
0xdf, 0xf7, 0xde, 0x8c, 0xbf, 0x35, 0x9c, 0x36, 0xf2, 0xba, 0xaa, 0x97, 0x34, 0xd3, 0x64, 0x65,
|
||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x83, 0x70,
|
||||
0xc8, 0xae, 0x5a, 0xd6, 0x0a, 0x4f, 0x71, 0x34, 0x2b, 0x1e, 0xbc, 0xec, 0xfc, 0x4b, 0xce, 0xd6,
|
||||
0xdc, 0xd2, 0x70, 0x4a, 0x64, 0xe7, 0x23, 0x8b, 0x9a, 0x5b, 0xa2, 0x6f, 0xc0, 0x51, 0x31, 0x5d,
|
||||
0x62, 0x46, 0xb1, 0xe4, 0x0e, 0xa7, 0x79, 0x26, 0x2a, 0x32, 0x89, 0x5a, 0xdc, 0xe4, 0x33, 0xb3,
|
||||
0xe9, 0xad, 0x9f, 0xc7, 0x7a, 0xb2, 0x03, 0x3c, 0x5a, 0x0c, 0xc9, 0xef, 0x46, 0x91, 0x3b, 0xbe,
|
||||
0x14, 0x6f, 0x03, 0x34, 0xea, 0x83, 0xe0, 0xcf, 0x2b, 0xa2, 0x98, 0x8a, 0x57, 0x4c, 0x45, 0xf4,
|
||||
0x02, 0x16, 0x53, 0x59, 0xd4, 0x8a, 0x0c, 0xd7, 0x66, 0x43, 0x2b, 0xe5, 0x9f, 0x08, 0x0c, 0x35,
|
||||
0x25, 0x40, 0x6d, 0xae, 0x41, 0x1f, 0xd2, 0x76, 0x86, 0xc9, 0x78, 0x6a, 0x72, 0x60, 0x3a, 0x13,
|
||||
0x11, 0x67, 0xbe, 0xc0, 0x4c, 0xd7, 0x58, 0x31, 0x58, 0xc1, 0x97, 0x29, 0x88, 0xa7, 0x37, 0x22,
|
||||
0xe8, 0x7a, 0x39, 0xba, 0x0b, 0xbb, 0xa2, 0x13, 0x89, 0xc3, 0xf0, 0xe8, 0x65, 0x38, 0x8c, 0xaa,
|
||||
0xa5, 0x76, 0x51, 0x0d, 0xe3, 0xe4, 0x4f, 0x09, 0x64, 0x04, 0x21, 0xcb, 0x34, 0x99, 0xee, 0xed,
|
||||
0xd2, 0xac, 0x5d, 0x06, 0x40, 0x0f, 0x26, 0xb1, 0x93, 0x42, 0x23, 0x4d, 0xda, 0xf6, 0xee, 0x59,
|
||||
0xdb, 0xe7, 0x04, 0xc6, 0x12, 0xa1, 0xfc, 0xb7, 0x55, 0xbe, 0xe7, 0x8b, 0x2c, 0xb0, 0xcc, 0xf1,
|
||||
0xd0, 0x25, 0x57, 0x73, 0x59, 0xb7, 0x67, 0xf5, 0x8f, 0x40, 0xb4, 0x98, 0xad, 0x51, 0xb4, 0x65,
|
||||
0x38, 0x6d, 0x04, 0xba, 0xe4, 0x04, 0xce, 0x9c, 0xe3, 0x85, 0xe0, 0x49, 0x98, 0x08, 0x13, 0x08,
|
||||
0x49, 0x18, 0xda, 0x6b, 0xc8, 0x88, 0x1b, 0x3e, 0x80, 0x13, 0xfe, 0x35, 0x81, 0x89, 0x08, 0x61,
|
||||
0x8f, 0xa2, 0xe9, 0xd4, 0x9c, 0xfd, 0x90, 0x93, 0x9e, 0x83, 0xe3, 0x6b, 0xac, 0xea, 0x18, 0x96,
|
||||
0x99, 0x33, 0x6b, 0x95, 0x3c, 0xab, 0x72, 0xf4, 0xe9, 0xec, 0x31, 0x1c, 0xbd, 0xc5, 0x07, 0xc3,
|
||||
0x61, 0x21, 0x0e, 0x8d, 0x30, 0xc4, 0xfa, 0x27, 0x01, 0xb9, 0x1d, 0x56, 0xac, 0xcf, 0x5b, 0x70,
|
||||
0x42, 0xf7, 0x67, 0x22, 0x75, 0x19, 0x54, 0xc4, 0x2f, 0x81, 0xe2, 0xff, 0x12, 0x28, 0x33, 0xe6,
|
||||
0x46, 0xf6, 0xb8, 0x1e, 0xd9, 0x86, 0x9e, 0x85, 0x7e, 0xac, 0x69, 0xc0, 0xa8, 0x4f, 0x0c, 0xcc,
|
||||
0x17, 0x1a, 0x05, 0x4a, 0x25, 0x17, 0x28, 0xbd, 0x5b, 0x81, 0x0e, 0xfd, 0x9b, 0x02, 0x55, 0x61,
|
||||
0x84, 0x73, 0x5e, 0xd4, 0xf4, 0x55, 0xe6, 0xce, 0x59, 0x95, 0x8a, 0xe1, 0x56, 0x98, 0xe9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0xf3, 0x17, 0x81, 0x93, 0x2d, 0x86, 0x24, 0xae, 0x36,
|
||||
0x49, 0x76, 0x2a, 0xae, 0x36, 0x89, 0x0e, 0x47, 0xfe, 0x44, 0x1c, 0xaf, 0x8f, 0x08, 0xfd, 0x70,
|
||||
0x9f, 0xdb, 0xad, 0x8d, 0x25, 0xa9, 0xab, 0xb5, 0x00, 0x50, 0xce, 0x46, 0x8a, 0xbf, 0x13, 0x38,
|
||||
0x16, 0x71, 0x20, 0xf4, 0x7c, 0x3c, 0x91, 0x66, 0xdf, 0x24, 0x5d, 0xd8, 0x35, 0x0e, 0xc9, 0x3e,
|
||||
0x12, 0x64, 0x3f, 0xa0, 0xef, 0xbf, 0x6c, 0xae, 0x1c, 0x0b, 0xaf, 0x35, 0xfd, 0x81, 0xc0, 0xa9,
|
||||
0x18, 0x7f, 0x42, 0x63, 0xae, 0xf8, 0x64, 0x8b, 0x24, 0x4d, 0x75, 0x18, 0x8d, 0xcc, 0x17, 0x39,
|
||||
0xf1, 0x77, 0xe8, 0xcd, 0x2e, 0x88, 0x47, 0x5c, 0xd3, 0xec, 0xc2, 0xd6, 0x76, 0x86, 0x3c, 0xdd,
|
||||
0xce, 0x90, 0x5f, 0xb7, 0x33, 0xe4, 0xb3, 0x9d, 0x4c, 0xcf, 0xd3, 0x9d, 0x4c, 0xcf, 0xf3, 0x9d,
|
||||
0x4c, 0xcf, 0xfd, 0xab, 0x45, 0xc3, 0x2d, 0xd5, 0xf2, 0x8a, 0x6e, 0x55, 0x54, 0xfc, 0x1b, 0x5c,
|
||||
0x7c, 0x4c, 0x39, 0x85, 0x55, 0x75, 0x9d, 0x23, 0xb8, 0xfc, 0xea, 0x94, 0x0f, 0xc2, 0xdd, 0xb0,
|
||||
0x99, 0x93, 0x3f, 0xcc, 0xff, 0xba, 0xb8, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xf5,
|
||||
0x71, 0x68, 0x78, 0x17, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -2458,13 +2458,13 @@ func (m *QueryChannelConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) (i
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.EpochHeight != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.VersionHeight))
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if m.EpochNumber != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.VersionNumber))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
@ -3329,11 +3329,11 @@ func (m *QueryChannelConsensusStateRequest) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.EpochNumber != 0 {
|
||||
n += 1 + sovQuery(uint64(m.EpochNumber))
|
||||
if m.VersionNumber != 0 {
|
||||
n += 1 + sovQuery(uint64(m.VersionNumber))
|
||||
}
|
||||
if m.EpochHeight != 0 {
|
||||
n += 1 + sovQuery(uint64(m.EpochHeight))
|
||||
if m.VersionHeight != 0 {
|
||||
n += 1 + sovQuery(uint64(m.VersionHeight))
|
||||
}
|
||||
return n
|
||||
}
|
||||
@ -4849,9 +4849,9 @@ func (m *QueryChannelConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType)
|
||||
}
|
||||
m.EpochNumber = 0
|
||||
m.VersionNumber = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
@ -4861,16 +4861,16 @@ func (m *QueryChannelConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochNumber |= uint64(b&0x7F) << shift
|
||||
m.VersionNumber |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType)
|
||||
}
|
||||
m.EpochHeight = 0
|
||||
m.VersionHeight = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
@ -4880,7 +4880,7 @@ func (m *QueryChannelConsensusStateRequest) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.EpochHeight |= uint64(b&0x7F) << shift
|
||||
m.VersionHeight |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
|
||||
@ -324,26 +324,26 @@ func request_Query_ChannelConsensusState_0(ctx context.Context, marshaler runtim
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_number"]
|
||||
val, ok = pathParams["version_number"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number")
|
||||
}
|
||||
|
||||
protoReq.EpochNumber, err = runtime.Uint64(val)
|
||||
protoReq.VersionNumber, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_height"]
|
||||
val, ok = pathParams["version_height"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height")
|
||||
}
|
||||
|
||||
protoReq.EpochHeight, err = runtime.Uint64(val)
|
||||
protoReq.VersionHeight, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err)
|
||||
}
|
||||
|
||||
msg, err := client.ChannelConsensusState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
@ -384,26 +384,26 @@ func local_request_Query_ChannelConsensusState_0(ctx context.Context, marshaler
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_number"]
|
||||
val, ok = pathParams["version_number"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number")
|
||||
}
|
||||
|
||||
protoReq.EpochNumber, err = runtime.Uint64(val)
|
||||
protoReq.VersionNumber, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["epoch_height"]
|
||||
val, ok = pathParams["version_height"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height")
|
||||
}
|
||||
|
||||
protoReq.EpochHeight, err = runtime.Uint64(val)
|
||||
protoReq.VersionHeight, err = runtime.Uint64(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err)
|
||||
}
|
||||
|
||||
msg, err := server.ChannelConsensusState(ctx, &protoReq)
|
||||
@ -1472,7 +1472,7 @@ var (
|
||||
|
||||
pattern_Query_ChannelClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_Query_ChannelConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "consensus_state", "epoch", "epoch_number", "height", "epoch_height"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_ChannelConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_Query_PacketCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "sequence"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
|
||||
@ -56,6 +56,6 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte,
|
||||
return nil, nil, clienttypes.Height{}, err
|
||||
}
|
||||
|
||||
epoch := clienttypes.ParseChainID(clientCtx.ChainID)
|
||||
return res.Value, proofBz, clienttypes.NewHeight(epoch, uint64(res.Height)+1), nil
|
||||
version := clienttypes.ParseChainID(clientCtx.ChainID)
|
||||
return res.Value, proofBz, clienttypes.NewHeight(version, uint64(res.Height)+1), nil
|
||||
}
|
||||
|
||||
@ -396,10 +396,10 @@ func produceVerificationArgs(
|
||||
prefix exported.Prefix,
|
||||
proof []byte,
|
||||
) (signing.SignatureData, uint64, uint64, error) {
|
||||
if epoch := height.GetEpochNumber(); epoch != 0 {
|
||||
return nil, 0, 0, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "epoch must be 0 for solomachine, got epoch-number: %d", epoch)
|
||||
if version := height.GetEpochNumber(); version != 0 {
|
||||
return nil, 0, 0, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "version must be 0 for solomachine, got version-number: %d", version)
|
||||
}
|
||||
// sequence is encoded in the epoch height of height struct
|
||||
// sequence is encoded in the version height of height struct
|
||||
sequence := height.GetEpochHeight()
|
||||
if cs.IsFrozen() {
|
||||
return nil, 0, 0, clienttypes.ErrClientFrozen
|
||||
|
||||
@ -95,8 +95,8 @@ func (cs ClientState) Validate() error {
|
||||
if cs.MaxClockDrift == 0 {
|
||||
return sdkerrors.Wrap(ErrInvalidMaxClockDrift, "max clock drift cannot be zero")
|
||||
}
|
||||
if cs.LatestHeight.EpochHeight == 0 {
|
||||
return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "tendermint epoch height cannot be zero")
|
||||
if cs.LatestHeight.VersionHeight == 0 {
|
||||
return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "tendermint version height cannot be zero")
|
||||
}
|
||||
if cs.TrustingPeriod >= cs.UnbondingPeriod {
|
||||
return sdkerrors.Wrapf(
|
||||
|
||||
@ -136,7 +136,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() {
|
||||
},
|
||||
{
|
||||
name: "client is frozen",
|
||||
clientState: &types.ClientState{LatestHeight: height, FrozenHeight: clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-1)},
|
||||
clientState: &types.ClientState{LatestHeight: height, FrozenHeight: clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-1)},
|
||||
consensusState: types.ConsensusState{
|
||||
Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()),
|
||||
},
|
||||
|
||||
@ -34,8 +34,8 @@ func (h Header) GetHeight() exported.Height {
|
||||
if h.Header == nil {
|
||||
return clienttypes.ZeroHeight()
|
||||
}
|
||||
epoch := clienttypes.ParseChainID(h.Header.ChainID)
|
||||
return clienttypes.NewHeight(epoch, uint64(h.Header.Height))
|
||||
version := clienttypes.ParseChainID(h.Header.ChainID)
|
||||
return clienttypes.NewHeight(version, uint64(h.Header.Height))
|
||||
}
|
||||
|
||||
// GetTime returns the current block timestamp. It returns a zero time if
|
||||
|
||||
@ -73,11 +73,11 @@ func (misbehaviour Misbehaviour) ValidateBasic() error {
|
||||
if misbehaviour.Header2 == nil {
|
||||
return sdkerrors.Wrap(ErrInvalidHeader, "misbehaviour Header2 cannot be nil")
|
||||
}
|
||||
if misbehaviour.Header1.TrustedHeight.EpochHeight == 0 {
|
||||
return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header1 cannot have zero epoch height")
|
||||
if misbehaviour.Header1.TrustedHeight.VersionHeight == 0 {
|
||||
return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header1 cannot have zero version height")
|
||||
}
|
||||
if misbehaviour.Header2.TrustedHeight.EpochHeight == 0 {
|
||||
return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header2 cannot have zero epoch height")
|
||||
if misbehaviour.Header2.TrustedHeight.VersionHeight == 0 {
|
||||
return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header2 cannot have zero version height")
|
||||
}
|
||||
if misbehaviour.Header1.TrustedValidators == nil {
|
||||
return sdkerrors.Wrap(ErrInvalidValidatorSet, "trusted validator set in Header1 cannot be empty")
|
||||
|
||||
@ -56,14 +56,14 @@ func (cs ClientState) CheckMisbehaviourAndUpdateState(
|
||||
ageDuration := ctx.BlockTime().Sub(infractionTime)
|
||||
|
||||
var ageBlocks int64
|
||||
if tmMisbehaviour.GetHeight().GetEpochNumber() == cs.LatestHeight.EpochNumber {
|
||||
// if the misbehaviour is in the same epoch as the client then
|
||||
if tmMisbehaviour.GetHeight().GetEpochNumber() == cs.LatestHeight.VersionNumber {
|
||||
// if the misbehaviour is in the same version as the client then
|
||||
// perform expiry check using block height in addition to time
|
||||
infractionHeight := tmMisbehaviour.GetHeight().GetEpochHeight()
|
||||
ageBlocks = int64(cs.LatestHeight.EpochHeight - infractionHeight)
|
||||
ageBlocks = int64(cs.LatestHeight.VersionHeight - infractionHeight)
|
||||
} else {
|
||||
// if the misbehaviour is from a different epoch, then the epoch-height
|
||||
// of misbehaviour has no correlation with the current epoch-height
|
||||
// if the misbehaviour is from a different version, then the version-height
|
||||
// of misbehaviour has no correlation with the current version-height
|
||||
// so we disable the block check by setting ageBlocks to 0 and only
|
||||
// rely on the time expiry check with ageDuration
|
||||
ageBlocks = 0
|
||||
@ -142,7 +142,7 @@ func checkMisbehaviourHeader(
|
||||
}
|
||||
|
||||
chainID := clientState.GetChainID()
|
||||
// If chainID is in epoch format, then set epoch number of chainID with the epoch number
|
||||
// If chainID is in version format, then set version number of chainID with the version number
|
||||
// of the misbehaviour header
|
||||
if clienttypes.IsEpochFormat(chainID) {
|
||||
chainID, _ = clienttypes.SetEpochNumber(chainID, header.GetHeight().GetEpochNumber())
|
||||
|
||||
@ -36,9 +36,9 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() {
|
||||
|
||||
altSigners := []tmtypes.PrivValidator{altPrivVal}
|
||||
|
||||
epochHeight := int64(height.EpochHeight)
|
||||
heightMinus1 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-1)
|
||||
heightMinus3 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-3)
|
||||
versionHeight := int64(height.VersionHeight)
|
||||
heightMinus1 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-1)
|
||||
heightMinus3 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-3)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -100,7 +100,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() {
|
||||
true,
|
||||
},
|
||||
{
|
||||
"valid misbehaviour at a previous epoch",
|
||||
"valid misbehaviour at a previous version",
|
||||
types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false),
|
||||
types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash),
|
||||
heightMinus1,
|
||||
@ -116,7 +116,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() {
|
||||
true,
|
||||
},
|
||||
{
|
||||
"valid misbehaviour at a future epoch",
|
||||
"valid misbehaviour at a future version",
|
||||
types.NewClientState(chainIDEpoch0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), &upgradePath, false, false),
|
||||
types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash),
|
||||
heightMinus1,
|
||||
@ -132,7 +132,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() {
|
||||
true,
|
||||
},
|
||||
{
|
||||
"valid misbehaviour with trusted heights at a previous epoch",
|
||||
"valid misbehaviour with trusted heights at a previous version",
|
||||
types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false),
|
||||
types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash),
|
||||
heightMinus1,
|
||||
@ -272,7 +272,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() {
|
||||
},
|
||||
{
|
||||
"rejected misbehaviour due to expired block duration",
|
||||
types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(0, uint64(epochHeight+simapp.DefaultConsensusParams.Evidence.MaxAgeNumBlocks+1)), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false),
|
||||
types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(0, uint64(versionHeight+simapp.DefaultConsensusParams.Evidence.MaxAgeNumBlocks+1)), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false),
|
||||
types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash),
|
||||
height,
|
||||
types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash),
|
||||
|
||||
@ -15,7 +15,7 @@ import (
|
||||
|
||||
func (suite *TendermintTestSuite) TestMisbehaviour() {
|
||||
signers := []tmtypes.PrivValidator{suite.privVal}
|
||||
heightMinus1 := clienttypes.NewHeight(0, height.EpochHeight-1)
|
||||
heightMinus1 := clienttypes.NewHeight(0, height.VersionHeight-1)
|
||||
|
||||
misbehaviour := &types.Misbehaviour{
|
||||
Header1: suite.header,
|
||||
@ -34,9 +34,9 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() {
|
||||
altPubKey, err := altPrivVal.GetPubKey()
|
||||
suite.Require().NoError(err)
|
||||
|
||||
epochHeight := int64(height.EpochHeight)
|
||||
versionHeight := int64(height.VersionHeight)
|
||||
|
||||
altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), epochHeight)
|
||||
altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), versionHeight)
|
||||
|
||||
// Create bothValSet with both suite validator and altVal
|
||||
bothValSet := tmtypes.NewValidatorSet(append(suite.valSet.Validators, altVal))
|
||||
@ -51,7 +51,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() {
|
||||
|
||||
altSigners := []tmtypes.PrivValidator{altPrivVal}
|
||||
|
||||
heightMinus1 := clienttypes.NewHeight(0, height.EpochHeight-1)
|
||||
heightMinus1 := clienttypes.NewHeight(0, height.VersionHeight-1)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
@ -86,7 +86,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() {
|
||||
"valid misbehaviour with different trusted headers",
|
||||
&types.Misbehaviour{
|
||||
Header1: suite.header,
|
||||
Header2: types.CreateTestHeader(chainID, height, clienttypes.NewHeight(0, height.EpochHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, signers),
|
||||
Header2: types.CreateTestHeader(chainID, height, clienttypes.NewHeight(0, height.VersionHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, signers),
|
||||
ChainId: chainID,
|
||||
ClientId: clientID,
|
||||
},
|
||||
|
||||
@ -23,8 +23,8 @@ import (
|
||||
|
||||
const (
|
||||
chainID = "gaia"
|
||||
chainIDEpoch0 = "gaia-epoch-0"
|
||||
chainIDEpoch1 = "gaia-epoch-1"
|
||||
chainIDEpoch0 = "gaia-version-0"
|
||||
chainIDEpoch1 = "gaia-version-1"
|
||||
clientID = "gaiamainnet"
|
||||
trustingPeriod time.Duration = time.Hour * 24 * 7 * 2
|
||||
ubdPeriod time.Duration = time.Hour * 24 * 7 * 3
|
||||
@ -81,7 +81,7 @@ func (suite *TendermintTestSuite) SetupTest() {
|
||||
pubKey, err := suite.privVal.GetPubKey()
|
||||
suite.Require().NoError(err)
|
||||
|
||||
heightMinus1 := clienttypes.NewHeight(0, height.EpochHeight-1)
|
||||
heightMinus1 := clienttypes.NewHeight(0, height.VersionHeight-1)
|
||||
|
||||
val := tmtypes.NewValidator(pubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 10)
|
||||
suite.valSet = tmtypes.NewValidatorSet([]*tmtypes.Validator{val})
|
||||
|
||||
@ -31,7 +31,7 @@ func CreateTestHeader(chainID string, height, trustedHeight clienttypes.Height,
|
||||
trustedVals *tmproto.ValidatorSet
|
||||
)
|
||||
vsetHash := tmValSet.Hash()
|
||||
blockHeight := int64(height.EpochHeight)
|
||||
blockHeight := int64(height.VersionHeight)
|
||||
tmHeader := tmtypes.Header{
|
||||
Version: tmprotoversion.Consensus{Block: tmversion.BlockProtocol, App: 2},
|
||||
ChainID: chainID,
|
||||
|
||||
@ -22,7 +22,7 @@ import (
|
||||
// - the client or header provided are not parseable to tendermint types
|
||||
// - the header is invalid
|
||||
// - header height is less than or equal to the trusted header height
|
||||
// - header epoch is not equal to trusted header epoch
|
||||
// - header version is not equal to trusted header version
|
||||
// - header valset commit verification fails
|
||||
// - header timestamp is past the trusting period in relation to the consensus state
|
||||
// - header timestamp is less than or equal to the consensus state timestamp
|
||||
@ -33,8 +33,8 @@ import (
|
||||
// If we are updating to a past height, a consensus state is created for that height to be persisted in client store
|
||||
// If we are updating to a future height, the consensus state is created and the client state is updated to reflect
|
||||
// the new latest height
|
||||
// UpdateClient must only be used to update within a single epoch, thus header epoch number and trusted height's epoch
|
||||
// number must be the same. To update to a new epoch, use a separate upgrade path
|
||||
// UpdateClient must only be used to update within a single version, thus header version number and trusted height's version
|
||||
// number must be the same. To update to a new version, use a separate upgrade path
|
||||
// Tendermint client validity checking uses the bisection algorithm described
|
||||
// in the [Tendermint spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md).
|
||||
func (cs ClientState) CheckHeaderAndUpdateState(
|
||||
@ -94,13 +94,13 @@ func checkValidity(
|
||||
return err
|
||||
}
|
||||
|
||||
// UpdateClient only accepts updates with a header at the same epoch
|
||||
// UpdateClient only accepts updates with a header at the same version
|
||||
// as the trusted consensus state
|
||||
if header.GetHeight().GetEpochNumber() != header.TrustedHeight.EpochNumber {
|
||||
if header.GetHeight().GetEpochNumber() != header.TrustedHeight.VersionNumber {
|
||||
return sdkerrors.Wrapf(
|
||||
ErrInvalidHeaderHeight,
|
||||
"header height epoch %d does not match trusted header epoch %d",
|
||||
header.GetHeight().GetEpochNumber(), header.TrustedHeight.EpochNumber,
|
||||
"header height version %d does not match trusted header version %d",
|
||||
header.GetHeight().GetEpochNumber(), header.TrustedHeight.VersionNumber,
|
||||
)
|
||||
}
|
||||
|
||||
@ -128,12 +128,12 @@ func checkValidity(
|
||||
}
|
||||
|
||||
chainID := clientState.GetChainID()
|
||||
// If chainID is in epoch format, then set epoch number of chainID with the epoch number
|
||||
// If chainID is in version format, then set version number of chainID with the version number
|
||||
// of the header we are verifying
|
||||
// This is useful if the update is at a previous epoch rather than an update to the latest epoch
|
||||
// This is useful if the update is at a previous version rather than an update to the latest version
|
||||
// of the client.
|
||||
// The chainID must be set correctly for the previous epoch before attempting verification.
|
||||
// Updates for previous epochs are not supported if the chainID is not in epoch format.
|
||||
// The chainID must be set correctly for the previous version before attempting verification.
|
||||
// Updates for previous epochs are not supported if the chainID is not in version format.
|
||||
if clienttypes.IsEpochFormat(chainID) {
|
||||
chainID, _ = clienttypes.SetEpochNumber(chainID, header.GetHeight().GetEpochNumber())
|
||||
}
|
||||
@ -142,7 +142,7 @@ func checkValidity(
|
||||
// Only Height, Time, and NextValidatorsHash are necessary for verification
|
||||
trustedHeader := tmtypes.Header{
|
||||
ChainID: chainID,
|
||||
Height: int64(header.TrustedHeight.EpochHeight),
|
||||
Height: int64(header.TrustedHeight.VersionHeight),
|
||||
Time: consState.Timestamp,
|
||||
NextValidatorsHash: consState.NextValidatorsHash,
|
||||
}
|
||||
|
||||
@ -26,15 +26,15 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() {
|
||||
altPubKey, err := altPrivVal.GetPubKey()
|
||||
suite.Require().NoError(err)
|
||||
|
||||
epochHeight := int64(height.EpochHeight)
|
||||
versionHeight := int64(height.VersionHeight)
|
||||
|
||||
// create modified heights to use for test-cases
|
||||
heightPlus1 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight+1)
|
||||
heightMinus1 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-1)
|
||||
heightMinus3 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-3)
|
||||
heightPlus5 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight+5)
|
||||
heightPlus1 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight+1)
|
||||
heightMinus1 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-1)
|
||||
heightMinus3 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-3)
|
||||
heightPlus5 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight+5)
|
||||
|
||||
altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), epochHeight)
|
||||
altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), versionHeight)
|
||||
|
||||
// Create bothValSet with both suite validator and altVal. Would be valid update
|
||||
bothValSet := tmtypes.NewValidatorSet(append(suite.valSet.Validators, altVal))
|
||||
@ -96,7 +96,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() {
|
||||
expPass: true,
|
||||
},
|
||||
{
|
||||
name: "successful update for a previous epoch",
|
||||
name: "successful update for a previous version",
|
||||
setup: func() {
|
||||
clientState = types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), &upgradePath, false, false)
|
||||
consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash)
|
||||
@ -116,7 +116,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() {
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
name: "unsuccessful update to a future epoch",
|
||||
name: "unsuccessful update to a future version",
|
||||
setup: func() {
|
||||
clientState = types.NewClientState(chainIDEpoch0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), &upgradePath, false, false)
|
||||
consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash)
|
||||
@ -126,7 +126,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() {
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
name: "unsuccessful update: header height epoch and trusted height epoch mismatch",
|
||||
name: "unsuccessful update: header height version and trusted height version mismatch",
|
||||
setup: func() {
|
||||
clientState = types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false)
|
||||
consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash)
|
||||
@ -213,7 +213,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() {
|
||||
consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash)
|
||||
newHeader = types.CreateTestHeader(chainID, heightPlus1, height, suite.headerTime, suite.valSet, suite.valSet, signers)
|
||||
// cause new header to fail validatebasic by changing commit height to mismatch header height
|
||||
newHeader.SignedHeader.Commit.Height = epochHeight - 1
|
||||
newHeader.SignedHeader.Commit.Height = versionHeight - 1
|
||||
currentTime = suite.now
|
||||
},
|
||||
expPass: false,
|
||||
|
||||
@ -58,8 +58,8 @@ func (cs ClientState) Validate() error {
|
||||
if strings.TrimSpace(cs.ChainId) == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidChainID, "chain id cannot be blank")
|
||||
}
|
||||
if cs.Height.EpochHeight == 0 {
|
||||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "local epoch height cannot be zero")
|
||||
if cs.Height.VersionHeight == 0 {
|
||||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "local version height cannot be zero")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -80,8 +80,8 @@ func (cs *ClientState) CheckHeaderAndUpdateState(
|
||||
) (exported.ClientState, exported.ConsensusState, error) {
|
||||
// use the chain ID from context since the localhost client is from the running chain (i.e self).
|
||||
cs.ChainId = ctx.ChainID()
|
||||
epoch := clienttypes.ParseChainID(cs.ChainId)
|
||||
cs.Height = clienttypes.NewHeight(epoch, uint64(ctx.BlockHeight()))
|
||||
version := clienttypes.ParseChainID(cs.ChainId)
|
||||
cs.Height = clienttypes.NewHeight(version, uint64(ctx.BlockHeight()))
|
||||
return cs, nil, nil
|
||||
}
|
||||
|
||||
|
||||
@ -13,44 +13,50 @@ IBC Client Heights are represented by the struct:
|
||||
|
||||
```go
|
||||
type Height struct {
|
||||
EpochNumber uint64
|
||||
EpochHeight uint64
|
||||
VersionNumber uint64
|
||||
VersionHeight uint64
|
||||
}
|
||||
```
|
||||
|
||||
The `EpochNumber` represents the epoch of the chain that the height is representing.
|
||||
An epoch typically represents a continuous, monotonically increasing range of block-heights.
|
||||
The `EpochHeight` represents the height of the chain within the given epoch.
|
||||
The `VersionNumber` represents the version of the chain that the height is representing.
|
||||
An version typically represents a continuous, monotonically increasing range of block-heights.
|
||||
The `VersionHeight` represents the height of the chain within the given version.
|
||||
|
||||
On any reset of the `EpochHeight`, for example, when hard-forking a Tendermint chain,
|
||||
the `EpochNumber` will get incremented. This allows IBC clients to distinguish between a
|
||||
block-height `n` of a previous version of the chain (at epoch `p`) and block-height `n` of the current
|
||||
version of the chain (at epoch `e`).
|
||||
On any reset of the `VersionHeight`, for example, when hard-forking a Tendermint chain,
|
||||
the `VersionNumber` will get incremented. This allows IBC clients to distinguish between a
|
||||
block-height `n` of a previous version of the chain (at version `p`) and block-height `n` of the current
|
||||
version of the chain (at version `e`).
|
||||
|
||||
`Heights` that share the same epoch number can be compared by simply comparing their respective `EpochHeights`.
|
||||
Heights that do not share the same epoch number will only be compared using their respective `EpochNumbers`.
|
||||
Thus a height `h` with epoch number `e+1` will always be greater than a height `g` with epoch number `e`,
|
||||
**REGARDLESS** of the difference in epoch heights.
|
||||
`Heights` that share the same version number can be compared by simply comparing their respective `EpochHeights`.
|
||||
Heights that do not share the same version number will only be compared using their respective `EpochNumbers`.
|
||||
Thus a height `h` with version number `e+1` will always be greater than a height `g` with version number `e`,
|
||||
**REGARDLESS** of the difference in version heights.
|
||||
|
||||
Ex: `Height{EpochNumber: 3, EpochHeight: 0} > Height{EpochNumber: 2, EpochHeight: 100000000000}`
|
||||
Ex:
|
||||
|
||||
When a Tendermint chain is running a particular version, relayers can simply submit headers and proofs with the epoch number
|
||||
given by the chain's chainID, and the epoch height given by the Tendermint block height. When a chain updates using a hard-fork
|
||||
and resets its block-height, it is responsible for updating its chain-id to increment the epoch number.
|
||||
IBC Tendermint clients then verifies the epoch number against their `ChainId` and treat the `EpochHeight` as the Tendermint block-height.
|
||||
```go
|
||||
Height{VersionNumber: 3, VersionHeight: 0} > Height{VersionNumber: 2, VersionHeight: 100000000000}
|
||||
```
|
||||
|
||||
When a Tendermint chain is running a particular version, relayers can simply submit headers and proofs with the version number
|
||||
given by the chain's chainID, and the version height given by the Tendermint block height. When a chain updates using a hard-fork
|
||||
and resets its block-height, it is responsible for updating its chain-id to increment the version number.
|
||||
IBC Tendermint clients then verifies the version number against their `ChainId` and treat the `VersionHeight` as the Tendermint block-height.
|
||||
|
||||
Tendermint chains wishing to use epochs to maintain persistent IBC connections even across height-resetting upgrades must format their chain-ids
|
||||
in the following manner: `{chainID}-{version}`. On any height-resetting upgrade, the chainID **MUST** be updated with a higher epoch number
|
||||
in the following manner: `{chainID}-{version_number}`. On any height-resetting upgrade, the chainID **MUST** be updated with a higher version number
|
||||
than the previous value.
|
||||
|
||||
Ex:
|
||||
Before upgrade ChainID: `gaiamainnet-3`
|
||||
After upgrade ChainID: `gaiamainnet-4`
|
||||
|
||||
Clients that do not require epochs, such as the solo-machine client, simply hardcode `0` into the epoch number whenever they
|
||||
need to return an IBC height when implementing IBC interfaces and use the `EpochHeight` exclusively.
|
||||
- Before upgrade ChainID: `gaiamainnet-3`
|
||||
- After upgrade ChainID: `gaiamainnet-4`
|
||||
|
||||
Other client-types may implement their own logic to verify the IBC Heights that relayers provide in their Update, Misbehavior, and
|
||||
Verify functions respectively.
|
||||
Clients that do not require epochs, such as the solo-machine client, simply hardcode `0` into the version number whenever they
|
||||
need to return an IBC height when implementing IBC interfaces and use the `VersionHeight` exclusively.
|
||||
|
||||
Other client-types may implement their own logic to verify the IBC Heights that relayers provide in their `Update`, `Misbehavior`, and
|
||||
`Verify` functions respectively.
|
||||
|
||||
The IBC interfaces expect an `ibcexported.Height` interface, however all clients should use the concrete implementation provided in
|
||||
`02-client/types` and reproduced above.
|
||||
|
||||
@ -191,12 +191,12 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) {
|
||||
proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof)
|
||||
require.NoError(chain.t, err)
|
||||
|
||||
epoch := clienttypes.ParseChainID(chain.ChainID)
|
||||
version := clienttypes.ParseChainID(chain.ChainID)
|
||||
|
||||
// proof height + 1 is returned as the proof created corresponds to the height the proof
|
||||
// was created in the IAVL tree. Tendermint and subsequently the clients that rely on it
|
||||
// have heights 1 above the IAVL tree. Thus we return proof height + 1
|
||||
return proof, clienttypes.NewHeight(epoch, uint64(res.Height)+1)
|
||||
return proof, clienttypes.NewHeight(version, uint64(res.Height)+1)
|
||||
}
|
||||
|
||||
// QueryUpgradeProof performs an abci query with the given key and returns the proto encoded merkle proof
|
||||
@ -216,12 +216,12 @@ func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, cl
|
||||
proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof)
|
||||
require.NoError(chain.t, err)
|
||||
|
||||
epoch := clienttypes.ParseChainID(chain.ChainID)
|
||||
version := clienttypes.ParseChainID(chain.ChainID)
|
||||
|
||||
// proof height + 1 is returned as the proof created corresponds to the height the proof
|
||||
// was created in the IAVL tree. Tendermint and subsequently the clients that rely on it
|
||||
// have heights 1 above the IAVL tree. Thus we return proof height + 1
|
||||
return proof, clienttypes.NewHeight(epoch, uint64(res.Height+1))
|
||||
return proof, clienttypes.NewHeight(version, uint64(res.Height+1))
|
||||
}
|
||||
|
||||
// QueryClientStateProof performs and abci query for a client state
|
||||
@ -482,13 +482,13 @@ func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, c
|
||||
// since the last trusted validators for a header at height h
|
||||
// is the NextValidators at h+1 committed to in header h by
|
||||
// NextValidatorsHash
|
||||
tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.EpochHeight + 1))
|
||||
tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.VersionHeight + 1))
|
||||
if !ok {
|
||||
return nil, sdkerrors.Wrapf(ibctmtypes.ErrInvalidHeaderHeight, "could not retrieve trusted validators at trustedHeight: %d", trustedHeight)
|
||||
}
|
||||
}
|
||||
// inject trusted fields into last header
|
||||
// for now assume epoch number is 0
|
||||
// for now assume version number is 0
|
||||
header.TrustedHeight = trustedHeight
|
||||
|
||||
trustedVals, err := tmTrustedVals.ToProto()
|
||||
|
||||
@ -102,7 +102,7 @@ func (solo *Solomachine) ConsensusState() *solomachinetypes.ConsensusState {
|
||||
}
|
||||
}
|
||||
|
||||
// GetHeight returns an exported.Height with Sequence as EpochHeight
|
||||
// GetHeight returns an exported.Height with Sequence as VersionHeight
|
||||
func (solo *Solomachine) GetHeight() exported.Height {
|
||||
return clienttypes.NewHeight(0, solo.Sequence)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user