From fec543d4f8e72caf6543423c22ef94fa52a5fc05 Mon Sep 17 00:00:00 2001 From: psaradev Date: Tue, 26 Jan 2021 23:28:34 +1000 Subject: [PATCH 01/23] power reduction as on-chain param --- proto/cosmos/staking/v1beta1/staking.proto | 5 + x/staking/types/staking.pb.go | 1494 ++++++++++---------- 2 files changed, 778 insertions(+), 721 deletions(-) diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index eadc86e9d13a..456655cb86ea 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -238,6 +238,11 @@ message Params { uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; + string power_reduction = 6 [ + (gogoproto.moretags) = "yaml:\"power_reduction\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; } // DelegationResponse is equivalent to Delegation except that it contains a diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index b97e1224c45a..81c4caf82145 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -795,11 +795,12 @@ var xxx_messageInfo_Redelegation proto.InternalMessageInfo // Params defines the parameters for the staking module. type Params struct { - UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` - MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` - MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` - HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` - BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` + UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` + MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` + MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` + HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` + BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` + PowerReduction github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=power_reduction,json=powerReduction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"power_reduction" yaml:"power_reduction"` } func (m *Params) Reset() { *m = Params{} } @@ -1094,120 +1095,121 @@ func init() { } var fileDescriptor_64c30c6cf92913c9 = []byte{ - // 1796 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6c, 0x23, 0x49, - 0x15, 0x76, 0x3b, 0x5e, 0xc7, 0x7e, 0x4e, 0xe2, 0xa4, 0x26, 0x33, 0xeb, 0x98, 0xc1, 0xed, 0x6d, - 0x56, 0x4b, 0x40, 0xbb, 0x0e, 0x93, 0x45, 0x8b, 0xc8, 0x05, 0xc6, 0x71, 0x86, 0x58, 0xbb, 0x0c, - 0xa1, 0x93, 0x09, 0x12, 0xac, 0xb0, 0xca, 0xdd, 0x15, 0xa7, 0x89, 0xbb, 0xdb, 0x74, 0x95, 0x87, - 0x58, 0xda, 0x03, 0xc7, 0x65, 0x10,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 0xda, 0xdd, 0xb0, 0x77, 0x44, 0x50, 0xd9, 0x34, 0xd4, 0x14, 0x8b, 0x61, 0xae, 0x46, 0x34, - 0x05, 0x95, 0x32, 0x73, 0x0f, 0x16, 0xe5, 0x69, 0x29, 0xda, 0x81, 0x97, 0x06, 0xfc, 0x87, 0xb0, - 0xae, 0xb4, 0x5d, 0x9b, 0x99, 0xbc, 0x82, 0x5f, 0x85, 0x4f, 0x8a, 0x18, 0xbf, 0xca, 0x02, 0xb4, - 0x8e, 0x8f, 0x8f, 0x02, 0x67, 0xd0, 0x27, 0xec, 0xd3, 0xb4, 0xfc, 0x08, 0xae, 0xc6, 0x66, 0xd1, - 0xc0, 0x4a, 0x59, 0x5f, 0x9f, 0x8c, 0xf5, 0xeb, 0x69, 0xeb, 0x13, 0x6c, 0x86, 0x79, 0x25, 0xa2, - 0x1f, 0x06, 0xd6, 0xa5, 0xa8, 0x36, 0x65, 0x11, 0xea, 0xc2, 0x6c, 0xd4, 0x04, 0x5b, 0x12, 0xb5, - 0x45, 0xd9, 0xe5, 0xae, 0x3d, 0x84, 0x52, 0xec, 0x12, 0x8a, 0x5a, 0x50, 0x60, 0xea, 0xb7, 0xf2, - 0xb0, 0x31, 0xdb, 0xc3, 0xa1, 0x98, 0xf2, 0x72, 0x24, 0x69, 0xfc, 0x47, 0x03, 0x88, 0x73, 0xf6, - 0xc5, 0x4c, 0x31, 0xde, 0xca, 0x55, 0xe3, 0x5d, 0x78, 0xae, 0x51, 0x4d, 0x49, 0xa7, 0xfc, 0xf9, - 0xf3, 0x2c, 0x5c, 0xb9, 0x13, 0x76, 0x9e, 0x17, 0xde, 0x07, 0x07, 0xb0, 0x48, 0x3c, 0x16, 0x38, - 0xc2, 0x09, 0x3c, 0xda, 0x5f, 0x99, 0x15, 0xed, 0x4b, 0x6c, 0xda, 0xf3, 0x58, 0x30, 0x52, 0xb1, - 0x0f, 0x61, 0x52, 0xde, 0xf8, 0xe5, 0x02, 0x54, 0x66, 0x49, 0x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ed, 0xdb, 0xdf, 0x5a, 0xcd, 0x56, 0x97, - 0xef, 0xdd, 0xaf, 0x17, 0xa3, 0xa1, 0x0d, 0x19, 0x80, 0x92, 0x9c, 0x0a, 0x6f, 0xa1, 0x0a, 0xf7, - 0xee, 0xd7, 0xf3, 0xd2, 0x81, 0xd5, 0xdc, 0xfb, 0x1f, 0xd5, 0x32, 0xcd, 0x5b, 0x9f, 0x3c, 0xaa, - 0x69, 0x0f, 0x1f, 0xd5, 0xb4, 0xbf, 0x3f, 0xaa, 0x69, 0x1f, 0x3c, 0xae, 0x65, 0x1e, 0x3e, 0xae, - 0x65, 0xfe, 0xfc, 0xb8, 0x96, 0xf9, 0xfe, 0xeb, 0x4f, 0xf4, 0xdd, 0x79, 0xf4, 0x51, 0x5b, 0x78, - 0xb1, 0x9b, 0x17, 0x6d, 0xf8, 0xcd, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x48, 0x4c, 0x86, - 0xf3, 0x16, 0x00, 0x00, + // 1822 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6c, 0x23, 0x57, + 0x19, 0xf7, 0xc4, 0xae, 0x63, 0x7f, 0x4e, 0xe2, 0xe4, 0x6d, 0x76, 0xeb, 0x98, 0xc5, 0xe3, 0x0e, + 0x55, 0x09, 0xa8, 0x75, 0xd8, 0x14, 0x15, 0x91, 0x0b, 0xac, 0xe3, 0x2c, 0xb1, 0x5a, 0x96, 0x30, + 0xc9, 0x06, 0x09, 0x2a, 0xac, 0xe7, 0x99, 0x17, 0x67, 0x88, 0x67, 0xc6, 0xcc, 0x7b, 0xde, 0xc6, + 0x52, 0x0f, 0x1c, 0xcb, 0x22, 0x44, 0xb9, 0xf5, 0xb2, 0xd2, 0x4a, 0xbd, 0x56, 0xe2, 0x82, 0xb8, + 0x72, 0x2d, 0x70, 0x59, 0x6e, 0x08, 0x21, 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x47, 0x6c, 0xb4, 0x09, + 0x57, 0xa7, 0xf9, 0xda, 0xb7, 0xbf, 0xb5, 0xba, 0x50, 0x5d, 0xbe, 0x77, 0xbf, 0x5e, 0x8c, 0xe6, + 0x44, 0x64, 0x00, 0x4a, 0x72, 0x2a, 0xbc, 0x6c, 0x15, 0xee, 0xdd, 0xaf, 0xe7, 0xa5, 0x03, 0xab, + 0xb9, 0xf7, 0x3e, 0xac, 0x65, 0x9a, 0xb7, 0x3e, 0x7e, 0x54, 0xd3, 0x1e, 0x3e, 0xaa, 0x69, 0x7f, + 0x7b, 0x54, 0xd3, 0xde, 0x7f, 0x5c, 0xcb, 0x3c, 0x7c, 0x5c, 0xcb, 0xfc, 0xe9, 0x71, 0x2d, 0xf3, + 0xfd, 0x57, 0x9f, 0xe8, 0xbb, 0xf3, 0xe8, 0x3b, 0xba, 0xf0, 0x62, 0x37, 0x2f, 0x3a, 0xff, 0xeb, + 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x90, 0x8f, 0x24, 0x66, 0x17, 0x00, 0x00, } func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { @@ -1216,608 +1218,609 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 9603 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, - 0x71, 0xd8, 0xcd, 0xee, 0x02, 0xd8, 0x6d, 0x2c, 0x80, 0xc5, 0x03, 0xee, 0x6e, 0x6f, 0x79, 0x04, - 0xc0, 0xe1, 0xd7, 0xf1, 0x48, 0x02, 0xe4, 0x91, 0x77,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, 0x18, 0x0e, 0x24, 0xe0, 0xe8, 0x2e, 0xc8, - 0xbe, 0xa8, 0x5e, 0x51, 0x2b, 0x62, 0x51, 0xc5, 0x34, 0x31, 0x4c, 0x60, 0x1b, 0x7c, 0x61, 0xf5, - 0x08, 0x4c, 0x52, 0x14, 0xb3, 0xe9, 0x62, 0xbb, 0xa2, 0xd5, 0x55, 0xc7, 0xa1, 0x4a, 0x4b, 0x53, - 0x54, 0x44, 0xea, 0xd6, 0x49, 0xd5, 0x82, 0xa8, 0x41, 0x67, 0x61, 0x82, 0x52, 0x34, 0x9a, 0x75, - 0x57, 0xb7, 0xea, 0xb8, 0x42, 0x96, 0x79, 0x0e, 0x0d, 0x39, 0x9e, 0x64, 0xe3, 0x04, 0x63, 0x95, - 0x23, 0x10, 0x89, 0x1c, 0xb4, 0x08, 0x77, 0x52, 0xb2, 0x1a, 0x36, 0xb0, 0xad, 0xba, 0xb8, 0x82, - 0x5f, 0x6a, 0xaa, 0x75, 0xa7, 0xa2, 0x1a, 0xd5, 0xca, 0x9e, 0xea, 0xec, 0xe5, 0x27, 0x09, 0x83, - 0x52, 0x22, 0x2f, 0x29, 0x27, 0x08, 0xe2, 0x12, 0xc7, 0x2b, 0x53, 0xb4, 0x79, 0xa3, 0x7a, 0x51, - 0x75, 0xf6, 0x50, 0x11, 0x8e, 0x51, 0x2e, 0x8e, 0x6b, 0xeb, 0x46, 0xad, 0xa2, 0xed, 0x61, 0x6d, - 0xbf, 0xd2, 0x74, 0x77, 0x9f, 0xcc, 0xdf, 0x11, 0x6c, 0x9f, 0x4a, 0xb8, 0x49, 0x71, 0x16, 0x08, - 0xca, 0xb6, 0xbb, 0xfb, 0x24, 0xda, 0x84, 0x2c, 0x19, 0x8c, 0x86, 0xfe, 0x32, 0xae, 0xec, 0x9a, - 0x36, 0x8d, 0xa1, 0xa3, 0x6d, 0x5c, 0x53, 0x40, 0x83, 0xb3, 0xeb, 0x9c, 0x60, 0xd5, 0xac, 0xe2, - 0xe2,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1, 0x37, 0xb4, 0x2a, - 0xaa, 0xa6, 0x61, 0xc7, 0x31, 0x59, 0x20, 0xf4, 0xb8, 0x9c, 0x34, 0xcc, 0x4d, 0x8e, 0xec, 0x47, - 0x88, 0x79, 0x8e, 0x1a, 0x31, 0xdf, 0x64, 0x27, 0xf3, 0xbd, 0x03, 0x32, 0x0d, 0xd5, 0xaa, 0x60, - 0xc3, 0xb5, 0x0f, 0x68, 0x7e, 0x9e, 0x56, 0xd2, 0x0d, 0xd5, 0x2a, 0x93, 0xf2, 0x0f, 0x65, 0x99, - 0xf4, 0x6c, 0x2a, 0x9d, 0xce, 0x65, 0x9e, 0x4d, 0xa5, 0x33, 0x39, 0x90, 0x5f, 0x4f, 0x42, 0x36, - 0x98, 0xaf, 0x93, 0xe5, 0x8f, 0x46, 0x23, 0x96, 0x44, 0x7d, 0xda, 0xdd, 0x5d, 0xb3, 0xfb, 0xd9, - 0x05, 0x12, 0xca, 0x8a, 0x83, 0x2c, 0x39, 0x56, 0x18, 0x25, 0x49, 0x23, 0x88, 0xb1, 0x61, 0x96, - 0x8c, 0xa4, 0x15, 0x5e, 0x42, 0x4b, 0x30, 0xf8, 0xa2, 0x43, 0x79, 0x0f, 0x52, 0xde, 0xf7, 0x74, - 0xe7, 0xfd, 0xec, 0x26, 0x65, 0x9e, 0x79, 0x76, 0xb3, 0xb2, 0xb6, 0xae, 0xac, 0xce, 0xaf, 0x28, - 0x9c, 0x1c, 0x9d, 0x80, 0x54, 0x5d, 0x7d, 0xf9, 0x20, 0x1c, 0xf4, 0x28, 0xa8, 0xd7, 0x41, 0x38, - 0x01, 0xa9, 0xab, 0x58, 0xdd, 0x0f, 0x87, 0x1a, 0x0a, 0xba, 0x8d, 0x93, 0x61, 0x0e, 0x06, 0xa8, - 0xbe, 0x10, 0x00, 0xd7, 0x58, 0xee, 0x08, 0x4a, 0x43, 0x6a, 0x61, 0x5d, 0x21, 0x13, 0x22, 0x07, - 0x59, 0x06, 0xad, 0x6c, 0x2c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x62, 0x12, 0x4f, 0xfd, 0x21, 0xa1, - 0x75, 0x41, 0x52, 0x7c, 0x06, 0x32, 0x5e, 0xb0, 0x89, 0xa7, 0xff, 0x30, 0xa7, 0xf7, 0x69, 0x88, - 0x06, 0x02, 0xc1, 0x2e, 0x9e, 0xc5, 0x5f, 0x17, 0x1a, 0x08, 0x50, 0x91, 0x69, 0x14, 0x4d, 0x60, - 0xe2, 0x39, 0x7d, 0x44, 0x4c, 0xa3, 0x48, 0xfe, 0x42, 0x46, 0x93, 0xfa, 0xfc, 0x78, 0x16, 0x3f, - 0x2b, 0x46, 0x93, 0xe2, 0x13, 0x31, 0xa2, 0x19, 0x41, 0x3c, 0x8f, 0xbf, 0x21, 0xc4, 0x88, 0x24, - 0x04, 0xc5, 0x0d, 0x40, 0xad, 0xd9, 0x40, 0x3c, 0xbf, 0x8f, 0x72, 0x7e, 0xe3, 0x2d, 0xc9, 0x40, - 0xf1, 0x79, 0x38, 0xd6, 0x3e, 0x13, 0x88, 0xe7, 0xfa, 0xb1, 0xef, 0x45, 0xd6, 0x6e, 0xc1, 0x44, - 0xa0, 0xb8, 0xe5, 0x87, 0x94, 0x60, 0x16, 0x10, 0xcf, 0xf6, 0xb5, 0xef, 0x85, 0x1d, 0x77, 0x30, - 0x09, 0x28, 0xce, 0x03, 0xf8, 0x01, 0x38, 0x9e, 0xd7, 0xc7, 0x39, 0xaf, 0x00, 0x11, 0x99, 0x1a, - 0x3c, 0xfe, 0xc6, 0xd3, 0x5f, 0x17, 0x53, 0x83, 0x53, 0x90, 0xa9, 0x21, 0x42, 0x6f, 0x3c, 0xf5, - 0x27, 0xc4, 0xd4, 0x10, 0x24, 0xc4, 0xb2, 0x03, 0xd1, 0x2d, 0x9e, 0xc3, 0xa7, 0x84, 0x65, 0x07, - 0xa8, 0x8a, 0x6b, 0x30, 0xde, 0x12, 0x10, 0xe3, 0x59, 0xfd, 0x02, 0x67, 0x95, 0x8b, 0xc6, 0xc3, - 0x60, 0xf0, 0xe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, 0x83, 0x5c, 0x19, 0x6f, 0x86, 0x21, - 0xae, 0x56, 0x6e, 0x9d, 0x77, 0xce, 0xb6, 0x06, 0xa6, 0x59, 0x2f, 0x80, 0x70, 0x7e, 0x82, 0x06, - 0xdd, 0x07, 0x69, 0x6d, 0x4f, 0xd5, 0x8d, 0x8a, 0x5e, 0x15, 0x69, 0xde, 0xeb, 0x37, 0xa6, 0x87, - 0x16, 0x08, 0x6c, 0x79, 0x51, 0x19, 0xa2, 0x95, 0xcb, 0x55, 0x92, 0x09, 0xec, 0x61, 0xbd, 0xb6, - 0xe7, 0xf2, 0x19, 0xc6, 0x4b, 0xe8, 0x49, 0x48, 0x11, 0x83, 0xe0, 0x0f, 0xbb, 0x0a, 0x2d, 0xc9, - 0xb6, 0xb7, 0xe2, 0x29, 0xa5, 0x49, 0xc3, 0x1f, 0xfa, 0xfd, 0x69, 0x49, 0xa1, 0x14, 0x68, 0x01, - 0x46, 0xea, 0xaa, 0xe3, 0x56, 0x68, 0x04, 0x23, 0xcd, 0x0f, 0x50, 0x16, 0x27, 0x5a, 0x15, 0xc2, - 0x15, 0xcb, 0x45, 0x1f, 0x26, 0x54, 0x0c, 0x54, 0x45, 0xa7, 0x20, 0x47, 0x99, 0x68, 0x66, 0xa3, - 0xa1, 0xbb, 0x2c, 0xb7, 0x1a, 0xa4, 0x7a, 0x1f, 0x25, 0xf0, 0x05, 0x0a, 0xa6, 0x19, 0xd6, 0x1d, - 0x90, 0xa1, 0x4f, 0x49, 0x28, 0x0a, 0xbb, 0x36, 0x99, 0x26, 0x00, 0x5a, 0x79, 0x3f, 0x8c, 0xf9, - 0xfe, 0x91, 0xa1, 0xa4, 0x19, 0x17, 0x1f, 0x4c, 0x11, 0x1f, 0x81, 0x49, 0x03, 0x5f, 0xa3, 0x17, - 0x39, 0x43, 0xd8, 0x19, 0x8a, 0x8d, 0x48, 0xdd, 0xe5, 0x30, 0xc5, 0xbd, 0x30, 0xaa, 0x09, 0xe5, - 0x33, 0x5c, 0xa0, 0xb8, 0x23, 0x1e, 0x94, 0xa2, 0x9d, 0x80, 0xb4, 0x6a, 0x59, 0x0c, 0x61, 0x98, - 0xfb, 0x47, 0xcb, 0xa2, 0x55, 0xa7, 0x61, 0x9c, 0xf6, 0xd1, 0xc6, 0x4e, 0xb3, 0xee, 0x72, 0x26, - 0x59, 0x8a, 0x33, 0x46, 0x2a, 0x14, 0x06, 0xa7, 0xb8, 0x77, 0xc3, 0x08, 0xbe, 0xa2, 0x57, 0xb1, - 0xa1, 0x61, 0x86, 0x37, 0x42, 0xf1, 0xb2, 0x02, 0x48, 0x91, 0x1e, 0x00, 0xcf, 0xef, 0x55, 0x84, - 0x4f, 0x1e, 0x65, 0xfc, 0x04, 0x7c, 0x9e, 0x81, 0xe5, 0x3c, 0xa4, 0x16, 0x55, 0x57, 0x25, 0x09, - 0x86, 0x7b, 0x8d, 0x05, 0x9a, 0xac, 0x42, 0x7e, 0xca, 0x6f, 0x24, 0x20, 0x75, 0xd9, 0x74, 0x31, - 0x7a, 0x2c, 0x90, 0x00, 0x8e, 0xb6, 0xb3, 0xe7, 0x4d, 0xbd, 0x66, 0xe0, 0xea, 0xaa, 0x53, 0x0b, - 0xbc, 0xfb, 0xf6, 0xcd, 0x29, 0x11, 0x32, 0xa7, 0x49, 0x18, 0xb0, 0xcd, 0xa6, 0x51, 0x15, 0x37, - 0x0e, 0x69, 0x01, 0x95, 0x21, 0xed, 0x59, 0x49, 0x2a, 0xce, 0x4a, 0xc6, 0x88, 0x95, 0x10, 0x1b, - 0xe6, 0x00, 0x65, 0x68, 0x87, 0x1b, 0x4b, 0x09, 0x32, 0x9e, 0xf3, 0xe2, 0xd6, 0xd6, 0x9b, 0xc1, - 0xfa, 0x64, 0x24, 0x98, 0x78, 0x63, 0xef, 0x29, 0x8f, 0x59, 0x5c, 0xce, 0xab, 0xe0, 0xda, 0x0b, - 0x99, 0x15, 0x7f, 0x83, 0x3e, 0x44, 0xfb, 0xe5, 0x9b, 0x15, 0x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, 0x74, 0x43, - 0x77, 0x75, 0xb5, 0x5e, 0xd9, 0x51, 0xeb, 0xaa, 0xa1, 0x1d, 0x26, 0x6b, 0x66, 0x2e, 0x9f, 0x37, - 0x1b, 0x61, 0x27, 0x2b, 0xa3, 0x1c, 0x52, 0x62, 0x00, 0x74, 0x11, 0x86, 0x44, 0x53, 0xa9, 0x43, - 0x65, 0x1b, 0x82, 0x3c, 0x90, 0xe0, 0xfd, 0x4c, 0x12, 0xc6, 0x15, 0x5c, 0xfd, 0xff, 0x43, 0xd1, - 0xdf, 0x50, 0xac, 0x02, 0xb0, 0xe9, 0x4e, 0x1c, 0xec, 0x21, 0x46, 0x83, 0x38, 0x8c, 0x0c, 0xe3, - 0xb0, 0xe8, 0xb8, 0x81, 0xf1, 0xb8, 0x91, 0x80, 0x6c, 0x70, 0x3c, 0xfe, 0x82, 0x46, 0x25, 0xb4, - 0xec, 0x7b, 0xa2, 0x14, 0xff, 0x44, 0x68, 0x07, 0x4f, 0xd4, 0x62, 0xbd, 0xdd, 0x5d, 0xd0, 0xff, - 0x48, 0xc0, 0xe0, 0x86, 0x6a, 0xab, 0x0d, 0x07, 0x69, 0x2d, 0x99, 0xa6, 0xd8, 0x7e, 0x6c, 0xf9, - 0x10, 0x34, 0xdf, 0xed, 0x88, 0x49, 0x34, 0x3f, 0xda, 0x26, 0xd1, 0xfc, 0x09, 0x18, 0x25, 0xcb, - 0xe1, 0xc0, 0x15, 0x06, 0xa2, 0xed, 0x91, 0xd2, 0x09, 0x9f, 0x4b, 0xb8, 0x9e, 0xad, 0x96, 0x2f, - 0x07, 0xef, 0x30, 0x0c, 0x13, 0x0c, 0xdf, 0x31, 0x13, 0xf2, 0x63, 0xfe, 0xb2, 0x34, 0x50, 0x29, - 0x2b, 0xd0, 0x50, 0xaf, 0x95, 0x59, 0x01, 0xad, 0x00, 0xda, 0xf3, 0x76, 0x46, 0x2a, 0xbe, 0x3a, - 0x09, 0xfd, 0x9d, 0x37, 0x6f, 0x4c, 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 0x8b, 0x1d, - 0x1f, 0x6f, 0x4f, 0x5e, 0xb5, 0xf4, 0x59, 0x82, 0xa0, 0x34, 0xeb, 0x58, 0x61, 0x28, 0xa8, 0x0c, - 0xd3, 0xbb, 0xcd, 0x7a, 0xfd, 0xa0, 0x52, 0xc5, 0xf4, 0x7f, 0xf7, 0x78, 0x5f, 0xbf, 0xc7, 0xd7, - 0x2c, 0x55, 0x7c, 0x43, 0x8f, 0xe8, 0xe6, 0x24, 0x45, 0x5b, 0xa4, 0x58, 0xe2, 0xcb, 0xf7, 0x65, - 0x81, 0x23, 0xff, 0x5e, 0x02, 0xd2, 0x82, 0x35, 0xbd, 0x21, 0x8e, 0xeb, 0x58, 0x73, 0x4d, 0x71, - 0x62, 0xe2, 0x95, 0x11, 0x82, 0x64, 0x8d, 0x0f, 0x51, 0xe6, 0xe2, 0x11, 0x85, 0x14, 0x08, 0xcc, - 0xbb, 0xb7, 0x4f, 0x60, 0x56, 0x93, 0x8c, 0x5a, 0xca, 0x32, 0xc5, 0xd2, 0xec, 0xe2, 0x11, 0x85, - 0x96, 0x50, 0x1e, 0x06, 0xc9, 0xcc, 0x70, 0xd9, 0x87, 0x09, 0x09, 0x9c, 0x97, 0xd1, 0x31, 0x18, - 0xb0, 0x54, 0x57, 0x63, 0x57, 0xea, 0x48, 0x05, 0x2b, 0xa2, 0x27, 0x60, 0x90, 0x3d, 0x08, 0x8d, - 0xfe, 0x63, 0x0c, 0xa2, 0x0c, 0xf6, 0xe5, 0x2d, 0x22, 0xf7, 0x86, 0xea, 0xba, 0xd8, 0x36, 0x08, - 0x43, 0x86, 0x8e, 0x10, 0xa4, 0x76, 0xcc, 0xea, 0x01, 0xff, 0x67, 0x1d, 0xf4, 0x37, 0xff, 0xef, - 0x00, 0xd4, 0x1e, 0x2a, 0xb4, 0x92, 0xfd, 0x8f, 0xa2, 0xac, 0x00, 0x96, 0x08, 0x52, 0x19, 0x26, - 0xd4, 0x6a, 0x55, 0x67, 0xff, 0x37, 0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xae, 0xc1, 0xb1, 0xe7, 0x48, 0xdb, 0xfe, - 0x32, 0x59, 0x38, 0xf6, 0x63, 0xde, 0x69, 0x9e, 0xc4, 0xff, 0x01, 0x98, 0x38, 0xa9, 0x03, 0x5f, - 0x3e, 0xbe, 0x40, 0xbc, 0x6f, 0xb6, 0x63, 0xbc, 0x98, 0x0d, 0x04, 0x0b, 0x25, 0x40, 0x29, 0xff, - 0xb2, 0x04, 0xc7, 0x5b, 0x9a, 0xe6, 0x3e, 0x7e, 0xa9, 0xcd, 0x53, 0x85, 0x43, 0x65, 0x36, 0x4b, - 0x6d, 0x84, 0xbd, 0x3f, 0x56, 0x58, 0x26, 0x45, 0x48, 0xda, 0xa7, 0xe1, 0x68, 0x58, 0x58, 0xa1, - 0xa6, 0x7b, 0x61, 0x34, 0xbc, 0x23, 0xcc, 0xd5, 0x35, 0x12, 0xda, 0x13, 0x96, 0x2b, 0x51, 0x3d, - 0x7b, 0x7d, 0x2d, 0x43, 0xc6, 0x43, 0xe5, 0x29, 0x70, 0xcf, 0x5d, 0xf5, 0x29, 0xe5, 0x0f, 0x4b, - 0x30, 0x13, 0x6e, 0x21, 0x90, 0x0c, 0xf5, 0x27, 0xec, 0x2d, 0x1b, 0xe2, 0x37, 0x24, 0xb8, 0xab, - 0x8b, 0x4c, 0x5c, 0x01, 0x2f, 0xc3, 0x64, 0x60, 0x27, 0x40, 0xb8, 0x70, 0x31, 0xec, 0xa7, 0xe3, - 0xd3, 0x50, 0x6f, 0xe1, 0x7b, 0x07, 0x51, 0xca, 0x67, 0x7f, 0x7f, 0x7a, 0xa2, 0xb5, 0xce, 0x51, - 0x26, 0x5a, 0x57, 0xef, 0xb7, 0xd0, 0x3e, 0x5e, 0x93, 0xe0, 0x81, 0x70, 0x57, 0xdb, 0xe4, 0xb3, - 0x3f, 0xaa, 0x71, 0xf8, 0xf7, 0x12, 0x9c, 0xee, 0x45, 0x38, 0x3e, 0x20, 0x3b, 0x30, 0xe1, 0x67, - 0xda, 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x0f, 0xb4, 0x0f, 0x23, 0xe1, 0xc8, 0x71, 0xaa, 0x0b, 0x93, 0x10, 0x66, 0xe1, 0x91, 0x5e, 0x31, - 0xbd, 0xc6, 0xde, 0x0e, 0x69, 0xcf, 0xe9, 0xdd, 0xdd, 0x85, 0x5a, 0x20, 0x75, 0xce, 0x6e, 0xdb, - 0xb8, 0x15, 0xa2, 0xbd, 0xa8, 0x4b, 0xe9, 0xa6, 0xbd, 0x08, 0x6e, 0x57, 0xed, 0x75, 0x9a, 0x5a, - 0x3b, 0x00, 0x81, 0x79, 0x70, 0x6f, 0x17, 0x0e, 0x3e, 0x5a, 0xe1, 0xe1, 0x9e, 0xd0, 0xbc, 0x43, - 0xa7, 0x5b, 0x9c, 0x8c, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xca, 0x34, 0x9e, 0x6a, - 0x94, 0x00, 0x00, + // 9630 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x5c, 0xd7, + 0x75, 0x18, 0xdf, 0xee, 0x02, 0xd8, 0x3d, 0x58, 0x00, 0x8b, 0x0b, 0x90, 0x5c, 0xae, 0x28, 0x00, + 0x7a, 0xfa, 0xa2, 0x28, 0x09, 0x94, 0x28, 0x91, 0x92, 0x96, 0xb6, 0x64, 0x2c, 0xb0, 0x04, 0x21, + 0xe2, 0x4b, 0x0f, 0x00, 0x25, 0x7f, 0xa4, 0x3b, 0x0f, 0x6f, 0x2f, 0x16, 0x4f, 0xd8, 0x7d, 0xef, + 0xe9, 0xbd, 0xb7, 0x24, 0x21, 0xdb, 0x33, 0x8a, 0xed, 0xba, 0x36, 0xd3, 0xd4, 0x76, 0x9d, 0x49, + 0x6d, 0xc5, 0x74, 0xed, 0x38, 0xad, 0x53, 0xc7, 0x6d, 0x3e, 0xec, 0xba, 0x4d, 0xdb, 0x99, 0xda, + 0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8, + 0xe9, 0xdc, 0x88, 0xd7, 0x44, 0x79, 0x75, 0x6b, 0x25, 0x37, 0x8a, 0xc6, 0x61, 0x84, 0x35, 0x21, + 0x84, 0x18, 0x8b, 0x80, 0xce, 0x3e, 0x9e, 0xcb, 0xf9, 0x82, 0x30, 0x2e, 0xe3, 0x21, 0xc0, 0xd9, + 0xc7, 0x73, 0x48, 0x9e, 0x87, 0x01, 0x6a, 0x86, 0x08, 0xc1, 0xe8, 0xf2, 0x5c, 0xa9, 0xbc, 0x5c, + 0x59, 0x5b, 0xdf, 0x5c, 0x5a, 0x5b, 0x9d, 0x5b, 0xce, 0x49, 0x3e, 0x4c, 0x29, 0x3f, 0xb7, 0xb5, + 0xa4, 0x94, 0x17, 0x72, 0x89, 0x20, 0x6c, 0xbd, 0x3c, 0xb7, 0x59, 0x5e, 0xc8, 0x25, 0x65, 0x0d, + 0x26, 0xdb, 0x39, 0xd4, 0xb6, 0x53, 0x28, 0x60, 0x0b, 0x89, 0x0e, 0xb6, 0x40, 0x79, 0x45, 0x6d, + 0x41, 0xfe, 0x56, 0x02, 0x26, 0xda, 0x04, 0x95, 0xb6, 0x8d, 0x3c, 0x03, 0x03, 0xcc, 0x96, 0x59, + 0x98, 0x7d, 0xa0, 0x6d, 0x74, 0xa2, 0x96, 0xdd, 0x12, 0x6a, 0x29, 0x5d, 0x30, 0xd5, 0x48, 0x76, + 0x48, 0x35, 0x08, 0x8b, 0x16, 0x83, 0xfd, 0xa9, 0x16, 0xe7, 0xcf, 0xe2, 0xe3, 0xd9, 0x5e, 0xe2, + 0x23, 0x85, 0xf5, 0x17, 0x04, 0x06, 0xda, 0x04, 0x81, 0x73, 0x30, 0xde, 0xc2, 0xa8, 0x67, 0x67, + 0xfc, 0x5e, 0x09, 0xf2, 0x9d, 0x94, 0x13, 0xe3, 0x12, 0x13, 0x21, 0x97, 0x78, 0x2e, 0xaa, 0xc1, + 0xbb, 0x3a, 0x0f, 0x42, 0xcb, 0x58, 0x7f, 0x56, 0x82, 0x23, 0xed, 0x53, 0xca, 0xb6, 0x32, 0x3c, + 0x0d, 0x83, 0x0d, 0xec, 0xee, 0x9a, 0x22, 0xad, 0xba, 0xaf, 0x4d, 0xb0, 0x26, 0xd5, 0xd1, 0xc1, + 0xe6, 0x54, 0xc1, 0x68, 0x9f, 0xec, 0x94, 0x17, 0x32, 0x69, 0x5a, 0x24, 0xfd, 0x60, 0x02, 0x0e, + 0xb7, 0x65, 0xde, 0x56, 0xd0, 0x3b, 0x01, 0x74, 0xc3, 0x6a, 0xba, 0x2c, 0x75, 0x62, 0x9e, 0x38, + 0x43, 0x21, 0xd4, 0x79, 0x11, 0x2f, 0xdb, 0x74, 0xbd, 0xfa, 0x24, 0xad, 0x07, 0x06, 0xa2, 0x08, + 0x4f, 0xfa, 0x82, 0xa6, 0xa8, 0xa0, 0x53, 0x1d, 0x7a, 0xda, 0x62, 0x98, 0x8f, 0x40, 0x4e, 0xab, + 0xeb, 0xd8, 0x70, 0x2b, 0x8e, 0x6b, 0x63, 0xb5, 0xa1, 0x1b, 0x35, 0x1a, 0x6a, 0xd2, 0xc5, 0x81, + 0x1d, 0xb5, 0xee, 0x60, 0x65, 0x8c, 0x55, 0x6f, 0x88, 0x5a, 0x42, 0x41, 0x0d, 0xc8, 0x0e, 0x50, + 0x0c, 0x86, 0x28, 0x58, 0xb5, 0x47, 0x21, 0x7f, 0x24, 0x03, 0xc3, 0x81, 0x04, 0x1c, 0xdd, 0x05, + 0xd9, 0x17, 0xd5, 0xcb, 0x6a, 0x45, 0x2c, 0xaa, 0x98, 0x26, 0x86, 0x09, 0x6c, 0x9d, 0x2f, 0xac, + 0x1e, 0x81, 0x49, 0x8a, 0x62, 0x36, 0x5d, 0x6c, 0x57, 0xb4, 0xba, 0xea, 0x38, 0x54, 0x69, 0x69, + 0x8a, 0x8a, 0x48, 0xdd, 0x1a, 0xa9, 0x9a, 0x17, 0x35, 0xe8, 0x0c, 0x4c, 0x50, 0x8a, 0x46, 0xb3, + 0xee, 0xea, 0x56, 0x1d, 0x57, 0xc8, 0x32, 0xcf, 0xa1, 0x21, 0xc7, 0x93, 0x6c, 0x9c, 0x60, 0xac, + 0x70, 0x04, 0x22, 0x91, 0x83, 0x16, 0xe0, 0x4e, 0x4a, 0x56, 0xc3, 0x06, 0xb6, 0x55, 0x17, 0x57, + 0xf0, 0x4b, 0x4d, 0xb5, 0xee, 0x54, 0x54, 0xa3, 0x5a, 0xd9, 0x55, 0x9d, 0xdd, 0xfc, 0x24, 0x61, + 0x50, 0x4a, 0xe4, 0x25, 0xe5, 0x18, 0x41, 0x5c, 0xe4, 0x78, 0x65, 0x8a, 0x36, 0x67, 0x54, 0x2f, + 0xa8, 0xce, 0x2e, 0x2a, 0xc2, 0x11, 0xca, 0xc5, 0x71, 0x6d, 0xdd, 0xa8, 0x55, 0xb4, 0x5d, 0xac, + 0xed, 0x55, 0x9a, 0xee, 0xce, 0x93, 0xf9, 0x3b, 0x82, 0xed, 0x53, 0x09, 0x37, 0x28, 0xce, 0x3c, + 0x41, 0xd9, 0x72, 0x77, 0x9e, 0x44, 0x1b, 0x90, 0x25, 0x83, 0xd1, 0xd0, 0x5f, 0xc6, 0x95, 0x1d, + 0xd3, 0xa6, 0x31, 0x74, 0xb4, 0x8d, 0x6b, 0x0a, 0x68, 0x70, 0x76, 0x8d, 0x13, 0xac, 0x98, 0x55, + 0x5c, 0x1c, 0xd8, 0x58, 0x2f, 0x97, 0x17, 0x94, 0x61, 0xc1, 0xe5, 0xbc, 0x69, 0x13, 0x83, 0xaa, + 0x99, 0x9e, 0x82, 0x87, 0x99, 0x41, 0xd5, 0x4c, 0xa1, 0xde, 0x33, 0x30, 0xa1, 0x69, 0xac, 0xcf, + 0xba, 0x56, 0xe1, 0x8b, 0x31, 0x27, 0x9f, 0x0b, 0x29, 0x4b, 0xd3, 0x16, 0x19, 0x02, 0xb7, 0x71, + 0x07, 0x3d, 0x05, 0x87, 0x7d, 0x65, 0x05, 0x09, 0xc7, 0x5b, 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 0xb3, 0xa9, 0x74, 0x26, 0x07, 0xf2, 0x6b, 0x49, 0xc8, + 0x06, 0xf3, 0x75, 0xb2, 0xfc, 0xd1, 0x68, 0xc4, 0x92, 0xa8, 0x4f, 0xbb, 0xbb, 0x6b, 0x76, 0x3f, + 0x3b, 0x4f, 0x42, 0x59, 0x71, 0x90, 0x25, 0xc7, 0x0a, 0xa3, 0x24, 0x69, 0x04, 0x31, 0x36, 0xcc, + 0x92, 0x91, 0xb4, 0xc2, 0x4b, 0x68, 0x11, 0x06, 0x5f, 0x74, 0x28, 0xef, 0x41, 0xca, 0xfb, 0x9e, + 0xee, 0xbc, 0x9f, 0xdd, 0xa0, 0xcc, 0x33, 0xcf, 0x6e, 0x54, 0x56, 0xd7, 0x94, 0x95, 0xb9, 0x65, + 0x85, 0x93, 0xa3, 0x63, 0x90, 0xaa, 0xab, 0x2f, 0xef, 0x87, 0x83, 0x1e, 0x05, 0xf5, 0x3a, 0x08, + 0xc7, 0x20, 0x75, 0x05, 0xab, 0x7b, 0xe1, 0x50, 0x43, 0x41, 0xb7, 0x71, 0x32, 0x9c, 0x82, 0x01, + 0xaa, 0x2f, 0x04, 0xc0, 0x35, 0x96, 0x3b, 0x84, 0xd2, 0x90, 0x9a, 0x5f, 0x53, 0xc8, 0x84, 0xc8, + 0x41, 0x96, 0x41, 0x2b, 0xeb, 0x4b, 0xe5, 0xf9, 0x72, 0x2e, 0x21, 0x9f, 0x81, 0x41, 0xa6, 0x04, + 0x32, 0x59, 0x3c, 0x35, 0xe4, 0x0e, 0xf1, 0x22, 0xe7, 0x21, 0x89, 0xda, 0xad, 0x95, 0x52, 0x59, + 0xc9, 0x25, 0xc2, 0x43, 0x9d, 0xca, 0x0d, 0xc8, 0x0e, 0x64, 0x83, 0x79, 0xf8, 0x8f, 0x67, 0x31, + 0xfe, 0x65, 0x09, 0x86, 0x03, 0x79, 0x35, 0x49, 0x88, 0xd4, 0x7a, 0xdd, 0xbc, 0x52, 0x51, 0xeb, + 0x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ac, 0x7f, 0x23, 0x32, 0x54, 0x5b, 0x01, 0x72, 0xc2, 0x79, + 0x09, 0x72, 0x5e, 0xae, 0x52, 0xd1, 0x1b, 0x96, 0x69, 0xbb, 0x31, 0x1c, 0xbf, 0x20, 0x46, 0xca, + 0xa3, 0x5b, 0xa2, 0x64, 0xc5, 0x32, 0xb0, 0x93, 0xe7, 0x5e, 0x4d, 0xf2, 0x8b, 0x9c, 0xd1, 0x88, + 0x4f, 0xc5, 0x1d, 0x87, 0x66, 0x36, 0x2c, 0xd5, 0xee, 0xc5, 0xff, 0xfd, 0x43, 0xe1, 0x38, 0x38, + 0x09, 0x77, 0x1c, 0xee, 0xbe, 0x85, 0x49, 0xb4, 0xef, 0x81, 0xc3, 0x97, 0x84, 0xe3, 0x10, 0x34, + 0x9c, 0x85, 0x48, 0x18, 0x7a, 0x60, 0xf1, 0x8f, 0x04, 0x0b, 0x41, 0x43, 0x58, 0x3c, 0xe7, 0x07, + 0x5a, 0x1b, 0xd7, 0x74, 0xc7, 0xb5, 0x59, 0x9a, 0xdc, 0x9d, 0xd5, 0x3f, 0xfe, 0x5e, 0x38, 0x09, + 0x53, 0x02, 0xa4, 0xc4, 0x13, 0xf1, 0x6d, 0x57, 0xba, 0x8a, 0x8a, 0x17, 0xec, 0x37, 0x85, 0x27, + 0x0a, 0x90, 0x11, 0xd9, 0x02, 0x19, 0x22, 0x51, 0xbb, 0x46, 0xd6, 0x0e, 0x3d, 0xb0, 0xfb, 0x27, + 0x11, 0xe1, 0x36, 0x04, 0x2d, 0xe1, 0x19, 0xc8, 0x7f, 0x9a, 0xc6, 0x1e, 0xde, 0xef, 0xc9, 0x3a, + 0xff, 0x69, 0x24, 0xff, 0xd9, 0x62, 0x94, 0xcc, 0x87, 0x8c, 0x45, 0xf2, 0x29, 0x14, 0x77, 0xcf, + 0x28, 0xff, 0xd3, 0x3f, 0xe0, 0xfd, 0x0d, 0xa7, 0x53, 0xc5, 0x65, 0x62, 0xe4, 0xe1, 0xa4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x84, 0x9d, + 0xac, 0x8c, 0x52, 0x88, 0x22, 0x00, 0x81, 0xc9, 0xf4, 0x19, 0x09, 0x90, 0x1f, 0x65, 0x14, 0xec, + 0x58, 0x64, 0x49, 0x48, 0x72, 0xff, 0x40, 0xa2, 0x2e, 0x75, 0xcf, 0xfd, 0x7d, 0x7a, 0x91, 0xfb, + 0x07, 0x26, 0xe7, 0x53, 0xbe, 0x47, 0x4e, 0x70, 0xd3, 0x69, 0x73, 0xbd, 0x71, 0x76, 0xde, 0xd4, + 0x05, 0x75, 0x8b, 0x0b, 0x3e, 0x24, 0xff, 0x1b, 0x09, 0x8e, 0xb5, 0x18, 0xb1, 0x27, 0xec, 0x5f, + 0x01, 0x64, 0x07, 0x2a, 0xf9, 0x27, 0xe6, 0x98, 0xd0, 0x7d, 0xcf, 0x89, 0x71, 0xbb, 0xc5, 0xd5, + 0xdf, 0xba, 0xa0, 0xc2, 0xee, 0x47, 0xfe, 0x73, 0x09, 0x26, 0x83, 0xcd, 0x7b, 0x1d, 0x59, 0x85, + 0x6c, 0xb0, 0x75, 0xde, 0x85, 0x7b, 0x7a, 0xe9, 0x02, 0x97, 0x3e, 0x44, 0x8f, 0x9e, 0xf3, 0x3d, + 0x04, 0xdb, 0xae, 0x7b, 0xb4, 0x67, 0x6d, 0x08, 0x99, 0xa2, 0x9e, 0x22, 0x45, 0xc7, 0xe3, 0xff, + 0x4a, 0x90, 0x5a, 0x37, 0xcd, 0x3a, 0x32, 0x61, 0xdc, 0x30, 0xdd, 0x0a, 0x31, 0x66, 0x5c, 0xad, + 0xf0, 0x75, 0x3e, 0x73, 0xbd, 0xf3, 0xfd, 0x29, 0xe9, 0xbb, 0x37, 0xa6, 0x5b, 0x59, 0x29, 0x63, + 0x86, 0xe9, 0x96, 0x28, 0x64, 0x93, 0xed, 0x02, 0xbc, 0x0b, 0x46, 0xc2, 0x8d, 0x31, 0xc7, 0xfc, + 0x7c, 0xdf, 0x8d, 0x85, 0xd9, 0xdc, 0xbc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0x7d, 0x7c, 0xd5, 0x52, 0xc5, 0x67, 0xfb, + 0x88, 0x6e, 0x8e, 0x53, 0xb4, 0x05, 0x8a, 0x25, 0x3e, 0xb6, 0x5f, 0x16, 0x38, 0xf2, 0xef, 0x27, + 0x20, 0x2d, 0x58, 0xd3, 0x4b, 0xe9, 0xb8, 0x8e, 0x35, 0xd7, 0x14, 0x87, 0x34, 0x5e, 0x19, 0x21, + 0x48, 0xd6, 0xf8, 0x10, 0x65, 0x2e, 0x1c, 0x52, 0x48, 0x81, 0xc0, 0xbc, 0xa7, 0x02, 0x04, 0x66, + 0x35, 0xc9, 0xa8, 0xa5, 0x2c, 0x53, 0xac, 0x06, 0x2f, 0x1c, 0x52, 0x68, 0x09, 0xe5, 0x61, 0x90, + 0xcc, 0x0c, 0x97, 0x7d, 0x0b, 0x91, 0xc0, 0x79, 0x19, 0x1d, 0x81, 0x01, 0x4b, 0x75, 0x35, 0x76, + 0x8b, 0x8f, 0x54, 0xb0, 0x22, 0x7a, 0x02, 0x06, 0xd9, 0x1b, 0xd4, 0xe8, 0xff, 0xe2, 0x20, 0xca, + 0x60, 0x1f, 0xfb, 0x22, 0x72, 0xaf, 0xab, 0xae, 0x8b, 0x6d, 0x83, 0x30, 0x64, 0xe8, 0x08, 0x41, + 0x6a, 0xdb, 0xac, 0xee, 0xf3, 0xff, 0x0f, 0x42, 0x7f, 0xf3, 0x7f, 0x48, 0x40, 0xed, 0xa1, 0x42, + 0x2b, 0xd9, 0xbf, 0x45, 0xca, 0x0a, 0x60, 0x89, 0x20, 0x95, 0x61, 0x42, 0xad, 0x56, 0x75, 0xf6, + 0xaf, 0x3a, 0x2a, 0xdb, 0x3a, 0xf5, 0x10, 0x0e, 0xfd, 0xa7, 0x57, 0x9d, 0xc6, 0x02, 0xf9, 0x04, + 0x25, 0x8e, 0x5f, 0xca, 0xc0, 0x90, 0xc5, 0x84, 0x92, 0xcf, 0xc1, 0x78, 0x8b, 0xa4, 0x44, 0xbe, + 0x3d, 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+ 0xea, 0x52, 0xba, 0x69, 0x2f, 0x82, 0xdb, 0x55, 0x7b, 0x9d, 0xa6, 0xd6, 0x36, 0x40, 0x60, 0x1e, + 0xdc, 0xdb, 0x85, 0x83, 0x8f, 0x56, 0x78, 0xb8, 0x27, 0x34, 0xef, 0xd0, 0xe9, 0x16, 0x27, 0xe3, + 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x2a, 0x2c, 0x38, 0xdd, 0x94, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) @@ -2026,6 +2029,9 @@ func (this *Params) Equal(that interface{}) bool { if this.BondDenom != that1.BondDenom { return false } + if !this.PowerReduction.Equal(that1.PowerReduction) { + return false + } return true } func (this *RedelegationEntryResponse) Equal(that interface{}) bool { @@ -2876,6 +2882,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.PowerReduction.Size() + i -= size + if _, err := m.PowerReduction.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 if len(m.BondDenom) > 0 { i -= len(m.BondDenom) copy(dAtA[i:], m.BondDenom) @@ -3417,6 +3433,8 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovStaking(uint64(l)) } + l = m.PowerReduction.Size() + n += 1 + l + sovStaking(uint64(l)) return n } @@ -5949,6 +5967,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.BondDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PowerReduction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PowerReduction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipStaking(dAtA[iNdEx:]) From 4f476d6890404db0b331c313827eabde9b04b3cf Mon Sep 17 00:00:00 2001 From: psaradev Date: Wed, 27 Jan 2021 20:24:00 +1000 Subject: [PATCH 02/23] on-chain power reduction param conversion basic work --- simapp/simd/cmd/testnet.go | 6 +- testutil/network/network.go | 6 +- types/staking.go | 12 +- types/staking_test.go | 4 +- x/auth/client/cli/cli_test.go | 4 +- x/authz/simulation/operations_test.go | 6 +- x/bank/client/rest/tx_test.go | 3 +- x/bank/keeper/keeper_test.go | 4 +- x/bank/simulation/operations_test.go | 2 +- x/distribution/keeper/delegation_test.go | 12 +- x/distribution/keeper/keeper_test.go | 2 +- x/distribution/simulation/operations_test.go | 4 +- x/evidence/keeper/keeper_test.go | 2 +- x/gov/abci_test.go | 6 +- x/gov/common_test.go | 4 +- x/gov/keeper/common_test.go | 6 +- x/gov/keeper/deposit_test.go | 4 +- x/gov/keeper/grpc_query_test.go | 8 +- x/gov/keeper/querier_test.go | 2 +- x/gov/keeper/tally_test.go | 20 +- x/gov/simulation/operations_test.go | 2 +- x/gov/types/params.go | 2 +- x/ibc/core/02-client/keeper/keeper_test.go | 2 +- x/ibc/testing/chain.go | 2 +- x/slashing/abci_test.go | 2 +- x/slashing/app_test.go | 4 +- x/slashing/genesis_test.go | 2 +- x/slashing/handler_test.go | 10 +- x/slashing/init_test.go | 2 +- x/slashing/keeper/common_test.go | 2 +- x/slashing/keeper/grpc_query_test.go | 2 +- x/slashing/keeper/keeper_test.go | 16 +- x/slashing/keeper/signing_info_test.go | 8 +- x/slashing/simulation/operations_test.go | 4 +- x/staking/app_test.go | 4 +- x/staking/client/cli/tx.go | 2 +- x/staking/common_test.go | 2 +- x/staking/genesis.go | 4 +- x/staking/genesis_test.go | 12 +- x/staking/handler_test.go | 74 ++++---- x/staking/keeper/common_test.go | 2 +- x/staking/keeper/delegation_test.go | 52 ++--- x/staking/keeper/grpc_query_test.go | 18 +- x/staking/keeper/historical_info.go | 2 +- x/staking/keeper/historical_info_test.go | 6 +- x/staking/keeper/invariants.go | 4 +- x/staking/keeper/keeper_test.go | 2 +- x/staking/keeper/params.go | 8 + x/staking/keeper/power_reduction.go | 15 ++ x/staking/keeper/power_reduction_test.go | 21 +++ x/staking/keeper/querier_test.go | 34 ++-- x/staking/keeper/slash.go | 2 +- x/staking/keeper/slash_test.go | 48 ++--- x/staking/keeper/val_state_change.go | 6 +- x/staking/keeper/validator.go | 8 +- x/staking/keeper/validator_test.go | 188 +++++++++---------- x/staking/legacy/v040/migrate.go | 2 + x/staking/simulation/common_test.go | 2 +- x/staking/simulation/genesis.go | 2 +- x/staking/simulation/genesis_test.go | 2 + x/staking/simulation/operations_test.go | 8 +- x/staking/spec/01_state.md | 9 +- x/staking/spec/08_params.md | 1 + x/staking/teststaking/helper.go | 4 +- x/staking/teststaking/tm.go | 9 +- x/staking/types/exported.go | 2 +- x/staking/types/historical_info.go | 8 +- x/staking/types/historical_info_test.go | 5 +- x/staking/types/keys.go | 4 +- x/staking/types/keys_test.go | 8 +- x/staking/types/params.go | 19 +- x/staking/types/validator.go | 28 +-- x/staking/types/validator_test.go | 10 +- 73 files changed, 447 insertions(+), 367 deletions(-) create mode 100644 x/staking/keeper/power_reduction.go create mode 100644 x/staking/keeper/power_reduction_test.go diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 0717b398427c..99cf09958791 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -196,8 +196,8 @@ func InitTestnet( return err } - accTokens := sdk.TokensFromConsensusPower(1000) - accStakingTokens := sdk.TokensFromConsensusPower(500) + accTokens := sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction) + accStakingTokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) coins := sdk.Coins{ sdk.NewCoin(fmt.Sprintf("%stoken", nodeDirName), accTokens), sdk.NewCoin(sdk.DefaultBondDenom, accStakingTokens), @@ -206,7 +206,7 @@ func InitTestnet( genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) - valTokens := sdk.TokensFromConsensusPower(100) + valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) createValMsg, err := stakingtypes.NewMsgCreateValidator( sdk.ValAddress(addr), valPubKeys[i], diff --git a/testutil/network/network.go b/testutil/network/network.go index c73b69d18ab2..21102b51fdde 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -111,9 +111,9 @@ func DefaultConfig() Config { NumValidators: 4, BondDenom: sdk.DefaultBondDenom, MinGasPrices: fmt.Sprintf("0.000006%s", sdk.DefaultBondDenom), - AccountTokens: sdk.TokensFromConsensusPower(1000), - StakingTokens: sdk.TokensFromConsensusPower(500), - BondedTokens: sdk.TokensFromConsensusPower(100), + AccountTokens: sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction), + StakingTokens: sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction), + BondedTokens: sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), PruningStrategy: storetypes.PruningOptionNothing, CleanupDir: true, SigningAlgo: string(hd.Secp256k1Type), diff --git a/types/staking.go b/types/staking.go index 0753d808b2e8..563f94176ce9 100644 --- a/types/staking.go +++ b/types/staking.go @@ -22,15 +22,15 @@ const ( ValidatorUpdateDelay int64 = 1 ) -// PowerReduction is the amount of staking tokens required for 1 unit of consensus-engine power -var PowerReduction = NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(6), nil)) +// DefaultPowerReduction is the default amount of staking tokens required for 1 unit of consensus-engine power +var DefaultPowerReduction = NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(6), nil)) // TokensToConsensusPower - convert input tokens to potential consensus-engine power -func TokensToConsensusPower(tokens Int) int64 { - return (tokens.Quo(PowerReduction)).Int64() +func TokensToConsensusPower(tokens Int, powerReduction Int) int64 { + return (tokens.Quo(powerReduction)).Int64() } // TokensFromConsensusPower - convert input power to tokens -func TokensFromConsensusPower(power int64) Int { - return NewInt(power).Mul(PowerReduction) +func TokensFromConsensusPower(power int64, powerReduction Int) Int { + return NewInt(power).Mul(powerReduction) } diff --git a/types/staking_test.go b/types/staking_test.go index e307230cd990..fe6c36bd991b 100644 --- a/types/staking_test.go +++ b/types/staking_test.go @@ -21,6 +21,6 @@ func (s *stakingTestSuite) SetupSuite() { } func (s *stakingTestSuite) TestTokensToConsensusPower() { - s.Require().Equal(int64(0), sdk.TokensToConsensusPower(sdk.NewInt(999_999))) - s.Require().Equal(int64(1), sdk.TokensToConsensusPower(sdk.NewInt(1_000_000))) + s.Require().Equal(int64(0), sdk.TokensToConsensusPower(sdk.NewInt(999_999), sdk.DefaultPowerReduction)) + s.Require().Equal(int64(1), sdk.TokensToConsensusPower(sdk.NewInt(1_000_000), sdk.DefaultPowerReduction)) } diff --git a/x/auth/client/cli/cli_test.go b/x/auth/client/cli/cli_test.go index d8913d1ac07e..744e4c714a2e 100644 --- a/x/auth/client/cli/cli_test.go +++ b/x/auth/client/cli/cli_test.go @@ -321,7 +321,7 @@ func (s *IntegrationTestSuite) TestCLISendGenerateSignAndBroadcast() { account, err := val1.ClientCtx.Keyring.Key("newAccount") s.Require().NoError(err) - sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10)) + sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) normalGeneratedTx, err := bankcli.MsgSendExec( val1.ClientCtx, @@ -544,7 +544,7 @@ func (s *IntegrationTestSuite) TestCLIMultisignInsufficientCosigners() { func (s *IntegrationTestSuite) TestCLIEncode() { val1 := s.network.Validators[0] - sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10)) + sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) normalGeneratedTx, err := bankcli.MsgSendExec( val1.ClientCtx, diff --git a/x/authz/simulation/operations_test.go b/x/authz/simulation/operations_test.go index 83be182df746..e8686f166a72 100644 --- a/x/authz/simulation/operations_test.go +++ b/x/authz/simulation/operations_test.go @@ -72,7 +72,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200000) + initAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin("foo", initAmt)) // add coins to the accounts @@ -132,7 +132,7 @@ func (suite *SimTestSuite) TestSimulateRevokeAuthorization() { AppHash: suite.app.LastCommitID().Hash, }}) - initAmt := sdk.TokensFromConsensusPower(200000) + initAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin("foo", initAmt)) granter := accounts[0] @@ -167,7 +167,7 @@ func (suite *SimTestSuite) TestSimulateExecAuthorization() { // begin a new block suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) - initAmt := sdk.TokensFromConsensusPower(200000) + initAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin("foo", initAmt)) granter := accounts[0] diff --git a/x/bank/client/rest/tx_test.go b/x/bank/client/rest/tx_test.go index d770ebec3da7..f189eb536328 100644 --- a/x/bank/client/rest/tx_test.go +++ b/x/bank/client/rest/tx_test.go @@ -8,6 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/rest" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" @@ -28,7 +29,7 @@ func (s *IntegrationTestSuite) TestCoinSend() { sendReq := generateSendReq( account, - types.Coins{types.NewCoin(s.cfg.BondDenom, types.TokensFromConsensusPower(1))}, + types.Coins{types.NewCoin(s.cfg.BondDenom, types.TokensFromConsensusPower(1, sdk.DefaultPowerReduction))}, ) stdTx, err := submitSendReq(val, sendReq) diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 80b4b070c278..d57d60877a4b 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -35,7 +35,7 @@ var ( multiPermAcc = authtypes.NewEmptyModuleAccount(multiPerm, authtypes.Burner, authtypes.Minter, authtypes.Staking) randomPermAcc = authtypes.NewEmptyModuleAccount(randomPerm, "random") - initTokens = sdk.TokensFromConsensusPower(initialPower) + initTokens = sdk.TokensFromConsensusPower(initialPower, sdk.DefaultPowerReduction) initCoins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initTokens)) ) @@ -86,7 +86,7 @@ func (suite *IntegrationTestSuite) TestSupply() { app, ctx := suite.app, suite.ctx initialPower := int64(100) - initTokens := sdk.TokensFromConsensusPower(initialPower) + initTokens := sdk.TokensFromConsensusPower(initialPower, sdk.DefaultPowerReduction) totalSupply := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initTokens)) app.BankKeeper.SetSupply(ctx, types.NewSupply(totalSupply)) diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index 144dc5dd3429..5add9942cef7 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -124,7 +124,7 @@ func (suite *SimTestSuite) TestSimulateMsgMultiSend() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200) + initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index ac8ac4a33402..0255a64ca3d9 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -112,7 +112,7 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10) + initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -175,7 +175,7 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10) + initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -270,7 +270,7 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) { func TestWithdrawDelegationRewardsBasic(t *testing.T) { balancePower := int64(1000) - balanceTokens := sdk.TokensFromConsensusPower(balancePower) + balanceTokens := sdk.TokensFromConsensusPower(balancePower, sdk.DefaultPowerReduction) app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) @@ -305,7 +305,7 @@ func TestWithdrawDelegationRewardsBasic(t *testing.T) { val := app.StakingKeeper.Validator(ctx, valAddrs[0]) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10) + initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) tokens := sdk.DecCoins{sdk.NewDecCoin(sdk.DefaultBondDenom, initial)} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -375,7 +375,7 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10).ToDec() + initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec() tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -431,7 +431,7 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { del1 := app.StakingKeeper.Delegation(ctx, sdk.AccAddress(valAddrs[0]), valAddrs[0]) // allocate some rewards - initial := sdk.TokensFromConsensusPower(30).ToDec() + initial := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction).ToDec() tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go index a8205dfdc1db..cd39dafaa72b 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -57,7 +57,7 @@ func TestWithdrawValidatorCommission(t *testing.T) { // check initial balance balance := app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(valAddrs[0])) - expTokens := sdk.TokensFromConsensusPower(1000) + expTokens := sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction) expCoins := sdk.NewCoins(sdk.NewCoin("stake", expTokens)) require.Equal(t, expCoins, balance) diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 4a3dff30878e..67ca4dd863ae 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -95,7 +95,7 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { validator0 := suite.getTestingValidator0(accounts) // setup delegation - delTokens := sdk.TokensFromConsensusPower(2) + delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := accounts[1] delegation := stakingtypes.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) @@ -223,7 +223,7 @@ func (suite *SimTestSuite) SetupTest() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200) + initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/evidence/keeper/keeper_test.go b/x/evidence/keeper/keeper_test.go index 9165730466b7..0d518fa61f71 100644 --- a/x/evidence/keeper/keeper_test.go +++ b/x/evidence/keeper/keeper_test.go @@ -34,7 +34,7 @@ var ( sdk.ValAddress(pubkeys[2].Address()), } - initAmt = sdk.TokensFromConsensusPower(200) + initAmt = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) ) diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index bfda1b3590b6..56a401fffad7 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -221,7 +221,7 @@ func TestTickPassedVotingPeriod(t *testing.T) { require.False(t, activeQueue.Valid()) activeQueue.Close() - proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(5))} + proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction))} newProposalMsg, err := types.NewMsgSubmitProposal(TestProposal, proposalCoins, addrs[0]) require.NoError(t, err) @@ -295,7 +295,7 @@ func TestProposalPassedEndblocker(t *testing.T) { proposal, err := app.GovKeeper.SubmitProposal(ctx, TestProposal) require.NoError(t, err) - proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10))} + proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction))} newDepositMsg := types.NewMsgDeposit(addrs[0], proposal.ProposalId, proposalCoins) handleAndCheck(t, handler, ctx, newDepositMsg) @@ -343,7 +343,7 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) { proposal, err := app.GovKeeper.SubmitProposal(ctx, TestProposal) require.NoError(t, err) - proposalCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10))) + proposalCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction))) newDepositMsg := types.NewMsgDeposit(addrs[0], proposal.ProposalId, proposalCoins) handleAndCheck(t, gov.NewHandler(app.GovKeeper), ctx, newDepositMsg) diff --git a/x/gov/common_test.go b/x/gov/common_test.go index 5ef50ea5db03..3ff367e15972 100644 --- a/x/gov/common_test.go +++ b/x/gov/common_test.go @@ -16,7 +16,7 @@ import ( ) var ( - valTokens = sdk.TokensFromConsensusPower(42) + valTokens = sdk.TokensFromConsensusPower(42, sdk.DefaultPowerReduction) TestProposal = types.NewTextProposal("Test", "description") TestDescription = stakingtypes.NewDescription("T", "E", "S", "T", "Z") TestCommissionRates = stakingtypes.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) @@ -82,7 +82,7 @@ func createValidators(t *testing.T, stakingHandler sdk.Handler, ctx sdk.Context, require.True(t, len(addrs) <= len(pubkeys), "Not enough pubkeys specified at top of file.") for i := 0; i < len(addrs); i++ { - valTokens := sdk.TokensFromConsensusPower(powerAmt[i]) + valTokens := sdk.TokensFromConsensusPower(powerAmt[i], sdk.DefaultPowerReduction) valCreateMsg, err := stakingtypes.NewMsgCreateValidator( addrs[i], pubkeys[i], sdk.NewCoin(sdk.DefaultBondDenom, valTokens), TestDescription, TestCommissionRates, sdk.OneInt(), diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index c7516eb69773..a967b4e9cbc3 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -48,9 +48,9 @@ func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val2) app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val3) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0]), stakingtypes.Unbonded, val1, true) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1]), stakingtypes.Unbonded, val2, true) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[2], sdk.TokensFromConsensusPower(powers[2]), stakingtypes.Unbonded, val3, true) + _, _ = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0], sdk.DefaultPowerReduction), stakingtypes.Unbonded, val1, true) + _, _ = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1], sdk.DefaultPowerReduction), stakingtypes.Unbonded, val2, true) + _, _ = app.StakingKeeper.Delegate(ctx, addrs[2], sdk.TokensFromConsensusPower(powers[2], sdk.DefaultPowerReduction), stakingtypes.Unbonded, val3, true) _ = staking.EndBlocker(ctx, app.StakingKeeper) diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index dfa857dc57fe..e1415f099a0b 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -22,8 +22,8 @@ func TestDeposits(t *testing.T) { require.NoError(t, err) proposalID := proposal.ProposalId - fourStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(4))) - fiveStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(5))) + fourStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction))) + fiveStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction))) addr0Initial := app.BankKeeper.GetAllBalances(ctx, TestAddrs[0]) addr1Initial := app.BankKeeper.GetAllBalances(ctx, TestAddrs[1]) diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index dc330d734829..59bdd442c999 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -164,7 +164,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { { "request with filter of deposit address", func() { - depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20))) + depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction))) deposit := types.NewDeposit(testProposals[0].ProposalId, addrs[0], depositCoins) app.GovKeeper.SetDeposit(ctx, deposit) @@ -584,7 +584,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { { "valid request", func() { - depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20))) + depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction))) deposit := types.NewDeposit(proposal.ProposalId, addrs[0], depositCoins) app.GovKeeper.SetDeposit(ctx, deposit) @@ -671,11 +671,11 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { { "get deposits with default limit", func() { - depositAmount1 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20))) + depositAmount1 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction))) deposit1 := types.NewDeposit(proposal.ProposalId, addrs[0], depositAmount1) app.GovKeeper.SetDeposit(ctx, deposit1) - depositAmount2 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(30))) + depositAmount2 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction))) deposit2 := types.NewDeposit(proposal.ProposalId, addrs[1], depositAmount2) app.GovKeeper.SetDeposit(ctx, deposit2) diff --git a/x/gov/keeper/querier_test.go b/x/gov/keeper/querier_test.go index 9960fb116bed..d416cb350db8 100644 --- a/x/gov/keeper/querier_test.go +++ b/x/gov/keeper/querier_test.go @@ -153,7 +153,7 @@ func TestQueries(t *testing.T) { TestAddrs := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(20000001)) oneCoins := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 1)) - consCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10))) + consCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction))) tp := TestProposal diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 77f468cd2c0b..4e2ac847e9c6 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -245,7 +245,7 @@ func TestTallyDelgatorOverride(t *testing.T) { addrs, valAddrs := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(30) + delTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) val1, found := app.StakingKeeper.GetValidator(ctx, valAddrs[0]) require.True(t, found) @@ -281,7 +281,7 @@ func TestTallyDelgatorInherit(t *testing.T) { addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(30) + delTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) val3, found := app.StakingKeeper.GetValidator(ctx, vals[2]) require.True(t, found) @@ -316,7 +316,7 @@ func TestTallyDelgatorMultipleOverride(t *testing.T) { addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) val1, found := app.StakingKeeper.GetValidator(ctx, vals[0]) require.True(t, found) val2, found := app.StakingKeeper.GetValidator(ctx, vals[1]) @@ -358,7 +358,7 @@ func TestTallyDelgatorMultipleInherit(t *testing.T) { addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) val2, found := app.StakingKeeper.GetValidator(ctx, vals[1]) require.True(t, found) val3, found := app.StakingKeeper.GetValidator(ctx, vals[2]) @@ -397,7 +397,7 @@ func TestTallyJailedValidator(t *testing.T) { addrs, valAddrs := createValidators(t, ctx, app, []int64{25, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) val2, found := app.StakingKeeper.GetValidator(ctx, valAddrs[1]) require.True(t, found) val3, found := app.StakingKeeper.GetValidator(ctx, valAddrs[2]) @@ -440,7 +440,7 @@ func TestTallyValidatorMultipleDelegations(t *testing.T) { addrs, valAddrs := createValidators(t, ctx, app, []int64{10, 10, 10}) - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) val2, found := app.StakingKeeper.GetValidator(ctx, valAddrs[1]) require.True(t, found) @@ -465,10 +465,10 @@ func TestTallyValidatorMultipleDelegations(t *testing.T) { require.True(t, passes) require.False(t, burnDeposits) - expectedYes := sdk.TokensFromConsensusPower(30) - expectedAbstain := sdk.TokensFromConsensusPower(0) - expectedNo := sdk.TokensFromConsensusPower(10) - expectedNoWithVeto := sdk.TokensFromConsensusPower(0) + expectedYes := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) + expectedAbstain := sdk.TokensFromConsensusPower(0, sdk.DefaultPowerReduction) + expectedNo := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + expectedNoWithVeto := sdk.TokensFromConsensusPower(0, sdk.DefaultPowerReduction) expectedTallyResult := types.NewTallyResult(expectedYes, expectedAbstain, expectedNo, expectedNoWithVeto) require.True(t, tallyResults.Equals(expectedTallyResult)) diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 9c6e8306f821..169665ad9f70 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -222,7 +222,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { func getTestingAccounts(t *testing.T, r *rand.Rand, app *simapp.SimApp, ctx sdk.Context, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200) + initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/gov/types/params.go b/x/gov/types/params.go index 5421136f390f..45ed3ec522dc 100644 --- a/x/gov/types/params.go +++ b/x/gov/types/params.go @@ -17,7 +17,7 @@ const ( // Default governance params var ( - DefaultMinDepositTokens = sdk.TokensFromConsensusPower(10) + DefaultMinDepositTokens = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) DefaultQuorum = sdk.NewDecWithPrec(334, 3) DefaultThreshold = sdk.NewDecWithPrec(5, 1) DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3) diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index c22e80cc9ec8..b9ad609211c9 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) SetupTest() { val.Tokens = sdk.NewInt(rand.Int63()) validators = append(validators, val) - hi := stakingtypes.NewHistoricalInfo(suite.ctx.BlockHeader(), validators) + hi := stakingtypes.NewHistoricalInfo(suite.ctx.BlockHeader(), validators, sdk.DefaultPowerReduction) app.StakingKeeper.SetHistoricalInfo(suite.ctx, int64(i), &hi) } diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 0534066d88d6..edf77a7f2456 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -329,7 +329,7 @@ func (chain *TestChain) GetValsAtHeight(height int64) (*tmtypes.ValidatorSet, bo valSet := stakingtypes.Validators(histInfo.Valset) - tmValidators, err := teststaking.ToTmValidators(valSet) + tmValidators, err := teststaking.ToTmValidators(valSet, sdk.DefaultPowerReduction) if err != nil { panic(err) } diff --git a/x/slashing/abci_test.go b/x/slashing/abci_test.go index 50140eb58ebb..f07b1c81fa9d 100644 --- a/x/slashing/abci_test.go +++ b/x/slashing/abci_test.go @@ -21,7 +21,7 @@ func TestBeginBlocker(t *testing.T) { ctx := app.BaseApp.NewContext(false, tmproto.Header{}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) addr, pk := sdk.ValAddress(pks[0].Address()), pks[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) diff --git a/x/slashing/app_test.go b/x/slashing/app_test.go index 5ee23b7cc564..028d41755607 100644 --- a/x/slashing/app_test.go +++ b/x/slashing/app_test.go @@ -41,8 +41,8 @@ func checkValidatorSigningInfo(t *testing.T, app *simapp.SimApp, addr sdk.ConsAd } func TestSlashingMsgs(t *testing.T) { - genTokens := sdk.TokensFromConsensusPower(42) - bondTokens := sdk.TokensFromConsensusPower(10) + genTokens := sdk.TokensFromConsensusPower(42, sdk.DefaultPowerReduction) + bondTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) genCoin := sdk.NewCoin(sdk.DefaultBondDenom, genTokens) bondCoin := sdk.NewCoin(sdk.DefaultBondDenom, bondTokens) diff --git a/x/slashing/genesis_test.go b/x/slashing/genesis_test.go index b9241f0246ca..e31144f331ee 100644 --- a/x/slashing/genesis_test.go +++ b/x/slashing/genesis_test.go @@ -20,7 +20,7 @@ func TestExportAndInitGenesis(t *testing.T) { app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) info1 := types.NewValidatorSigningInfo(sdk.ConsAddress(addrDels[0]), int64(4), int64(3), time.Now().UTC().Add(100000000000), false, int64(10)) diff --git a/x/slashing/handler_test.go b/x/slashing/handler_test.go index 7a83014b9615..87746d867213 100644 --- a/x/slashing/handler_test.go +++ b/x/slashing/handler_test.go @@ -26,7 +26,7 @@ func TestCannotUnjailUnlessJailed(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) slh := slashing.NewHandler(app.SlashingKeeper) @@ -52,12 +52,12 @@ func TestCannotUnjailUnlessMeetMinSelfDelegation(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) slh := slashing.NewHandler(app.SlashingKeeper) addr, val := sdk.ValAddress(pks[0].Address()), pks[0] - amt := sdk.TokensFromConsensusPower(100) + amt := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) msg := tstaking.CreateValidatorMsg(addr, val, amt) msg.MinSelfDelegation = amt tstaking.Handle(msg, true) @@ -84,7 +84,7 @@ func TestJailedValidatorDelegations(t *testing.T) { ctx := app.BaseApp.NewContext(false, tmproto.Header{Time: time.Unix(0, 0)}) pks := simapp.CreateTestPubKeys(3) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(20)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction)) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -145,7 +145,7 @@ func TestHandleAbsentValidator(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{Time: time.Unix(0, 0)}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) power := int64(100) diff --git a/x/slashing/init_test.go b/x/slashing/init_test.go index 25a38a2d5e53..fac4f3f32625 100644 --- a/x/slashing/init_test.go +++ b/x/slashing/init_test.go @@ -5,5 +5,5 @@ import ( ) var ( - InitTokens = sdk.TokensFromConsensusPower(200) + InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) ) diff --git a/x/slashing/keeper/common_test.go b/x/slashing/keeper/common_test.go index 940d995cacc7..aed5aa920393 100644 --- a/x/slashing/keeper/common_test.go +++ b/x/slashing/keeper/common_test.go @@ -3,5 +3,5 @@ package keeper_test import sdk "github.com/cosmos/cosmos-sdk/types" var ( - InitTokens = sdk.TokensFromConsensusPower(200) + InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) ) diff --git a/x/slashing/keeper/grpc_query_test.go b/x/slashing/keeper/grpc_query_test.go index d923b822c76c..c4880afd7fab 100644 --- a/x/slashing/keeper/grpc_query_test.go +++ b/x/slashing/keeper/grpc_query_test.go @@ -35,7 +35,7 @@ func (suite *SlashingTestSuite) SetupTest() { app.BankKeeper.SetParams(ctx, banktypes.DefaultParams()) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) info1 := types.NewValidatorSigningInfo(sdk.ConsAddress(addrDels[0]), int64(4), int64(3), time.Unix(2, 0), false, int64(10)) diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index e083df637a0f..002d6a03a39e 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -23,7 +23,7 @@ func TestUnJailNotBonded(t *testing.T) { p.MaxValidators = 5 app.StakingKeeper.SetParams(ctx, p) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 6, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 6, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) pks := simapp.CreateTestPubKeys(6) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -39,7 +39,7 @@ func TestUnJailNotBonded(t *testing.T) { // create a 6th validator with less power than the cliff validator (won't be bonded) addr, val := valAddrs[5], pks[5] - amt := sdk.TokensFromConsensusPower(50) + amt := sdk.TokensFromConsensusPower(50, sdk.DefaultPowerReduction) msg := tstaking.CreateValidatorMsg(addr, val, amt) msg.MinSelfDelegation = amt tstaking.Handle(msg, true) @@ -51,7 +51,7 @@ func TestUnJailNotBonded(t *testing.T) { // unbond below minimum self-delegation require.Equal(t, p.BondDenom, tstaking.Denom) - tstaking.Undelegate(sdk.AccAddress(addr), addr, sdk.TokensFromConsensusPower(1), true) + tstaking.Undelegate(sdk.AccAddress(addr), addr, sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction), true) staking.EndBlocker(ctx, app.StakingKeeper) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) @@ -83,7 +83,7 @@ func TestHandleNewValidator(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) pks := simapp.CreateTestPubKeys(1) addr, val := valAddrs[0], pks[0] @@ -116,7 +116,7 @@ func TestHandleNewValidator(t *testing.T) { validator, _ := app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(val)) require.Equal(t, stakingtypes.Bonded, validator.GetStatus()) bondPool := app.StakingKeeper.GetBondedPool(ctx) - expTokens := sdk.TokensFromConsensusPower(100) + expTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) require.True(t, expTokens.Equal(app.BankKeeper.GetBalance(ctx, bondPool.GetAddress(), app.StakingKeeper.BondDenom(ctx)).Amount)) } @@ -127,7 +127,7 @@ func TestHandleAlreadyJailed(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) pks := simapp.CreateTestPubKeys(1) addr, val := valAddrs[0], pks[0] @@ -159,7 +159,7 @@ func TestHandleAlreadyJailed(t *testing.T) { require.Equal(t, stakingtypes.Unbonding, validator.GetStatus()) // validator should have been slashed - resultingTokens := amt.Sub(sdk.TokensFromConsensusPower(1)) + resultingTokens := amt.Sub(sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction)) require.Equal(t, resultingTokens, validator.GetTokens()) // another block missed @@ -188,7 +188,7 @@ func TestValidatorDippingInAndOut(t *testing.T) { power := int64(100) pks := simapp.CreateTestPubKeys(3) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) addr, val := pks[0].Address(), pks[0] consAddr := sdk.ConsAddress(addr) diff --git a/x/slashing/keeper/signing_info_test.go b/x/slashing/keeper/signing_info_test.go index 1b70c83b9712..e1b4f1720afe 100644 --- a/x/slashing/keeper/signing_info_test.go +++ b/x/slashing/keeper/signing_info_test.go @@ -15,7 +15,7 @@ import ( func TestGetSetValidatorSigningInfo(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) info, found := app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0])) require.False(t, found) @@ -39,7 +39,7 @@ func TestGetSetValidatorSigningInfo(t *testing.T) { func TestGetSetValidatorMissedBlockBitArray(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) missed := app.SlashingKeeper.GetValidatorMissedBlockBitArray(ctx, sdk.ConsAddress(addrDels[0]), 0) require.False(t, missed) // treat empty key as not missed @@ -51,7 +51,7 @@ func TestGetSetValidatorMissedBlockBitArray(t *testing.T) { func TestTombstoned(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) require.Panics(t, func() { app.SlashingKeeper.Tombstone(ctx, sdk.ConsAddress(addrDels[0])) }) require.False(t, app.SlashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(addrDels[0]))) @@ -75,7 +75,7 @@ func TestTombstoned(t *testing.T) { func TestJailUntil(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) require.Panics(t, func() { app.SlashingKeeper.JailUntil(ctx, sdk.ConsAddress(addrDels[0]), time.Now()) }) diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index 15764c631ebf..2042821c7a76 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -77,7 +77,7 @@ func TestSimulateMsgUnjail(t *testing.T) { app.StakingKeeper.Jail(ctx, val0ConsAddress) // setup self delegation - delTokens := sdk.TokensFromConsensusPower(2) + delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) val0AccAddress, err := sdk.ValAddressFromBech32(validator0.OperatorAddress) require.NoError(t, err) @@ -116,7 +116,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { func getTestingAccounts(t *testing.T, r *rand.Rand, app *simapp.SimApp, ctx sdk.Context, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200) + initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/staking/app_test.go b/x/staking/app_test.go index 207ac03e0cf6..65a6e4524ebf 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -40,8 +40,8 @@ func checkDelegation( } func TestStakingMsgs(t *testing.T) { - genTokens := sdk.TokensFromConsensusPower(42) - bondTokens := sdk.TokensFromConsensusPower(10) + genTokens := sdk.TokensFromConsensusPower(42, sdk.DefaultPowerReduction) + bondTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) genCoin := sdk.NewCoin(sdk.DefaultBondDenom, genTokens) bondCoin := sdk.NewCoin(sdk.DefaultBondDenom, bondTokens) diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 10ceba6a45e0..9b79fd3186b4 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -19,7 +19,7 @@ import ( // default values var ( - DefaultTokens = sdk.TokensFromConsensusPower(100) + DefaultTokens = sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) defaultAmount = DefaultTokens.String() + sdk.DefaultBondDenom defaultCommissionRate = "0.1" defaultCommissionMaxRate = "0.2" diff --git a/x/staking/common_test.go b/x/staking/common_test.go index 0c26e6830d5a..5d8897b1c0a8 100644 --- a/x/staking/common_test.go +++ b/x/staking/common_test.go @@ -15,7 +15,7 @@ import ( ) func init() { - sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) + sdk.DefaultPowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) } // nolint:deadcode,unused,varcheck diff --git a/x/staking/genesis.go b/x/staking/genesis.go index 02f6bc317473..2f2eb5bba9b6 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -143,7 +143,7 @@ func InitGenesis( panic(fmt.Sprintf("validator %s not found", lv.Address)) } - update := validator.ABCIValidatorUpdate() + update := validator.ABCIValidatorUpdate(keeper.PowerReduction(ctx)) update.Power = lv.Power // keep the next-val-set offset, use the last power for the first block res = append(res, update) } @@ -210,7 +210,7 @@ func WriteValidators(ctx sdk.Context, keeper keeper.Keeper) (vals []tmtypes.Gene vals = append(vals, tmtypes.GenesisValidator{ Address: sdk.ConsAddress(tmPk.Address()).Bytes(), PubKey: tmPk, - Power: validator.GetConsensusPower(), + Power: validator.GetConsensusPower(keeper.PowerReduction(ctx)), Name: validator.GetMoniker(), }) diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 28e3dec8a0fd..4c4bf97847ce 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -23,7 +23,7 @@ func bootstrapGenesisTest(t *testing.T, power int64, numAddrs int) (*simapp.SimA addrDels, _ := generateAddresses(app, ctx, numAddrs, sdk.NewInt(10000)) - amt := sdk.TokensFromConsensusPower(power) + amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -39,7 +39,7 @@ func bootstrapGenesisTest(t *testing.T, power int64, numAddrs int) (*simapp.SimA func TestInitGenesis(t *testing.T) { app, ctx, addrs := bootstrapGenesisTest(t, 1000, 10) - valTokens := sdk.TokensFromConsensusPower(1) + valTokens := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) params := app.StakingKeeper.GetParams(ctx) validators := make([]types.Validator, 2) @@ -91,7 +91,7 @@ func TestInitGenesis(t *testing.T) { abcivals := make([]abci.ValidatorUpdate, len(vals)) for i, val := range validators { - abcivals[i] = val.ABCIValidatorUpdate() + abcivals[i] = val.ABCIValidatorUpdate(sdk.DefaultPowerReduction) } require.Equal(t, abcivals, vals) @@ -113,9 +113,9 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) { require.NoError(t, err) validators[i].Status = types.Bonded - tokens := sdk.TokensFromConsensusPower(1) + tokens := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) if i < 100 { - tokens = sdk.TokensFromConsensusPower(2) + tokens = sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) } validators[i].Tokens = tokens validators[i].DelegatorShares = tokens.ToDec() @@ -126,7 +126,7 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) { abcivals := make([]abci.ValidatorUpdate, 100) for i, val := range validators[:100] { - abcivals[i] = val.ABCIValidatorUpdate() + abcivals[i] = val.ABCIValidatorUpdate(sdk.DefaultPowerReduction) } require.Equal(t, abcivals, vals) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 4b48f09427c9..07c3c23854c0 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -32,7 +32,7 @@ func bootstrapHandlerGenesisTest(t *testing.T, power int64, numAddrs int, accAmo addrDels, addrVals := generateAddresses(app, ctx, numAddrs, accAmount) - amt := sdk.TokensFromConsensusPower(power) + amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -47,7 +47,7 @@ func bootstrapHandlerGenesisTest(t *testing.T, power int64, numAddrs int, accAmo func TestValidatorByPowerIndex(t *testing.T) { initPower := int64(1000000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr, validatorAddr3 := valAddrs[0], valAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -68,7 +68,7 @@ func TestValidatorByPowerIndex(t *testing.T) { // verify that the by power index exists validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddr) require.True(t, found) - power := types.GetValidatorsByPowerIndexKey(validator) + power := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) // create a second validator keep it bonded @@ -97,11 +97,11 @@ func TestValidatorByPowerIndex(t *testing.T) { // but the new power record should have been created validator, found = app.StakingKeeper.GetValidator(ctx, validatorAddr) require.True(t, found) - power2 := types.GetValidatorsByPowerIndexKey(validator) + power2 := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power2)) // now the new record power index should be the same as the original record - power3 := types.GetValidatorsByPowerIndexKey(validator) + power3 := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) require.Equal(t, power2, power3) // unbond self-delegation @@ -124,7 +124,7 @@ func TestValidatorByPowerIndex(t *testing.T) { func TestDuplicatesMsgCreateValidator(t *testing.T) { initPower := int64(1000000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) addr1, addr2 := valAddrs[0], valAddrs[1] pk1, pk2 := PKs[0], PKs[1] @@ -172,7 +172,7 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519}}, }) @@ -218,7 +218,7 @@ func TestBothPubKeyTypesMsgCreateValidator(t *testing.T) { func TestLegacyValidatorDelegations(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) valAddr := valAddrs[0] @@ -297,8 +297,8 @@ func TestLegacyValidatorDelegations(t *testing.T) { func TestIncrementsMsgDelegate(t *testing.T) { initPower := int64(1000) - initBond := sdk.TokensFromConsensusPower(initPower) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + initBond := sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) params := app.StakingKeeper.GetParams(ctx) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] @@ -356,8 +356,8 @@ func TestIncrementsMsgDelegate(t *testing.T) { func TestEditValidatorDecreaseMinSelfDelegation(t *testing.T) { initPower := int64(100) - initBond := sdk.TokensFromConsensusPower(100) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) + initBond := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -387,9 +387,9 @@ func TestEditValidatorDecreaseMinSelfDelegation(t *testing.T) { func TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond(t *testing.T) { initPower := int64(100) - initBond := sdk.TokensFromConsensusPower(100) + initBond := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -419,7 +419,7 @@ func TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond(t *testing.T) { func TestIncrementsMsgUnbond(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) params := app.StakingKeeper.GetParams(ctx) denom := params.BondDenom @@ -491,8 +491,8 @@ func TestIncrementsMsgUnbond(t *testing.T) { errorCases := []sdk.Int{ //1<<64 - 1, // more than int64 power //1<<63 + 1, // more than int64 power - sdk.TokensFromConsensusPower(1<<63 - 1), - sdk.TokensFromConsensusPower(1 << 31), + sdk.TokensFromConsensusPower(1<<63-1, sdk.DefaultPowerReduction), + sdk.TokensFromConsensusPower(1<<31, sdk.DefaultPowerReduction), initBond, } @@ -507,8 +507,8 @@ func TestIncrementsMsgUnbond(t *testing.T) { func TestMultipleMsgCreateValidator(t *testing.T) { initPower := int64(1000) - initTokens := sdk.TokensFromConsensusPower(initPower) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) + initTokens := sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) params := app.StakingKeeper.GetParams(ctx) blockTime := time.Now().UTC() @@ -527,7 +527,7 @@ func TestMultipleMsgCreateValidator(t *testing.T) { } // bond them all - amt := sdk.TokensFromConsensusPower(10) + amt := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) for i, validatorAddr := range validatorAddrs { tstaking.CreateValidator(validatorAddr, PKs[i], amt, true) // verify that the account is bonded @@ -577,7 +577,7 @@ func TestMultipleMsgCreateValidator(t *testing.T) { func TestMultipleMsgDelegate(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 50, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 50, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr, delegatorAddrs := valAddrs[0], delAddrs[1:] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) var amount int64 = 10 @@ -611,7 +611,7 @@ func TestMultipleMsgDelegate(t *testing.T) { func TestJailValidator(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) var amt int64 = 10 @@ -650,7 +650,7 @@ func TestJailValidator(t *testing.T) { func TestValidatorQueue(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -697,7 +697,7 @@ func TestValidatorQueue(t *testing.T) { func TestUnbondingPeriod(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -736,7 +736,7 @@ func TestUnbondingPeriod(t *testing.T) { func TestUnbondingFromUnbondingValidator(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -769,7 +769,7 @@ func TestUnbondingFromUnbondingValidator(t *testing.T) { func TestRedelegationPeriod(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) validatorAddr, validatorAddr2 := valAddrs[0], valAddrs[1] denom := app.StakingKeeper.GetParams(ctx).BondDenom tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -820,7 +820,7 @@ func TestRedelegationPeriod(t *testing.T) { func TestTransitiveRedelegation(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) val1, val2, val3 := valAddrs[0], valAddrs[1], valAddrs[2] blockTime := time.Now().UTC() @@ -854,7 +854,7 @@ func TestTransitiveRedelegation(t *testing.T) { func TestMultipleRedelegationAtSameTime(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) valAddr := valAddrs[0] valAddr2 := valAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -898,7 +898,7 @@ func TestMultipleRedelegationAtSameTime(t *testing.T) { func TestMultipleRedelegationAtUniqueTimes(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) valAddr := valAddrs[0] valAddr2 := valAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -945,7 +945,7 @@ func TestMultipleRedelegationAtUniqueTimes(t *testing.T) { func TestMultipleUnbondingDelegationAtSameTime(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) valAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -985,7 +985,7 @@ func TestMultipleUnbondingDelegationAtSameTime(t *testing.T) { func TestMultipleUnbondingDelegationAtUniqueTimes(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) valAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -1033,7 +1033,7 @@ func TestMultipleUnbondingDelegationAtUniqueTimes(t *testing.T) { func TestUnbondingWhenExcessValidators(t *testing.T) { initPower := int64(1000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) val1 := valAddrs[0] val2 := valAddrs[1] val3 := valAddrs[2] @@ -1073,7 +1073,7 @@ func TestUnbondingWhenExcessValidators(t *testing.T) { func TestBondUnbondRedelegateSlashTwice(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) valA, valB, del := valAddrs[0], valAddrs[1], delAddrs[2] consAddr0 := sdk.ConsAddress(PKs[0].Address()) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -1094,11 +1094,11 @@ func TestBondUnbondRedelegateSlashTwice(t *testing.T) { tstaking.Ctx = ctx // begin unbonding 4 stake - unbondAmt := sdk.TokensFromConsensusPower(4) + unbondAmt := sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction) tstaking.Undelegate(del, valA, unbondAmt, true) // begin redelegate 6 stake - redAmt := sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(6)) + redAmt := sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction)) msgBeginRedelegate := types.NewMsgBeginRedelegate(del, valA, valB, redAmt) tstaking.Handle(msgBeginRedelegate, true) @@ -1178,11 +1178,11 @@ func TestInvalidMsg(t *testing.T) { func TestInvalidCoinDenom(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) valA, valB, delAddr := valAddrs[0], valAddrs[1], delAddrs[2] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) - valTokens := sdk.TokensFromConsensusPower(100) + valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) invalidCoin := sdk.NewCoin("churros", valTokens) validCoin := sdk.NewCoin(sdk.DefaultBondDenom, valTokens) oneCoin := sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt()) diff --git a/x/staking/keeper/common_test.go b/x/staking/keeper/common_test.go index 7ec4e9677cbc..fb07d8694e8b 100644 --- a/x/staking/keeper/common_test.go +++ b/x/staking/keeper/common_test.go @@ -18,7 +18,7 @@ var ( ) func init() { - sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) + sdk.DefaultPowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) } // createTestInput Returns a simapp with custom StakingKeeper diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 77f4cb8e2c81..7ec6bfe521d0 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -183,7 +183,7 @@ func TestUnbondDelegation(t *testing.T) { delAddrs := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000)) valAddrs := simapp.ConvertAddrsToValAddrs(delAddrs) - startTokens := sdk.TokensFromConsensusPower(10) + startTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) require.NoError(t, @@ -207,7 +207,7 @@ func TestUnbondDelegation(t *testing.T) { delegation := types.NewDelegation(delAddrs[0], valAddrs[0], issuedShares) app.StakingKeeper.SetDelegation(ctx, delegation) - bondTokens := sdk.TokensFromConsensusPower(6) + bondTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) amount, err := app.StakingKeeper.Unbond(ctx, delAddrs[0], valAddrs[0], bondTokens.ToDec()) require.NoError(t, err) require.Equal(t, bondTokens, amount) // shares to be added to an unbonding delegation @@ -228,7 +228,7 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(10) + startTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) bondDenom := app.StakingKeeper.BondDenom(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -310,7 +310,7 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) //create a validator with a self-delegation @@ -358,7 +358,7 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { app.StakingKeeper.SetDelegation(ctx, delegation) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - _, err = app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.TokensFromConsensusPower(6).ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction).ToDec()) require.NoError(t, err) // end block @@ -366,14 +366,14 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) - require.Equal(t, sdk.TokensFromConsensusPower(14), validator.Tokens) + require.Equal(t, sdk.TokensFromConsensusPower(14, sdk.DefaultPowerReduction), validator.Tokens) require.Equal(t, types.Unbonding, validator.Status) require.True(t, validator.Jailed) } func TestUndelegateFromUnbondingValidator(t *testing.T) { _, app, ctx := createTestInput() - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) @@ -466,7 +466,7 @@ func TestUndelegateFromUnbondingValidator(t *testing.T) { func TestUndelegateFromUnbondedValidator(t *testing.T) { _, app, ctx := createTestInput() - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) @@ -483,7 +483,7 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -534,7 +534,7 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { require.Equal(t, validator.Status, types.Unbonded) // unbond some of the other delegation's shares - unbondTokens := sdk.TokensFromConsensusPower(6) + unbondTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], unbondTokens.ToDec()) require.NoError(t, err) @@ -550,7 +550,7 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { func TestUnbondingAllDelegationFromValidator(t *testing.T) { _, app, ctx := createTestInput() - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) @@ -567,7 +567,7 @@ func TestUnbondingAllDelegationFromValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) @@ -720,7 +720,7 @@ func TestRedelegateToSameValidator(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), valTokens)) // add bonded tokens to pool for delegations @@ -751,7 +751,7 @@ func TestRedelegationMaxEntries(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(20) + startTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -763,7 +763,7 @@ func TestRedelegationMaxEntries(t *testing.T) { // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -809,7 +809,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(30) + startTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -823,7 +823,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) @@ -841,7 +841,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { require.Equal(t, types.Bonded, validator2.Status) // create a second delegation to validator 1 - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(t, delTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -867,7 +867,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(30) + startTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -881,7 +881,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -891,7 +891,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { // create a second delegation to this validator app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(t, delTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -933,7 +933,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { ctx = ctx.WithBlockHeader(header) // unbond some of the other delegation's shares - redelegateTokens := sdk.TokensFromConsensusPower(6) + redelegateTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegateTokens.ToDec()) require.NoError(t, err) @@ -951,7 +951,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(30) + startTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -965,7 +965,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -975,7 +975,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { // create a second delegation to this validator app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) - delTokens := sdk.TokensFromConsensusPower(10) + delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(t, delTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -1009,7 +1009,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { app.StakingKeeper.UnbondingToUnbonded(ctx, validator) // redelegate some of the delegation's shares - redelegationTokens := sdk.TokensFromConsensusPower(6) + redelegationTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegationTokens.ToDec()) require.NoError(t, err) diff --git a/x/staking/keeper/grpc_query_test.go b/x/staking/keeper/grpc_query_test.go index aa3b341b0953..a1d4c88883ff 100644 --- a/x/staking/keeper/grpc_query_test.go +++ b/x/staking/keeper/grpc_query_test.go @@ -395,7 +395,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryUnbondingDelegation() { addrAcc2 := addrs[1] addrVal2 := vals[1].OperatorAddress - unbondingTokens := sdk.TokensFromConsensusPower(2) + unbondingTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) valAddr, err1 := sdk.ValAddressFromBech32(addrVal2) suite.NoError(err1) _, err := app.StakingKeeper.Undelegate(ctx, addrAcc2, valAddr, unbondingTokens.ToDec()) @@ -450,7 +450,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() { addrAcc, addrAcc1 := addrs[0], addrs[1] addrVal, addrVal2 := vals[0].OperatorAddress, vals[1].OperatorAddress - unbondingTokens := sdk.TokensFromConsensusPower(2) + unbondingTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) valAddr1, err1 := sdk.ValAddressFromBech32(addrVal) suite.NoError(err1) _, err := app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr1, unbondingTokens.ToDec()) @@ -592,12 +592,12 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() { addrAcc, addrAcc1 := addrs[0], addrs[1] valAddrs := simapp.ConvertAddrsToValAddrs(addrs) val1, val2, val3, val4 := vals[0], vals[1], valAddrs[3], valAddrs[4] - delAmount := sdk.TokensFromConsensusPower(1) + delAmount := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) _, err := app.StakingKeeper.Delegate(ctx, addrAcc1, delAmount, types.Unbonded, val1, true) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) - rdAmount := sdk.TokensFromConsensusPower(1) + rdAmount := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc1, val1.GetOperator(), val2.GetOperator(), rdAmount.ToDec()) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) @@ -684,7 +684,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { val1 := vals[0] // undelegate - undelAmount := sdk.TokensFromConsensusPower(2) + undelAmount := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) _, err := app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), undelAmount.ToDec()) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) @@ -729,7 +729,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { } func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers []int64) ([]sdk.AccAddress, []sdk.ValAddress, []types.Validator) { - addrs := simapp.AddTestAddrsIncremental(app, ctx, 5, sdk.TokensFromConsensusPower(300)) + addrs := simapp.AddTestAddrsIncremental(app, ctx, 5, sdk.TokensFromConsensusPower(300, sdk.DefaultPowerReduction)) valAddrs := simapp.ConvertAddrsToValAddrs(addrs) pks := simapp.CreateTestPubKeys(5) cdc := simapp.MakeTestEncodingConfig().Marshaler @@ -752,11 +752,11 @@ func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val1) app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val2) - _, err := app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0]), types.Unbonded, val1, true) + _, err := app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0], sdk.DefaultPowerReduction), types.Unbonded, val1, true) require.NoError(t, err) - _, err = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1]), types.Unbonded, val2, true) + _, err = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1], sdk.DefaultPowerReduction), types.Unbonded, val2, true) require.NoError(t, err) - _, err = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[2]), types.Unbonded, val2, true) + _, err = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[2], sdk.DefaultPowerReduction), types.Unbonded, val2, true) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) diff --git a/x/staking/keeper/historical_info.go b/x/staking/keeper/historical_info.go index 20c5a8ce85c9..f56f49eb145f 100644 --- a/x/staking/keeper/historical_info.go +++ b/x/staking/keeper/historical_info.go @@ -91,7 +91,7 @@ func (k Keeper) TrackHistoricalInfo(ctx sdk.Context) { // Create HistoricalInfo struct lastVals := k.GetLastValidators(ctx) - historicalEntry := types.NewHistoricalInfo(ctx.BlockHeader(), lastVals) + historicalEntry := types.NewHistoricalInfo(ctx.BlockHeader(), lastVals, k.PowerReduction(ctx)) // Set latest HistoricalInfo at current height k.SetHistoricalInfo(ctx, ctx.BlockHeight(), &historicalEntry) diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index a9411d0db974..b31407cf8e96 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -25,7 +25,7 @@ func TestHistoricalInfo(t *testing.T) { validators[i] = teststaking.NewValidator(t, valAddr, PKs[i]) } - hi := types.NewHistoricalInfo(ctx.BlockHeader(), validators) + hi := types.NewHistoricalInfo(ctx.BlockHeader(), validators, sdk.DefaultPowerReduction) app.StakingKeeper.SetHistoricalInfo(ctx, 2, &hi) recv, found := app.StakingKeeper.GetHistoricalInfo(ctx, 2) @@ -65,8 +65,8 @@ func TestTrackHistoricalInfo(t *testing.T) { teststaking.NewValidator(t, addrVals[0], PKs[0]), teststaking.NewValidator(t, addrVals[1], PKs[1]), } - hi4 := types.NewHistoricalInfo(h4, valSet) - hi5 := types.NewHistoricalInfo(h5, valSet) + hi4 := types.NewHistoricalInfo(h4, valSet, sdk.DefaultPowerReduction) + hi5 := types.NewHistoricalInfo(h5, valSet, sdk.DefaultPowerReduction) app.StakingKeeper.SetHistoricalInfo(ctx, 4, &hi4) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi5) recv, found := app.StakingKeeper.GetHistoricalInfo(ctx, 4) diff --git a/x/staking/keeper/invariants.go b/x/staking/keeper/invariants.go index e21de8f9511d..3516316f6c8b 100644 --- a/x/staking/keeper/invariants.go +++ b/x/staking/keeper/invariants.go @@ -105,13 +105,13 @@ func NonNegativePowerInvariant(k Keeper) sdk.Invariant { panic(fmt.Sprintf("validator record not found for address: %X\n", iterator.Value())) } - powerKey := types.GetValidatorsByPowerIndexKey(validator) + powerKey := types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx)) if !bytes.Equal(iterator.Key(), powerKey) { broken = true msg += fmt.Sprintf("power store invariance:\n\tvalidator.Power: %v"+ "\n\tkey should be: %v\n\tkey in store: %v\n", - validator.GetConsensusPower(), powerKey, iterator.Key()) + validator.GetConsensusPower(k.PowerReduction(ctx)), powerKey, iterator.Key()) } if validator.Tokens.IsNegative() { diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index 2f9819989ff0..bc0825a8e74a 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -45,7 +45,7 @@ func (suite *KeeperTestSuite) SetupTest() { // have its order changed sortedVals := make([]types.Validator, len(validators)) copy(sortedVals, validators) - hi := types.NewHistoricalInfo(header, sortedVals) + hi := types.NewHistoricalInfo(header, sortedVals, sdk.DefaultPowerReduction) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi) suite.app, suite.ctx, suite.queryClient, suite.addrs, suite.vals = app, ctx, queryClient, addrs, validators diff --git a/x/staking/keeper/params.go b/x/staking/keeper/params.go index 7fe0a8d098eb..37c433415b0d 100644 --- a/x/staking/keeper/params.go +++ b/x/staking/keeper/params.go @@ -39,6 +39,13 @@ func (k Keeper) BondDenom(ctx sdk.Context) (res string) { return } +// PowerReduction - is the amount of staking tokens required for 1 unit of consensus-engine power +// governance can update it on a running chain +func (k Keeper) PowerReduction(ctx sdk.Context) (res sdk.Int) { + k.paramstore.Get(ctx, types.KeyPowerReduction, &res) + return +} + // Get all parameteras as types.Params func (k Keeper) GetParams(ctx sdk.Context) types.Params { return types.NewParams( @@ -47,6 +54,7 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { k.MaxEntries(ctx), k.HistoricalEntries(ctx), k.BondDenom(ctx), + k.PowerReduction(ctx), ) } diff --git a/x/staking/keeper/power_reduction.go b/x/staking/keeper/power_reduction.go new file mode 100644 index 000000000000..d979228b36fa --- /dev/null +++ b/x/staking/keeper/power_reduction.go @@ -0,0 +1,15 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// TokensToConsensusPower - convert input tokens to potential consensus-engine power +func (k Keeper) TokensToConsensusPower(ctx sdk.Context, tokens sdk.Int) int64 { + return sdk.TokensToConsensusPower(tokens, k.PowerReduction(ctx)) +} + +// TokensFromConsensusPower - convert input power to tokens +func (k Keeper) TokensFromConsensusPower(ctx sdk.Context, power int64) sdk.Int { + return sdk.TokensFromConsensusPower(power, k.PowerReduction(ctx)) +} diff --git a/x/staking/keeper/power_reduction_test.go b/x/staking/keeper/power_reduction_test.go new file mode 100644 index 000000000000..df54a0358f07 --- /dev/null +++ b/x/staking/keeper/power_reduction_test.go @@ -0,0 +1,21 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (suite *KeeperTestSuite) TestPowerReductionChange(t *testing.T) { + // TODO: Implement! +} + +func (suite *KeeperTestSuite) TestTokensToConsensusPower() { + suite.Require().Equal(int64(0), suite.app.StakingKeeper.TokensToConsensusPower(suite.ctx, sdk.NewInt(999_999))) + suite.Require().Equal(int64(1), suite.app.StakingKeeper.TokensToConsensusPower(suite.ctx, sdk.NewInt(1_000_000))) +} + +func (suite *KeeperTestSuite) TestTokensFromConsensusPower() { + suite.Require().Equal(sdk.NewInt(0), suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 0)) + suite.Require().Equal(sdk.NewInt(1_000_000), suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 1)) +} diff --git a/x/staking/keeper/querier_test.go b/x/staking/keeper/querier_test.go index 0b194bd6dc71..14cd841f2e9b 100644 --- a/x/staking/keeper/querier_test.go +++ b/x/staking/keeper/querier_test.go @@ -37,7 +37,7 @@ func TestNewQuerier(t *testing.T) { ChainID: "HelloChain", Height: 5, } - hi := types.NewHistoricalInfo(header, validators[:]) + hi := types.NewHistoricalInfo(header, validators[:], sdk.DefaultPowerReduction) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi) query := abci.RequestQuery{ @@ -140,7 +140,7 @@ func TestQueryValidators(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 500, sdk.TokensFromConsensusPower(10000)) + addrs := simapp.AddTestAddrs(app, ctx, 500, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) // Create Validators amts := []sdk.Int{sdk.NewInt(9), sdk.NewInt(8), sdk.NewInt(7)} @@ -208,7 +208,7 @@ func TestQueryDelegation(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000)) + addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1, addrVal2 := sdk.ValAddress(addrAcc1), sdk.ValAddress(addrAcc2) @@ -224,7 +224,7 @@ func TestQueryDelegation(t *testing.T) { app.StakingKeeper.SetValidator(ctx, val2) app.StakingKeeper.SetValidatorByPowerIndex(ctx, val2) - delTokens := sdk.TokensFromConsensusPower(20) + delTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) _, err := app.StakingKeeper.Delegate(ctx, addrAcc2, delTokens, types.Unbonded, val1, true) require.NoError(t, err) @@ -348,7 +348,7 @@ func TestQueryDelegation(t *testing.T) { require.Equal(t, sdk.NewCoin(sdk.DefaultBondDenom, delegation.Shares.TruncateInt()), delegationsRes[0].Balance) // Query unbonding delegation - unbondingTokens := sdk.TokensFromConsensusPower(10) + unbondingTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.Undelegate(ctx, addrAcc2, val1.GetOperator(), unbondingTokens.ToDec()) require.NoError(t, err) @@ -401,7 +401,7 @@ func TestQueryDelegation(t *testing.T) { require.Error(t, err) // Query redelegation - redelegationTokens := sdk.TokensFromConsensusPower(10) + redelegationTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator(), redelegationTokens.ToDec()) require.NoError(t, err) @@ -456,7 +456,7 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 100, sdk.TokensFromConsensusPower(10000)) + addrs := simapp.AddTestAddrs(app, ctx, 100, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) pubKeys := simapp.CreateTestPubKeys(1) valAddress := sdk.ValAddress(addrs[0]) @@ -472,7 +472,7 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { t.Error("expected validator not found") } - delTokens := sdk.TokensFromConsensusPower(20) + delTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) _, err := app.StakingKeeper.Delegate(ctx, addr, delTokens, types.Unbonded, validator, true) require.NoError(t, err) } @@ -506,7 +506,7 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { // Undelegate for _, addr := range addrs { - delTokens := sdk.TokensFromConsensusPower(20) + delTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) _, err := app.StakingKeeper.Undelegate(ctx, addr, val1.GetOperator(), delTokens.ToDec()) require.NoError(t, err) } @@ -541,7 +541,7 @@ func TestQueryRedelegations(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000)) + addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1, addrVal2 := sdk.ValAddress(addrAcc1), sdk.ValAddress(addrAcc2) @@ -551,12 +551,12 @@ func TestQueryRedelegations(t *testing.T) { app.StakingKeeper.SetValidator(ctx, val1) app.StakingKeeper.SetValidator(ctx, val2) - delAmount := sdk.TokensFromConsensusPower(100) + delAmount := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) _, err := app.StakingKeeper.Delegate(ctx, addrAcc2, delAmount, types.Unbonded, val1, true) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) - rdAmount := sdk.TokensFromConsensusPower(20) + rdAmount := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator(), rdAmount.ToDec()) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) @@ -613,7 +613,7 @@ func TestQueryUnbondingDelegation(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000)) + addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1 := sdk.ValAddress(addrAcc1) @@ -622,13 +622,13 @@ func TestQueryUnbondingDelegation(t *testing.T) { app.StakingKeeper.SetValidator(ctx, val1) // delegate - delAmount := sdk.TokensFromConsensusPower(100) + delAmount := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) _, err := app.StakingKeeper.Delegate(ctx, addrAcc1, delAmount, types.Unbonded, val1, true) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) // undelegate - undelAmount := sdk.TokensFromConsensusPower(20) + undelAmount := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) _, err = app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), undelAmount.ToDec()) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) @@ -709,7 +709,7 @@ func TestQueryHistoricalInfo(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(cdc) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000)) + addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1, addrVal2 := sdk.ValAddress(addrAcc1), sdk.ValAddress(addrAcc2) @@ -724,7 +724,7 @@ func TestQueryHistoricalInfo(t *testing.T) { ChainID: "HelloChain", Height: 5, } - hi := types.NewHistoricalInfo(header, vals) + hi := types.NewHistoricalInfo(header, vals, sdk.DefaultPowerReduction) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi) queryHistoricalParams := types.QueryHistoricalInfoRequest{Height: 4} diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index a36f6f2e6e20..42e5b383ef02 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -29,7 +29,7 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh } // Amount of slashing = slash slashFactor * power at time of infraction - amount := sdk.TokensFromConsensusPower(power) + amount := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) slashAmountDec := amount.ToDec().Mul(slashFactor) slashAmount := slashAmountDec.TruncateInt() diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 356c022e4e26..941a5a70be46 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -22,7 +22,7 @@ func bootstrapSlashTest(t *testing.T, power int64) (*simapp.SimApp, sdk.Context, addrDels, addrVals := generateAddresses(app, ctx, 100) - amt := sdk.TokensFromConsensusPower(power) + amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -219,12 +219,12 @@ func TestSlashAtNegativeHeight(t *testing.T) { validator, found = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) require.True(t, found) // power decreased - require.Equal(t, int64(5), validator.GetConsensusPower()) + require.Equal(t, int64(5), validator.GetConsensusPower(sdk.DefaultPowerReduction)) // pool bonded shares decreased newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(5).String(), diffTokens.String()) + require.Equal(t, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction).String(), diffTokens.String()) } // tests Slash at the current height @@ -250,12 +250,12 @@ func TestSlashValidatorAtCurrentHeight(t *testing.T) { validator, found = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) assert.True(t, found) // power decreased - require.Equal(t, int64(5), validator.GetConsensusPower()) + require.Equal(t, int64(5), validator.GetConsensusPower(sdk.DefaultPowerReduction)) // pool bonded shares decreased newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(5).String(), diffTokens.String()) + require.Equal(t, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction).String(), diffTokens.String()) } // tests Slash at a previous height with an unbonding delegation @@ -267,7 +267,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // set an unbonding delegation with expiration timestamp beyond which the // unbonding delegation shouldn't be slashed - ubdTokens := sdk.TokensFromConsensusPower(4) + ubdTokens := sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction) ubd := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 11, time.Unix(0, 0), ubdTokens) app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) @@ -290,12 +290,12 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { require.Len(t, ubd.Entries, 1) // balance decreased - require.Equal(t, sdk.TokensFromConsensusPower(2), ubd.Entries[0].Balance) + require.Equal(t, sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction), ubd.Entries[0].Balance) // bonded tokens burned newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(3), diffTokens) + require.Equal(t, sdk.TokensFromConsensusPower(3, sdk.DefaultPowerReduction), diffTokens) // read updated validator validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) @@ -305,7 +305,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // was still bonded at the time of discovery and was slashed by half, 4 stake // bonded at the time of discovery hadn't been bonded at the time of infraction // and wasn't slashed - require.Equal(t, int64(7), validator.GetConsensusPower()) + require.Equal(t, int64(7), validator.GetConsensusPower(sdk.DefaultPowerReduction)) // slash validator again ctx = ctx.WithBlockHeight(13) @@ -321,14 +321,14 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned again newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(6), diffTokens) + require.Equal(t, sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction), diffTokens) // read updated validator validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 3 again - require.Equal(t, int64(4), validator.GetConsensusPower()) + require.Equal(t, int64(4), validator.GetConsensusPower(sdk.DefaultPowerReduction)) // slash validator again // all originally bonded stake has been slashed, so this will have no effect @@ -347,14 +347,14 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned again newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(9), diffTokens) + require.Equal(t, sdk.TokensFromConsensusPower(9, sdk.DefaultPowerReduction), diffTokens) // read updated validator validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 3 again - require.Equal(t, int64(1), validator.GetConsensusPower()) + require.Equal(t, int64(1), validator.GetConsensusPower(sdk.DefaultPowerReduction)) // slash validator again // all originally bonded stake has been slashed, so this will have no effect @@ -373,7 +373,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // just 1 bonded token burned again since that's all the validator now has newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(10), diffTokens) + require.Equal(t, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction), diffTokens) // apply TM updates applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) @@ -394,7 +394,7 @@ func TestSlashWithRedelegation(t *testing.T) { bondDenom := app.StakingKeeper.BondDenom(ctx) // set a redelegation - rdTokens := sdk.TokensFromConsensusPower(6) + rdTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdTokens, rdTokens.ToDec()) app.StakingKeeper.SetRedelegation(ctx, rd) @@ -424,7 +424,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, fraction) }) - burnAmount := sdk.TokensFromConsensusPower(10).ToDec().Mul(fraction).TruncateInt() + burnAmount := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec().Mul(fraction).TruncateInt() bondedPool = app.StakingKeeper.GetBondedPool(ctx) notBondedPool = app.StakingKeeper.GetNotBondedPool(ctx) @@ -448,14 +448,14 @@ func TestSlashWithRedelegation(t *testing.T) { // was still bonded at the time of discovery and was slashed by half, 4 stake // bonded at the time of discovery hadn't been bonded at the time of infraction // and wasn't slashed - require.Equal(t, int64(8), validator.GetConsensusPower()) + require.Equal(t, int64(8), validator.GetConsensusPower(sdk.DefaultPowerReduction)) // slash the validator again validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, sdk.OneDec()) }) - burnAmount = sdk.TokensFromConsensusPower(7) + burnAmount = sdk.TokensFromConsensusPower(7, sdk.DefaultPowerReduction) // read updated pool bondedPool = app.StakingKeeper.GetBondedPool(ctx) @@ -481,7 +481,7 @@ func TestSlashWithRedelegation(t *testing.T) { validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 4 - require.Equal(t, int64(4), validator.GetConsensusPower()) + require.Equal(t, int64(4), validator.GetConsensusPower(sdk.DefaultPowerReduction)) // slash the validator again, by 100% ctx = ctx.WithBlockHeight(12) @@ -490,7 +490,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, sdk.OneDec()) }) - burnAmount = sdk.TokensFromConsensusPower(10).ToDec().Mul(sdk.OneDec()).TruncateInt() + burnAmount = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec().Mul(sdk.OneDec()).TruncateInt() burnAmount = burnAmount.Sub(sdk.OneDec().MulInt(rdTokens).TruncateInt()) // read updated pool @@ -550,7 +550,7 @@ func TestSlashBoth(t *testing.T) { // set a redelegation with expiration timestamp beyond which the // redelegation shouldn't be slashed - rdATokens := sdk.TokensFromConsensusPower(6) + rdATokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) rdA := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdATokens, rdATokens.ToDec()) @@ -562,7 +562,7 @@ func TestSlashBoth(t *testing.T) { // set an unbonding delegation with expiration timestamp (beyond which the // unbonding delegation shouldn't be slashed) - ubdATokens := sdk.TokensFromConsensusPower(4) + ubdATokens := sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction) ubdA := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 11, time.Unix(0, 0), ubdATokens) app.StakingKeeper.SetUnbondingDelegation(ctx, ubdA) @@ -593,7 +593,7 @@ func TestSlashBoth(t *testing.T) { app.StakingKeeper.Slash(ctx, consAddr0, 10, 10, fraction) burnedNotBondedAmount := fraction.MulInt(ubdATokens).TruncateInt() - burnedBondAmount := sdk.TokensFromConsensusPower(10).ToDec().Mul(fraction).TruncateInt() + burnedBondAmount := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec().Mul(fraction).TruncateInt() burnedBondAmount = burnedBondAmount.Sub(burnedNotBondedAmount) // read updated pool @@ -614,5 +614,5 @@ func TestSlashBoth(t *testing.T) { validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) require.True(t, found) // power not decreased, all stake was bonded since - require.Equal(t, int64(10), validator.GetConsensusPower()) + require.Equal(t, int64(10), validator.GetConsensusPower(sdk.DefaultPowerReduction)) } diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index f06994f44f70..b8e1c3d4584c 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -135,7 +135,7 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab // if we get to a zero-power validator (which we don't bond), // there are no more possible bonded validators - if validator.PotentialConsensusPower() == 0 { + if validator.PotentialConsensusPower(k.PowerReduction(ctx)) == 0 { break } @@ -164,12 +164,12 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab copy(valAddrBytes[:], valAddr[:]) oldPowerBytes, found := last[valAddrBytes] - newPower := validator.ConsensusPower() + newPower := validator.ConsensusPower(k.PowerReduction(ctx)) newPowerBytes := k.cdc.MustMarshalBinaryBare(&gogotypes.Int64Value{Value: newPower}) // update the validator set if power has changed if !found || !bytes.Equal(oldPowerBytes, newPowerBytes) { - updates = append(updates, validator.ABCIValidatorUpdate()) + updates = append(updates, validator.ABCIValidatorUpdate(k.PowerReduction(ctx))) k.SetLastValidatorPower(ctx, valAddr, newPower) } diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index edb00ddba55b..591ab374d7ab 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -118,19 +118,19 @@ func (k Keeper) SetValidatorByPowerIndex(ctx sdk.Context, validator types.Valida } store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorsByPowerIndexKey(validator), validator.GetOperator()) + store.Set(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx)), validator.GetOperator()) } // validator index func (k Keeper) DeleteValidatorByPowerIndex(ctx sdk.Context, validator types.Validator) { store := ctx.KVStore(k.storeKey) - store.Delete(types.GetValidatorsByPowerIndexKey(validator)) + store.Delete(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx))) } // validator index func (k Keeper) SetNewValidatorByPowerIndex(ctx sdk.Context, validator types.Validator) { store := ctx.KVStore(k.storeKey) - store.Set(types.GetValidatorsByPowerIndexKey(validator), validator.GetOperator()) + store.Set(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx)), validator.GetOperator()) } // Update the tokens of an existing validator, update the validators power index key @@ -210,7 +210,7 @@ func (k Keeper) RemoveValidator(ctx sdk.Context, address sdk.ValAddress) { store := ctx.KVStore(k.storeKey) store.Delete(types.GetValidatorKey(address)) store.Delete(types.GetValidatorByConsAddrKey(valConsAddr)) - store.Delete(types.GetValidatorsByPowerIndexKey(validator)) + store.Delete(types.GetValidatorsByPowerIndexKey(validator, k.PowerReduction(ctx))) // call hooks k.AfterValidatorRemoved(ctx, valConsAddr, validator.GetOperator()) diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index ae98c177ef30..4d847977c91a 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -30,7 +30,7 @@ func bootstrapValidatorTest(t *testing.T, power int64, numAddrs int) (*simapp.Si addrDels, addrVals := generateAddresses(app, ctx, numAddrs) - amt := sdk.TokensFromConsensusPower(power) + amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -49,7 +49,7 @@ func initValidators(t *testing.T, power int64, numAddrs int, powers []int64) (*s vs := make([]types.Validator, len(powers)) for i, power := range powers { vs[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) vs[i], _ = vs[i].AddTokensFromDel(tokens) } return app, ctx, addrs, valAddrs, vs @@ -60,7 +60,7 @@ func TestSetValidator(t *testing.T) { valPubKey := PKs[0] valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) - valTokens := sdk.TokensFromConsensusPower(10) + valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) // test how the validator is set from a purely unbonbed pool validator := teststaking.NewValidator(t, valAddr, valPubKey) @@ -75,7 +75,7 @@ func TestSetValidator(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validator, found := app.StakingKeeper.GetValidator(ctx, valAddr) require.True(t, found) - require.Equal(t, validator.ABCIValidatorUpdate(), updates[0]) + require.Equal(t, validator.ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) // after the save the validator should be bonded require.Equal(t, types.Bonded, validator.Status) @@ -114,10 +114,10 @@ func TestUpdateValidatorByPowerIndex(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234)))) + err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234, sdk.DefaultPowerReduction)))) require.NoError(t, err) - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000)))) + err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)))) require.NoError(t, err) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) @@ -125,28 +125,28 @@ func TestUpdateValidatorByPowerIndex(t *testing.T) { // add a validator validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - validator, delSharesCreated := validator.AddTokensFromDel(sdk.TokensFromConsensusPower(100)) + validator, delSharesCreated := validator.AddTokensFromDel(sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction)) require.Equal(t, types.Unbonded, validator.Status) - require.Equal(t, sdk.TokensFromConsensusPower(100), validator.Tokens) + require.Equal(t, sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), validator.Tokens) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) - require.Equal(t, sdk.TokensFromConsensusPower(100), validator.Tokens) + require.Equal(t, sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), validator.Tokens) - power := types.GetValidatorsByPowerIndexKey(validator) + power := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) // burn half the delegator shares app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) validator, burned := validator.RemoveDelShares(delSharesCreated.Quo(sdk.NewDec(2))) - require.Equal(t, sdk.TokensFromConsensusPower(50), burned) + require.Equal(t, sdk.TokensFromConsensusPower(50, sdk.DefaultPowerReduction), burned) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) // update the validator, possibly kicking it out require.False(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) - power = types.GetValidatorsByPowerIndexKey(validator) + power = types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) } @@ -166,10 +166,10 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { app.StakingKeeper.SetParams(ctx, params) // create a random pool - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234)))) + err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234, sdk.DefaultPowerReduction)))) require.NoError(t, err) - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000)))) + err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)))) require.NoError(t, err) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) @@ -179,7 +179,7 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { for i := 0; i < len(validators); i++ { moniker := fmt.Sprintf("val#%d", int64(i)) val := newMonikerValidator(t, valAddrs[i], PKs[i], moniker) - delTokens := sdk.TokensFromConsensusPower(int64((i + 1) * 10)) + delTokens := sdk.TokensFromConsensusPower(int64((i+1)*10), sdk.DefaultPowerReduction) val, _ = val.AddTokensFromDel(delTokens) val = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, val, true) @@ -191,7 +191,7 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { // remove enough tokens to kick out the validator below the current cliff // validator and next in line cliff validator app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, nextCliffVal) - shares := sdk.TokensFromConsensusPower(21) + shares := sdk.TokensFromConsensusPower(21, sdk.DefaultPowerReduction) nextCliffVal, _ = nextCliffVal.RemoveDelShares(shares.ToDec()) nextCliffVal = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, nextCliffVal, true) @@ -220,7 +220,7 @@ func TestSlashToZeroPowerRemoved(t *testing.T) { // add a validator validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - valTokens := sdk.TokensFromConsensusPower(100) + valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) bondedPool := app.StakingKeeper.GetBondedPool(ctx) @@ -256,13 +256,13 @@ func TestValidatorBasics(t *testing.T) { validators[i] = teststaking.NewValidator(t, addrVals[i], PKs[i]) validators[i].Status = types.Unbonded validators[i].Tokens = sdk.ZeroInt() - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) } - assert.Equal(t, sdk.TokensFromConsensusPower(9), validators[0].Tokens) - assert.Equal(t, sdk.TokensFromConsensusPower(8), validators[1].Tokens) - assert.Equal(t, sdk.TokensFromConsensusPower(7), validators[2].Tokens) + assert.Equal(t, sdk.TokensFromConsensusPower(9, sdk.DefaultPowerReduction), validators[0].Tokens) + assert.Equal(t, sdk.TokensFromConsensusPower(8, sdk.DefaultPowerReduction), validators[1].Tokens) + assert.Equal(t, sdk.TokensFromConsensusPower(7, sdk.DefaultPowerReduction), validators[2].Tokens) // check the empty keeper first _, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) @@ -292,11 +292,11 @@ func TestValidatorBasics(t *testing.T) { require.Equal(t, 1, len(resVals)) assert.True(ValEq(t, validators[0], resVals[0])) assert.Equal(t, types.Bonded, validators[0].Status) - assert.True(sdk.IntEq(t, sdk.TokensFromConsensusPower(9), validators[0].BondedTokens())) + assert.True(sdk.IntEq(t, sdk.TokensFromConsensusPower(9, sdk.DefaultPowerReduction), validators[0].BondedTokens())) // modify a records, save, and retrieve validators[0].Status = types.Bonded - validators[0].Tokens = sdk.TokensFromConsensusPower(10) + validators[0].Tokens = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validators[0].DelegatorShares = validators[0].Tokens.ToDec() validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], true) resVal, found = app.StakingKeeper.GetValidator(ctx, addrVals[0]) @@ -351,10 +351,10 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { // initialize some validators into the state amts := []sdk.Int{ sdk.NewIntFromUint64(0), - sdk.PowerReduction.MulRaw(100), - sdk.PowerReduction, - sdk.PowerReduction.MulRaw(400), - sdk.PowerReduction.MulRaw(200)} + sdk.DefaultPowerReduction.MulRaw(100), + sdk.DefaultPowerReduction, + sdk.DefaultPowerReduction.MulRaw(400), + sdk.DefaultPowerReduction.MulRaw(200)} n := len(amts) var validators [5]types.Validator for i, amt := range amts { @@ -368,10 +368,10 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { // first make sure everything made it in to the gotValidator group resValidators := app.StakingKeeper.GetBondedValidatorsByPower(ctx) assert.Equal(t, n, len(resValidators)) - assert.Equal(t, sdk.NewInt(400).Mul(sdk.PowerReduction), resValidators[0].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(200).Mul(sdk.PowerReduction), resValidators[1].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(100).Mul(sdk.PowerReduction), resValidators[2].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(1).Mul(sdk.PowerReduction), resValidators[3].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(400).Mul(sdk.DefaultPowerReduction), resValidators[0].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(200).Mul(sdk.DefaultPowerReduction), resValidators[1].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(100).Mul(sdk.DefaultPowerReduction), resValidators[2].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(1).Mul(sdk.DefaultPowerReduction), resValidators[3].BondedTokens(), "%v", resValidators) assert.Equal(t, sdk.NewInt(0), resValidators[4].BondedTokens(), "%v", resValidators) assert.Equal(t, validators[3].OperatorAddress, resValidators[0].OperatorAddress, "%v", resValidators) assert.Equal(t, validators[4].OperatorAddress, resValidators[1].OperatorAddress, "%v", resValidators) @@ -380,14 +380,14 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { assert.Equal(t, validators[0].OperatorAddress, resValidators[4].OperatorAddress, "%v", resValidators) // test a basic increase in voting power - validators[3].Tokens = sdk.NewInt(500).Mul(sdk.PowerReduction) + validators[3].Tokens = sdk.NewInt(500).Mul(sdk.DefaultPowerReduction) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) require.Equal(t, len(resValidators), n) assert.True(ValEq(t, validators[3], resValidators[0])) // test a decrease in voting power - validators[3].Tokens = sdk.NewInt(300).Mul(sdk.PowerReduction) + validators[3].Tokens = sdk.NewInt(300).Mul(sdk.DefaultPowerReduction) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) require.Equal(t, len(resValidators), n) @@ -395,7 +395,7 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { assert.True(ValEq(t, validators[4], resValidators[1])) // test equal voting power, different age - validators[3].Tokens = sdk.NewInt(200).Mul(sdk.PowerReduction) + validators[3].Tokens = sdk.NewInt(200).Mul(sdk.DefaultPowerReduction) ctx = ctx.WithBlockHeight(10) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) @@ -412,8 +412,8 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { assert.True(ValEq(t, validators[4], resValidators[1])) // change in voting power of both validators, both still in v-set, no age change - validators[3].Tokens = sdk.NewInt(300).Mul(sdk.PowerReduction) - validators[4].Tokens = sdk.NewInt(300).Mul(sdk.PowerReduction) + validators[3].Tokens = sdk.NewInt(300).Mul(sdk.DefaultPowerReduction) + validators[4].Tokens = sdk.NewInt(300).Mul(sdk.DefaultPowerReduction) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) require.Equal(t, len(resValidators), n) @@ -430,10 +430,10 @@ func TestGetValidatorSortingMixed(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(501)))) + err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(501, sdk.DefaultPowerReduction)))) require.NoError(t, err) - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(0)))) + err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(0, sdk.DefaultPowerReduction)))) require.NoError(t, err) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) @@ -447,10 +447,10 @@ func TestGetValidatorSortingMixed(t *testing.T) { // initialize some validators into the state amts := []sdk.Int{ sdk.NewIntFromUint64(0), - sdk.PowerReduction.MulRaw(100), - sdk.PowerReduction, - sdk.PowerReduction.MulRaw(400), - sdk.PowerReduction.MulRaw(200)} + sdk.DefaultPowerReduction.MulRaw(100), + sdk.DefaultPowerReduction, + sdk.DefaultPowerReduction.MulRaw(400), + sdk.DefaultPowerReduction.MulRaw(200)} var validators [5]types.Validator for i, amt := range amts { @@ -481,8 +481,8 @@ func TestGetValidatorSortingMixed(t *testing.T) { resValidators := app.StakingKeeper.GetBondedValidatorsByPower(ctx) // The validators returned should match the max validators assert.Equal(t, 2, len(resValidators)) - assert.Equal(t, sdk.NewInt(400).Mul(sdk.PowerReduction), resValidators[0].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(200).Mul(sdk.PowerReduction), resValidators[1].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(400).Mul(sdk.DefaultPowerReduction), resValidators[0].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(200).Mul(sdk.DefaultPowerReduction), resValidators[1].BondedTokens(), "%v", resValidators) assert.Equal(t, validators[3].OperatorAddress, resValidators[0].OperatorAddress, "%v", resValidators) assert.Equal(t, validators[4].OperatorAddress, resValidators[1].OperatorAddress, "%v", resValidators) } @@ -504,7 +504,7 @@ func TestGetValidatorsEdgeCases(t *testing.T) { moniker := fmt.Sprintf("val#%d", int64(i)) validators[i] = newMonikerValidator(t, sdk.ValAddress(addrs[i]), PKs[i], moniker) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -523,7 +523,7 @@ func TestGetValidatorsEdgeCases(t *testing.T) { // delegate 500 tokens to validator 0 app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[0]) - delTokens := sdk.TokensFromConsensusPower(500) + delTokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) validators[0], _ = validators[0].AddTokensFromDel(delTokens) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -558,10 +558,10 @@ func TestGetValidatorsEdgeCases(t *testing.T) { validators[3], found = app.StakingKeeper.GetValidator(ctx, validators[3].GetOperator()) assert.True(t, found) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[3]) - validators[3], _ = validators[3].AddTokensFromDel(sdk.TokensFromConsensusPower(1)) + validators[3], _ = validators[3].AddTokensFromDel(sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction)) notBondedPool = app.StakingKeeper.GetNotBondedPool(ctx) - newTokens = sdk.NewCoins(sdk.NewCoin(params.BondDenom, sdk.TokensFromConsensusPower(1))) + newTokens = sdk.NewCoins(sdk.NewCoin(params.BondDenom, sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction))) balances = app.BankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) require.NoError(t, app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), balances.Add(newTokens...))) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) @@ -620,9 +620,9 @@ func TestValidatorBondHeight(t *testing.T) { validators[1] = teststaking.NewValidator(t, sdk.ValAddress(addrs[1]), PKs[1]) validators[2] = teststaking.NewValidator(t, sdk.ValAddress(addrs[2]), PKs[2]) - tokens0 := sdk.TokensFromConsensusPower(200) - tokens1 := sdk.TokensFromConsensusPower(100) - tokens2 := sdk.TokensFromConsensusPower(100) + tokens0 := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) + tokens1 := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + tokens2 := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) validators[0], _ = validators[0].AddTokensFromDel(tokens0) validators[1], _ = validators[1].AddTokensFromDel(tokens1) validators[2], _ = validators[2].AddTokensFromDel(tokens2) @@ -642,7 +642,7 @@ func TestValidatorBondHeight(t *testing.T) { assert.True(ValEq(t, validators[1], resValidators[1])) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[1]) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[2]) - delTokens := sdk.TokensFromConsensusPower(50) + delTokens := sdk.TokensFromConsensusPower(50, sdk.DefaultPowerReduction) validators[1], _ = validators[1].AddTokensFromDel(delTokens) validators[2], _ = validators[2].AddTokensFromDel(delTokens) validators[2] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[2], true) @@ -665,7 +665,7 @@ func TestFullValidatorSetPowerChange(t *testing.T) { var validators [5]types.Validator for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[i], true) } @@ -686,7 +686,7 @@ func TestFullValidatorSetPowerChange(t *testing.T) { // test a swap in voting power - tokens := sdk.TokensFromConsensusPower(600) + tokens := sdk.TokensFromConsensusPower(600, sdk.DefaultPowerReduction) validators[0], _ = validators[0].AddTokensFromDel(tokens) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) @@ -705,7 +705,7 @@ func TestApplyAndReturnValidatorSetUpdatesAllNone(t *testing.T) { valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) validators[i] = teststaking.NewValidator(t, valAddr, valPubKey) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) } @@ -720,8 +720,8 @@ func TestApplyAndReturnValidatorSetUpdatesAllNone(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - assert.Equal(t, validators[0].ABCIValidatorUpdate(), updates[1]) - assert.Equal(t, validators[1].ABCIValidatorUpdate(), updates[0]) + assert.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) + assert.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesIdentical(t *testing.T) { @@ -732,7 +732,7 @@ func TestApplyAndReturnValidatorSetUpdatesIdentical(t *testing.T) { for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) } @@ -755,7 +755,7 @@ func TestApplyAndReturnValidatorSetUpdatesSingleValueChange(t *testing.T) { for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) } @@ -766,11 +766,11 @@ func TestApplyAndReturnValidatorSetUpdatesSingleValueChange(t *testing.T) { // test single value change // tendermintUpdate set: {} -> {c1'} validators[0].Status = types.Bonded - validators[0].Tokens = sdk.TokensFromConsensusPower(600) + validators[0].Tokens = sdk.TokensFromConsensusPower(600, sdk.DefaultPowerReduction) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) - require.Equal(t, validators[0].ABCIValidatorUpdate(), updates[0]) + require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesMultipleValueChange(t *testing.T) { @@ -784,16 +784,16 @@ func TestApplyAndReturnValidatorSetUpdatesMultipleValueChange(t *testing.T) { // test multiple value change // tendermintUpdate set: {c1, c3} -> {c1', c3'} - delTokens1 := sdk.TokensFromConsensusPower(190) - delTokens2 := sdk.TokensFromConsensusPower(80) + delTokens1 := sdk.TokensFromConsensusPower(190, sdk.DefaultPowerReduction) + delTokens2 := sdk.TokensFromConsensusPower(80, sdk.DefaultPowerReduction) validators[0], _ = validators[0].AddTokensFromDel(delTokens1) validators[1], _ = validators[1].AddTokensFromDel(delTokens2) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) validators[1] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[1], false) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) - require.Equal(t, validators[0].ABCIValidatorUpdate(), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[1]) + require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) } func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { @@ -810,7 +810,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[2]) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) - require.Equal(t, validators[2].ABCIValidatorUpdate(), updates[0]) + require.Equal(t, validators[2].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) // test validtor added at the beginning // tendermintUpdate set: {} -> {c0} @@ -818,7 +818,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[3]) updates = applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validators[3], _ = app.StakingKeeper.GetValidator(ctx, validators[3].GetOperator()) - require.Equal(t, validators[3].ABCIValidatorUpdate(), updates[0]) + require.Equal(t, validators[3].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) // test validtor added at the end // tendermintUpdate set: {} -> {c0} @@ -826,7 +826,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[4]) updates = applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validators[4], _ = app.StakingKeeper.GetValidator(ctx, validators[4].GetOperator()) - require.Equal(t, validators[4].ABCIValidatorUpdate(), updates[0]) + require.Equal(t, validators[4].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { @@ -839,7 +839,7 @@ func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { var validators [5]types.Validator for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) } validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) @@ -855,14 +855,14 @@ func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { // tendermintUpdate set: {} -> {c0, c4} applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) - tokens := sdk.TokensFromConsensusPower(10) + tokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) validators[2], _ = validators[2].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[2]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[2]) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) require.Equal(t, validators[0].ABCIValidatorUpdateZero(), updates[1]) - require.Equal(t, validators[2].ABCIValidatorUpdate(), updates[0]) + require.Equal(t, validators[2].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesPowerDecrease(t *testing.T) { @@ -872,7 +872,7 @@ func TestApplyAndReturnValidatorSetUpdatesPowerDecrease(t *testing.T) { var validators [2]types.Validator for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) } validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) @@ -880,26 +880,26 @@ func TestApplyAndReturnValidatorSetUpdatesPowerDecrease(t *testing.T) { applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) // check initial power - require.Equal(t, int64(100), validators[0].GetConsensusPower()) - require.Equal(t, int64(100), validators[1].GetConsensusPower()) + require.Equal(t, int64(100), validators[0].GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(100), validators[1].GetConsensusPower(sdk.DefaultPowerReduction)) // test multiple value change // tendermintUpdate set: {c1, c3} -> {c1', c3'} - delTokens1 := sdk.TokensFromConsensusPower(20) - delTokens2 := sdk.TokensFromConsensusPower(30) + delTokens1 := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) + delTokens2 := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) validators[0], _ = validators[0].RemoveDelShares(delTokens1.ToDec()) validators[1], _ = validators[1].RemoveDelShares(delTokens2.ToDec()) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) validators[1] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[1], false) // power has changed - require.Equal(t, int64(80), validators[0].GetConsensusPower()) - require.Equal(t, int64(70), validators[1].GetConsensusPower()) + require.Equal(t, int64(80), validators[0].GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(70), validators[1].GetConsensusPower(sdk.DefaultPowerReduction)) // Tendermint updates should reflect power change updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) - require.Equal(t, validators[0].ABCIValidatorUpdate(), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[1]) + require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) } func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { @@ -918,7 +918,7 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) validators[i] = teststaking.NewValidator(t, valAddr, valPubKey) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[i]) @@ -929,8 +929,8 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, len(validators)) validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - require.Equal(t, validators[0].ABCIValidatorUpdate(), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[1]) + require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) @@ -938,7 +938,7 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { for i, power := range powers { app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[i]) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[i]) @@ -965,7 +965,7 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { valAddr = sdk.ValAddress(valPubKey.Address().Bytes()) validator = teststaking.NewValidator(t, valAddr, valPubKey) - tokens := sdk.TokensFromConsensusPower(500) + tokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) validator, _ = validator.AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validator) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validator) @@ -975,9 +975,9 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { validator, _ = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - require.Equal(t, validator.ABCIValidatorUpdate(), updates[0]) - require.Equal(t, validators[0].ABCIValidatorUpdate(), updates[1]) - require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[2]) + require.Equal(t, validator.ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) + require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[2]) } func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { @@ -997,7 +997,7 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) validators[i] = newMonikerValidator(t, valAddr, valPubKey, moniker) - tokens := sdk.TokensFromConsensusPower(power) + tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) validators[i], _ = validators[i].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[i]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[i]) @@ -1007,8 +1007,8 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - require.Equal(t, validators[2].ABCIValidatorUpdate(), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[1]) + require.Equal(t, validators[2].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) @@ -1020,7 +1020,7 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { require.True(t, found) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[0]) - tokens := sdk.TokensFromConsensusPower(1) + tokens := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) validators[0], _ = validators[0].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[0]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[0]) @@ -1042,14 +1042,14 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[1]) - tokens = sdk.TokensFromConsensusPower(250) + tokens = sdk.TokensFromConsensusPower(250, sdk.DefaultPowerReduction) validators[1], _ = validators[1].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[1]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[1]) // verify initial Tendermint updates are correct updates = applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) - require.Equal(t, validators[1].ABCIValidatorUpdate(), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) } diff --git a/x/staking/legacy/v040/migrate.go b/x/staking/legacy/v040/migrate.go index b0746fa363a4..87ec0000efb7 100644 --- a/x/staking/legacy/v040/migrate.go +++ b/x/staking/legacy/v040/migrate.go @@ -4,6 +4,7 @@ import ( "fmt" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" v040staking "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -129,6 +130,7 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { MaxEntries: uint32(stakingState.Params.MaxEntries), HistoricalEntries: uint32(stakingState.Params.HistoricalEntries), BondDenom: stakingState.Params.BondDenom, + PowerReduction: sdk.DefaultPowerReduction, }, LastTotalPower: stakingState.LastTotalPower, LastValidatorPowers: newLastValidatorPowers, diff --git a/x/staking/simulation/common_test.go b/x/staking/simulation/common_test.go index 880cb442deff..e22ecd15aa2c 100644 --- a/x/staking/simulation/common_test.go +++ b/x/staking/simulation/common_test.go @@ -7,5 +7,5 @@ import ( ) func init() { - sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) + sdk.DefaultPowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) } diff --git a/x/staking/simulation/genesis.go b/x/staking/simulation/genesis.go index 0c33fa9ee282..bf01b90bfe9c 100644 --- a/x/staking/simulation/genesis.go +++ b/x/staking/simulation/genesis.go @@ -63,7 +63,7 @@ func RandomizedGenState(simState *module.SimulationState) { // NOTE: the slashing module need to be defined after the staking module on the // NewSimulationManager constructor for this to work simState.UnbondTime = unbondTime - params := types.NewParams(simState.UnbondTime, maxVals, 7, histEntries, sdk.DefaultBondDenom) + params := types.NewParams(simState.UnbondTime, maxVals, 7, histEntries, sdk.DefaultBondDenom, sdk.DefaultPowerReduction) // validators & delegations var ( diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index aba85cd2bf5f..35e59b6c2342 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/staking/simulation" @@ -46,6 +47,7 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, uint32(8687), stakingGenesis.Params.HistoricalEntries) require.Equal(t, "stake", stakingGenesis.Params.BondDenom) require.Equal(t, float64(238280), stakingGenesis.Params.UnbondingTime.Seconds()) + require.Equal(t, sdk.NewInt(1000000), stakingGenesis.Params.PowerReduction) // check numbers of Delegations and Validators require.Len(t, stakingGenesis.Delegations, 3) require.Len(t, stakingGenesis.Validators, 3) diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index fca3b78125a9..6ca1886bf592 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -181,7 +181,7 @@ func TestSimulateMsgUndelegate(t *testing.T) { validator0 := getTestingValidator0(t, app, ctx, accounts) // setup delegation - delTokens := sdk.TokensFromConsensusPower(2) + delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := accounts[1] delegation := types.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) @@ -227,7 +227,7 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { validator0 := getTestingValidator0(t, app, ctx, accounts) validator1 := getTestingValidator1(t, app, ctx, accounts) - delTokens := sdk.TokensFromConsensusPower(2) + delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) // setup accounts[2] as delegator @@ -276,7 +276,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { func getTestingAccounts(t *testing.T, r *rand.Rand, app *simapp.SimApp, ctx sdk.Context, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200) + initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts @@ -309,7 +309,7 @@ func getTestingValidator(t *testing.T, app *simapp.SimApp, ctx sdk.Context, acco require.NoError(t, err) validator.DelegatorShares = sdk.NewDec(100) - validator.Tokens = sdk.TokensFromConsensusPower(100) + validator.Tokens = sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) app.StakingKeeper.SetValidator(ctx, validator) diff --git a/x/staking/spec/01_state.md b/x/staking/spec/01_state.md index c5f7376d7655..c0aae9943bc9 100644 --- a/x/staking/spec/01_state.md +++ b/x/staking/spec/01_state.md @@ -19,10 +19,11 @@ and defines overall functioning of the staking module. ```go type Params struct { - UnbondingTime time.Duration // time duration of unbonding - MaxValidators uint16 // maximum number of validators - MaxEntries uint16 // max entries for either unbonding delegation or redelegation (per pair/trio) - BondDenom string // bondable coin denomination + UnbondingTime time.Duration // time duration of unbonding + MaxValidators uint16 // maximum number of validators + MaxEntries uint16 // max entries for either unbonding delegation or redelegation (per pair/trio) + BondDenom string // bondable coin denomination + PowerReduction sdk.Int // power reduction on-chain param } ``` diff --git a/x/staking/spec/08_params.md b/x/staking/spec/08_params.md index 3d87879e18a0..706f41fc35e4 100644 --- a/x/staking/spec/08_params.md +++ b/x/staking/spec/08_params.md @@ -13,3 +13,4 @@ The staking module contains the following parameters: | KeyMaxEntries | uint16 | 7 | | HistoricalEntries | uint16 | 3 | | BondDenom | string | "uatom" | +| PowerReduction | string | "1000000" | diff --git a/x/staking/teststaking/helper.go b/x/staking/teststaking/helper.go index b33118f541fd..607ad56ada4c 100644 --- a/x/staking/teststaking/helper.go +++ b/x/staking/teststaking/helper.go @@ -40,7 +40,7 @@ func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, st // CreateValidatorWithValPower calls handler to create a new staking validator with zero // commission func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotypes.PubKey, valPower int64, ok bool) sdk.Int { - amount := sdk.TokensFromConsensusPower(valPower) + amount := sdk.TokensFromConsensusPower(valPower, sdk.DefaultPowerReduction) coin := sdk.NewCoin(sh.Denom, amount) sh.createValidator(addr, pk, coin, ok) return amount @@ -69,7 +69,7 @@ func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount // DelegateWithPower calls handler to delegate stake for a validator func (sh *Helper) DelegateWithPower(delegator sdk.AccAddress, val sdk.ValAddress, power int64) { - coin := sdk.NewCoin(sh.Denom, sdk.TokensFromConsensusPower(power)) + coin := sdk.NewCoin(sh.Denom, sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction)) msg := stakingtypes.NewMsgDelegate(delegator, val, coin) sh.Handle(msg, true) } diff --git a/x/staking/teststaking/tm.go b/x/staking/teststaking/tm.go index 9a9c030d061c..4c0863f593cd 100644 --- a/x/staking/teststaking/tm.go +++ b/x/staking/teststaking/tm.go @@ -5,6 +5,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -19,21 +20,21 @@ func GetTmConsPubKey(v types.Validator) (tmcrypto.PubKey, error) { } // ToTmValidator casts an SDK validator to a tendermint type Validator. -func ToTmValidator(v types.Validator) (*tmtypes.Validator, error) { +func ToTmValidator(v types.Validator, powerReduction sdk.Int) (*tmtypes.Validator, error) { tmPk, err := GetTmConsPubKey(v) if err != nil { return nil, err } - return tmtypes.NewValidator(tmPk, v.ConsensusPower()), nil + return tmtypes.NewValidator(tmPk, v.ConsensusPower(powerReduction)), nil } // ToTmValidators casts all validators to the corresponding tendermint type. -func ToTmValidators(v types.Validators) ([]*tmtypes.Validator, error) { +func ToTmValidators(v types.Validators, powerReduction sdk.Int) ([]*tmtypes.Validator, error) { validators := make([]*tmtypes.Validator, len(v)) var err error for i, val := range v { - validators[i], err = ToTmValidator(val) + validators[i], err = ToTmValidator(val, powerReduction) if err != nil { return nil, err } diff --git a/x/staking/types/exported.go b/x/staking/types/exported.go index a02adc34bade..9599da100d20 100644 --- a/x/staking/types/exported.go +++ b/x/staking/types/exported.go @@ -28,7 +28,7 @@ type ValidatorI interface { GetConsAddr() (sdk.ConsAddress, error) // validation consensus address GetTokens() sdk.Int // validation tokens GetBondedTokens() sdk.Int // validator bonded tokens - GetConsensusPower() int64 // validation power in tendermint + GetConsensusPower(sdk.Int) int64 // validation power in tendermint GetCommission() sdk.Dec // validator commission rate GetMinSelfDelegation() sdk.Int // validator minimum self delegation GetDelegatorShares() sdk.Dec // total outstanding delegator shares diff --git a/x/staking/types/historical_info.go b/x/staking/types/historical_info.go index 1a8461ad130c..c06e82dc0261 100644 --- a/x/staking/types/historical_info.go +++ b/x/staking/types/historical_info.go @@ -8,14 +8,18 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // NewHistoricalInfo will create a historical information struct from header and valset // it will first sort valset before inclusion into historical info -func NewHistoricalInfo(header tmproto.Header, valSet Validators) HistoricalInfo { +func NewHistoricalInfo(header tmproto.Header, valSet Validators, powerReduction sdk.Int) HistoricalInfo { // Must sort in the same way that tendermint does - sort.Sort(ValidatorsByVotingPower(valSet)) + // TODO: check with sort.Sort(ValidatorsByVotingPower(valSet)) + sort.SliceStable(valSet, func(i, j int) bool { + return ValidatorsByVotingPower(valSet).LessAfterPowerReductionApply(i, j, powerReduction) + }) return HistoricalInfo{ Header: header, diff --git a/x/staking/types/historical_info_test.go b/x/staking/types/historical_info_test.go index d8a25fa92924..b465a3db6ae5 100644 --- a/x/staking/types/historical_info_test.go +++ b/x/staking/types/historical_info_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -26,7 +27,7 @@ func createValidators(t *testing.T) []types.Validator { func TestHistoricalInfo(t *testing.T) { validators := createValidators(t) - hi := types.NewHistoricalInfo(header, validators) + hi := types.NewHistoricalInfo(header, validators, sdk.DefaultPowerReduction) require.True(t, sort.IsSorted(types.Validators(hi.Valset)), "Validators are not sorted") var value []byte @@ -67,7 +68,7 @@ func TestValidateBasic(t *testing.T) { err = types.ValidateBasic(hi) require.Error(t, err, "ValidateBasic passed on unsorted ValSet") - hi = types.NewHistoricalInfo(header, validators) + hi = types.NewHistoricalInfo(header, validators, sdk.DefaultPowerReduction) err = types.ValidateBasic(hi) require.NoError(t, err, "ValidateBasic failed on valid HistoricalInfo") } diff --git a/x/staking/types/keys.go b/x/staking/types/keys.go index 40d62244a041..abdbe8ccff1b 100644 --- a/x/staking/types/keys.go +++ b/x/staking/types/keys.go @@ -69,11 +69,11 @@ func AddressFromLastValidatorPowerKey(key []byte) []byte { // Power index is the key used in the power-store, and represents the relative // power ranking of the validator. // VALUE: validator operator address ([]byte) -func GetValidatorsByPowerIndexKey(validator Validator) []byte { +func GetValidatorsByPowerIndexKey(validator Validator, powerReduction sdk.Int) []byte { // NOTE the address doesn't need to be stored because counter bytes must always be different // NOTE the larger values are of higher value - consensusPower := sdk.TokensToConsensusPower(validator.Tokens) + consensusPower := sdk.TokensToConsensusPower(validator.Tokens, powerReduction) consensusPowerBytes := make([]byte, 8) binary.BigEndian.PutUint64(consensusPowerBytes, uint64(consensusPower)) diff --git a/x/staking/types/keys_test.go b/x/staking/types/keys_test.go index 0f63617f26b3..0bd7a7c20bb7 100644 --- a/x/staking/types/keys_test.go +++ b/x/staking/types/keys_test.go @@ -28,10 +28,10 @@ func TestGetValidatorPowerRank(t *testing.T) { val1 := newValidator(t, valAddr1, keysPK1) val1.Tokens = sdk.ZeroInt() val2, val3, val4 := val1, val1, val1 - val2.Tokens = sdk.TokensFromConsensusPower(1) - val3.Tokens = sdk.TokensFromConsensusPower(10) + val2.Tokens = sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) + val3.Tokens = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) x := new(big.Int).Exp(big.NewInt(2), big.NewInt(40), big.NewInt(0)) - val4.Tokens = sdk.TokensFromConsensusPower(x.Int64()) + val4.Tokens = sdk.TokensFromConsensusPower(x.Int64(), sdk.DefaultPowerReduction) tests := []struct { validator types.Validator @@ -43,7 +43,7 @@ func TestGetValidatorPowerRank(t *testing.T) { {val4, "2300000100000000009c288ede7df62742fc3b7d0962045a8cef0f79f6"}, } for i, tt := range tests { - got := hex.EncodeToString(types.GetValidatorsByPowerIndexKey(tt.validator)) + got := hex.EncodeToString(types.GetValidatorsByPowerIndexKey(tt.validator, sdk.DefaultPowerReduction)) require.Equal(t, tt.wantHex, got, "Keys did not match on test case %d", i) } diff --git a/x/staking/types/params.go b/x/staking/types/params.go index 549189fa4f69..92fb0dad898d 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -38,6 +38,7 @@ var ( KeyMaxEntries = []byte("MaxEntries") KeyBondDenom = []byte("BondDenom") KeyHistoricalEntries = []byte("HistoricalEntries") + KeyPowerReduction = []byte("PowerReduction") ) var _ paramtypes.ParamSet = (*Params)(nil) @@ -48,13 +49,14 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams(unbondingTime time.Duration, maxValidators, maxEntries, historicalEntries uint32, bondDenom string) Params { +func NewParams(unbondingTime time.Duration, maxValidators, maxEntries, historicalEntries uint32, bondDenom string, powerReduction sdk.Int) Params { return Params{ UnbondingTime: unbondingTime, MaxValidators: maxValidators, MaxEntries: maxEntries, HistoricalEntries: historicalEntries, BondDenom: bondDenom, + PowerReduction: powerReduction, } } @@ -66,6 +68,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyHistoricalEntries, &p.HistoricalEntries, validateHistoricalEntries), paramtypes.NewParamSetPair(KeyBondDenom, &p.BondDenom, validateBondDenom), + paramtypes.NewParamSetPair(KeyPowerReduction, &p.PowerReduction, validatePowerReduction), } } @@ -77,6 +80,7 @@ func DefaultParams() Params { DefaultMaxEntries, DefaultHistoricalEntries, sdk.DefaultBondDenom, + sdk.DefaultPowerReduction, ) } @@ -191,3 +195,16 @@ func validateBondDenom(i interface{}) error { return nil } + +func validatePowerReduction(i interface{}) error { + v, ok := i.(sdk.Int) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.LT(sdk.NewInt(1)) { + return fmt.Errorf("power reduction cannot be lower than 1") + } + + return nil +} diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index e551e752528c..5cf55db5d636 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -117,7 +117,11 @@ type ValidatorsByVotingPower []Validator func (valz ValidatorsByVotingPower) Len() int { return len(valz) } func (valz ValidatorsByVotingPower) Less(i, j int) bool { - if valz[i].ConsensusPower() == valz[j].ConsensusPower() { + return valz.LessAfterPowerReductionApply(i, j, sdk.DefaultPowerReduction) +} + +func (valz ValidatorsByVotingPower) LessAfterPowerReductionApply(i, j int, powerReduction sdk.Int) bool { + if valz[i].ConsensusPower(powerReduction) == valz[j].ConsensusPower(powerReduction) { addrI, errI := valz[i].GetConsAddr() addrJ, errJ := valz[j].GetConsAddr() // If either returns error, then return false @@ -126,7 +130,7 @@ func (valz ValidatorsByVotingPower) Less(i, j int) bool { } return bytes.Compare(addrI, addrJ) == -1 } - return valz[i].ConsensusPower() > valz[j].ConsensusPower() + return valz[i].ConsensusPower(powerReduction) > valz[j].ConsensusPower(powerReduction) } func (valz ValidatorsByVotingPower) Swap(i, j int) { @@ -257,7 +261,7 @@ func (d Description) EnsureLength() (Description, error) { // ABCIValidatorUpdate returns an abci.ValidatorUpdate from a staking validator type // with the full validator power -func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate { +func (v Validator) ABCIValidatorUpdate(powerReduction sdk.Int) abci.ValidatorUpdate { tmProtoPk, err := v.TmConsPublicKey() if err != nil { panic(err) @@ -265,7 +269,7 @@ func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate { return abci.ValidatorUpdate{ PubKey: tmProtoPk, - Power: v.ConsensusPower(), + Power: v.ConsensusPower(powerReduction), } } @@ -349,17 +353,17 @@ func (v Validator) BondedTokens() sdk.Int { // ConsensusPower gets the consensus-engine power. Aa reduction of 10^6 from // validator tokens is applied -func (v Validator) ConsensusPower() int64 { +func (v Validator) ConsensusPower(powerReduction sdk.Int) int64 { if v.IsBonded() { - return v.PotentialConsensusPower() + return v.PotentialConsensusPower(powerReduction) } return 0 } // PotentialConsensusPower returns the potential consensus-engine power. -func (v Validator) PotentialConsensusPower() int64 { - return sdk.TokensToConsensusPower(v.Tokens) +func (v Validator) PotentialConsensusPower(powerReduction sdk.Int) int64 { + return sdk.TokensToConsensusPower(v.Tokens, powerReduction) } // UpdateStatus updates the location of the shares within a validator @@ -505,9 +509,11 @@ func (v Validator) GetConsAddr() (sdk.ConsAddress, error) { return sdk.ConsAddress(pk.Address()), nil } -func (v Validator) GetTokens() sdk.Int { return v.Tokens } -func (v Validator) GetBondedTokens() sdk.Int { return v.BondedTokens() } -func (v Validator) GetConsensusPower() int64 { return v.ConsensusPower() } +func (v Validator) GetTokens() sdk.Int { return v.Tokens } +func (v Validator) GetBondedTokens() sdk.Int { return v.BondedTokens() } +func (v Validator) GetConsensusPower(powerReduction sdk.Int) int64 { + return v.ConsensusPower(powerReduction) +} func (v Validator) GetCommission() sdk.Dec { return v.Commission.Rate } func (v Validator) GetMinSelfDelegation() sdk.Int { return v.MinSelfDelegation } func (v Validator) GetDelegatorShares() sdk.Dec { return v.DelegatorShares } diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 08204215d595..f7888b7e425f 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -58,7 +58,7 @@ func TestUpdateDescription(t *testing.T) { func TestABCIValidatorUpdate(t *testing.T) { validator := newValidator(t, valAddr1, pk1) - abciVal := validator.ABCIValidatorUpdate() + abciVal := validator.ABCIValidatorUpdate(sdk.DefaultPowerReduction) pk, err := validator.TmConsPublicKey() require.NoError(t, err) require.Equal(t, pk, abciVal.PubKey) @@ -290,13 +290,13 @@ func TestValidatorsSortTendermint(t *testing.T) { valz := types.Validators(vals) // create expected tendermint validators by converting to tendermint then sorting - expectedVals, err := teststaking.ToTmValidators(valz) + expectedVals, err := teststaking.ToTmValidators(valz, sdk.DefaultPowerReduction) require.NoError(t, err) sort.Sort(tmtypes.ValidatorsByVotingPower(expectedVals)) // sort in SDK and then convert to tendermint sort.Sort(types.ValidatorsByVotingPower(valz)) - actualVals, err := teststaking.ToTmValidators(valz) + actualVals, err := teststaking.ToTmValidators(valz, sdk.DefaultPowerReduction) require.NoError(t, err) require.Equal(t, expectedVals, actualVals, "sorting in SDK is not the same as sorting in Tendermint") @@ -314,9 +314,9 @@ func TestValidatorToTm(t *testing.T) { vals[i] = val tmPk, err := cryptocodec.ToTmPubKeyInterface(pk) require.NoError(t, err) - expected[i] = tmtypes.NewValidator(tmPk, val.ConsensusPower()) + expected[i] = tmtypes.NewValidator(tmPk, val.ConsensusPower(sdk.DefaultPowerReduction)) } - vs, err := teststaking.ToTmValidators(vals) + vs, err := teststaking.ToTmValidators(vals, sdk.DefaultPowerReduction) require.NoError(t, err) require.Equal(t, expected, vs) } From cb17feddc047fd174dba626888d7de7aae640e9e Mon Sep 17 00:00:00 2001 From: psaradev Date: Thu, 28 Jan 2021 23:54:39 +1000 Subject: [PATCH 03/23] use on-chain params on tests + fix tests + add new tests for power reduction change --- client/flags/flags.go | 2 +- x/authz/simulation/operations_test.go | 6 +- x/bank/keeper/keeper_test.go | 2 +- x/bank/simulation/operations_test.go | 2 +- x/distribution/keeper/delegation_test.go | 14 +- x/distribution/keeper/keeper_test.go | 2 +- x/distribution/simulation/operations_test.go | 4 +- x/gov/abci_test.go | 6 +- x/gov/keeper/common_test.go | 6 +- x/gov/keeper/deposit_test.go | 4 +- x/gov/keeper/grpc_query_test.go | 8 +- x/gov/keeper/querier_test.go | 2 +- x/gov/keeper/tally_test.go | 20 +- x/gov/simulation/operations_test.go | 2 +- x/ibc/core/02-client/keeper/keeper_test.go | 2 +- x/slashing/abci_test.go | 2 +- x/slashing/genesis_test.go | 2 +- x/slashing/handler_test.go | 10 +- x/slashing/keeper/grpc_query_test.go | 2 +- x/slashing/keeper/keeper_test.go | 16 +- x/slashing/keeper/signing_info_test.go | 8 +- x/slashing/simulation/operations_test.go | 4 +- x/staking/client/cli/cli_test.go | 3 +- x/staking/genesis_test.go | 12 +- x/staking/handler_test.go | 65 ++++++- x/staking/keeper/delegation_test.go | 52 ++--- x/staking/keeper/grpc_query_test.go | 18 +- x/staking/keeper/historical_info_test.go | 6 +- x/staking/keeper/keeper_test.go | 2 +- x/staking/keeper/power_reduction_test.go | 19 +- x/staking/keeper/querier_test.go | 34 ++-- x/staking/keeper/slash.go | 2 +- x/staking/keeper/slash_test.go | 48 ++--- x/staking/keeper/validator_test.go | 188 +++++++++---------- x/staking/legacy/v040/migrate_test.go | 1 + x/staking/simulation/genesis_test.go | 2 +- x/staking/simulation/operations_test.go | 8 +- x/staking/teststaking/helper.go | 4 +- 38 files changed, 322 insertions(+), 268 deletions(-) diff --git a/client/flags/flags.go b/client/flags/flags.go index 282a61c4c9fb..bf861dbf0d60 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -15,7 +15,7 @@ const ( // failures due to state changes that might occur between the tx simulation // and the actual run. DefaultGasAdjustment = 1.0 - DefaultGasLimit = 200000 + DefaultGasLimit = 300000 GasFlagAuto = "auto" // DefaultKeyringBackend diff --git a/x/authz/simulation/operations_test.go b/x/authz/simulation/operations_test.go index e8686f166a72..a21f0158667a 100644 --- a/x/authz/simulation/operations_test.go +++ b/x/authz/simulation/operations_test.go @@ -72,7 +72,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) + initAmt := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 200000) initCoins := sdk.NewCoins(sdk.NewCoin("foo", initAmt)) // add coins to the accounts @@ -132,7 +132,7 @@ func (suite *SimTestSuite) TestSimulateRevokeAuthorization() { AppHash: suite.app.LastCommitID().Hash, }}) - initAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) + initAmt := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 200000) initCoins := sdk.NewCoins(sdk.NewCoin("foo", initAmt)) granter := accounts[0] @@ -167,7 +167,7 @@ func (suite *SimTestSuite) TestSimulateExecAuthorization() { // begin a new block suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) - initAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) + initAmt := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 200000) initCoins := sdk.NewCoins(sdk.NewCoin("foo", initAmt)) granter := accounts[0] diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index d57d60877a4b..b86887a9afd0 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -86,7 +86,7 @@ func (suite *IntegrationTestSuite) TestSupply() { app, ctx := suite.app, suite.ctx initialPower := int64(100) - initTokens := sdk.TokensFromConsensusPower(initialPower, sdk.DefaultPowerReduction) + initTokens := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, initialPower) totalSupply := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initTokens)) app.BankKeeper.SetSupply(ctx, types.NewSupply(totalSupply)) diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index 5add9942cef7..94aeaaa682c9 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -124,7 +124,7 @@ func (suite *SimTestSuite) TestSimulateMsgMultiSend() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) + initAmt := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 200) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index 0255a64ca3d9..eebacc44a4de 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -112,7 +112,7 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -175,7 +175,7 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.ToDec()}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -269,11 +269,11 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) { } func TestWithdrawDelegationRewardsBasic(t *testing.T) { - balancePower := int64(1000) - balanceTokens := sdk.TokensFromConsensusPower(balancePower, sdk.DefaultPowerReduction) app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + balancePower := int64(1000) + balanceTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, balancePower) addr := simapp.AddTestAddrs(app, ctx, 1, sdk.NewInt(1000000000)) valAddrs := simapp.ConvertAddrsToValAddrs(addr) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -305,7 +305,7 @@ func TestWithdrawDelegationRewardsBasic(t *testing.T) { val := app.StakingKeeper.Validator(ctx, valAddrs[0]) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) tokens := sdk.DecCoins{sdk.NewDecCoin(sdk.DefaultBondDenom, initial)} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -375,7 +375,7 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) // allocate some rewards - initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec() + initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec() tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) @@ -431,7 +431,7 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { del1 := app.StakingKeeper.Delegation(ctx, sdk.AccAddress(valAddrs[0]), valAddrs[0]) // allocate some rewards - initial := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction).ToDec() + initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 30).ToDec() tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go index cd39dafaa72b..0791364f2b2e 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -57,7 +57,7 @@ func TestWithdrawValidatorCommission(t *testing.T) { // check initial balance balance := app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(valAddrs[0])) - expTokens := sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction) + expTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1000) expCoins := sdk.NewCoins(sdk.NewCoin("stake", expTokens)) require.Equal(t, expCoins, balance) diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 67ca4dd863ae..1c6f67f89fb1 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -95,7 +95,7 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { validator0 := suite.getTestingValidator0(accounts) // setup delegation - delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + delTokens := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := accounts[1] delegation := stakingtypes.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) @@ -223,7 +223,7 @@ func (suite *SimTestSuite) SetupTest() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) + initAmt := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 200) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index 56a401fffad7..9c3aabf74f00 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -221,7 +221,7 @@ func TestTickPassedVotingPeriod(t *testing.T) { require.False(t, activeQueue.Valid()) activeQueue.Close() - proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction))} + proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 5))} newProposalMsg, err := types.NewMsgSubmitProposal(TestProposal, proposalCoins, addrs[0]) require.NoError(t, err) @@ -295,7 +295,7 @@ func TestProposalPassedEndblocker(t *testing.T) { proposal, err := app.GovKeeper.SubmitProposal(ctx, TestProposal) require.NoError(t, err) - proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction))} + proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 10))} newDepositMsg := types.NewMsgDeposit(addrs[0], proposal.ProposalId, proposalCoins) handleAndCheck(t, handler, ctx, newDepositMsg) @@ -343,7 +343,7 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) { proposal, err := app.GovKeeper.SubmitProposal(ctx, TestProposal) require.NoError(t, err) - proposalCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction))) + proposalCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 10))) newDepositMsg := types.NewMsgDeposit(addrs[0], proposal.ProposalId, proposalCoins) handleAndCheck(t, gov.NewHandler(app.GovKeeper), ctx, newDepositMsg) diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index a967b4e9cbc3..e39ca9c70380 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -48,9 +48,9 @@ func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val2) app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val3) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0], sdk.DefaultPowerReduction), stakingtypes.Unbonded, val1, true) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1], sdk.DefaultPowerReduction), stakingtypes.Unbonded, val2, true) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[2], sdk.TokensFromConsensusPower(powers[2], sdk.DefaultPowerReduction), stakingtypes.Unbonded, val3, true) + _, _ = app.StakingKeeper.Delegate(ctx, addrs[0], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[0]), stakingtypes.Unbonded, val1, true) + _, _ = app.StakingKeeper.Delegate(ctx, addrs[1], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[1]), stakingtypes.Unbonded, val2, true) + _, _ = app.StakingKeeper.Delegate(ctx, addrs[2], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[2]), stakingtypes.Unbonded, val3, true) _ = staking.EndBlocker(ctx, app.StakingKeeper) diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index e1415f099a0b..b99db4a5f16b 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -22,8 +22,8 @@ func TestDeposits(t *testing.T) { require.NoError(t, err) proposalID := proposal.ProposalId - fourStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction))) - fiveStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction))) + fourStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 4))) + fiveStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 5))) addr0Initial := app.BankKeeper.GetAllBalances(ctx, TestAddrs[0]) addr1Initial := app.BankKeeper.GetAllBalances(ctx, TestAddrs[1]) diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 59bdd442c999..af03f767c7d6 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -164,7 +164,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { { "request with filter of deposit address", func() { - depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction))) + depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 20))) deposit := types.NewDeposit(testProposals[0].ProposalId, addrs[0], depositCoins) app.GovKeeper.SetDeposit(ctx, deposit) @@ -584,7 +584,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { { "valid request", func() { - depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction))) + depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 20))) deposit := types.NewDeposit(proposal.ProposalId, addrs[0], depositCoins) app.GovKeeper.SetDeposit(ctx, deposit) @@ -671,11 +671,11 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { { "get deposits with default limit", func() { - depositAmount1 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction))) + depositAmount1 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 20))) deposit1 := types.NewDeposit(proposal.ProposalId, addrs[0], depositAmount1) app.GovKeeper.SetDeposit(ctx, deposit1) - depositAmount2 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction))) + depositAmount2 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 30))) deposit2 := types.NewDeposit(proposal.ProposalId, addrs[1], depositAmount2) app.GovKeeper.SetDeposit(ctx, deposit2) diff --git a/x/gov/keeper/querier_test.go b/x/gov/keeper/querier_test.go index d416cb350db8..a725aec9e6b2 100644 --- a/x/gov/keeper/querier_test.go +++ b/x/gov/keeper/querier_test.go @@ -153,7 +153,7 @@ func TestQueries(t *testing.T) { TestAddrs := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(20000001)) oneCoins := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 1)) - consCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction))) + consCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 10))) tp := TestProposal diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 4e2ac847e9c6..d7699889d5e6 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -245,7 +245,7 @@ func TestTallyDelgatorOverride(t *testing.T) { addrs, valAddrs := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) val1, found := app.StakingKeeper.GetValidator(ctx, valAddrs[0]) require.True(t, found) @@ -281,7 +281,7 @@ func TestTallyDelgatorInherit(t *testing.T) { addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) val3, found := app.StakingKeeper.GetValidator(ctx, vals[2]) require.True(t, found) @@ -316,7 +316,7 @@ func TestTallyDelgatorMultipleOverride(t *testing.T) { addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) val1, found := app.StakingKeeper.GetValidator(ctx, vals[0]) require.True(t, found) val2, found := app.StakingKeeper.GetValidator(ctx, vals[1]) @@ -358,7 +358,7 @@ func TestTallyDelgatorMultipleInherit(t *testing.T) { addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) val2, found := app.StakingKeeper.GetValidator(ctx, vals[1]) require.True(t, found) val3, found := app.StakingKeeper.GetValidator(ctx, vals[2]) @@ -397,7 +397,7 @@ func TestTallyJailedValidator(t *testing.T) { addrs, valAddrs := createValidators(t, ctx, app, []int64{25, 6, 7}) - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) val2, found := app.StakingKeeper.GetValidator(ctx, valAddrs[1]) require.True(t, found) val3, found := app.StakingKeeper.GetValidator(ctx, valAddrs[2]) @@ -440,7 +440,7 @@ func TestTallyValidatorMultipleDelegations(t *testing.T) { addrs, valAddrs := createValidators(t, ctx, app, []int64{10, 10, 10}) - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) val2, found := app.StakingKeeper.GetValidator(ctx, valAddrs[1]) require.True(t, found) @@ -465,10 +465,10 @@ func TestTallyValidatorMultipleDelegations(t *testing.T) { require.True(t, passes) require.False(t, burnDeposits) - expectedYes := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) - expectedAbstain := sdk.TokensFromConsensusPower(0, sdk.DefaultPowerReduction) - expectedNo := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) - expectedNoWithVeto := sdk.TokensFromConsensusPower(0, sdk.DefaultPowerReduction) + expectedYes := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) + expectedAbstain := app.StakingKeeper.TokensFromConsensusPower(ctx, 0) + expectedNo := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) + expectedNoWithVeto := app.StakingKeeper.TokensFromConsensusPower(ctx, 0) expectedTallyResult := types.NewTallyResult(expectedYes, expectedAbstain, expectedNo, expectedNoWithVeto) require.True(t, tallyResults.Equals(expectedTallyResult)) diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 169665ad9f70..e61fe8ac1b60 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -222,7 +222,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { func getTestingAccounts(t *testing.T, r *rand.Rand, app *simapp.SimApp, ctx sdk.Context, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) + initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index b9ad609211c9..364a505c5044 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) SetupTest() { val.Tokens = sdk.NewInt(rand.Int63()) validators = append(validators, val) - hi := stakingtypes.NewHistoricalInfo(suite.ctx.BlockHeader(), validators, sdk.DefaultPowerReduction) + hi := stakingtypes.NewHistoricalInfo(suite.ctx.BlockHeader(), validators, app.StakingKeeper.PowerReduction(suite.ctx)) app.StakingKeeper.SetHistoricalInfo(suite.ctx, int64(i), &hi) } diff --git a/x/slashing/abci_test.go b/x/slashing/abci_test.go index f07b1c81fa9d..6121e3572b88 100644 --- a/x/slashing/abci_test.go +++ b/x/slashing/abci_test.go @@ -21,7 +21,7 @@ func TestBeginBlocker(t *testing.T) { ctx := app.BaseApp.NewContext(false, tmproto.Header{}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) addr, pk := sdk.ValAddress(pks[0].Address()), pks[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) diff --git a/x/slashing/genesis_test.go b/x/slashing/genesis_test.go index e31144f331ee..1467fac6efd1 100644 --- a/x/slashing/genesis_test.go +++ b/x/slashing/genesis_test.go @@ -20,7 +20,7 @@ func TestExportAndInitGenesis(t *testing.T) { app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) info1 := types.NewValidatorSigningInfo(sdk.ConsAddress(addrDels[0]), int64(4), int64(3), time.Now().UTC().Add(100000000000), false, int64(10)) diff --git a/x/slashing/handler_test.go b/x/slashing/handler_test.go index 87746d867213..e6b6af64b68d 100644 --- a/x/slashing/handler_test.go +++ b/x/slashing/handler_test.go @@ -26,7 +26,7 @@ func TestCannotUnjailUnlessJailed(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) slh := slashing.NewHandler(app.SlashingKeeper) @@ -52,12 +52,12 @@ func TestCannotUnjailUnlessMeetMinSelfDelegation(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) slh := slashing.NewHandler(app.SlashingKeeper) addr, val := sdk.ValAddress(pks[0].Address()), pks[0] - amt := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + amt := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) msg := tstaking.CreateValidatorMsg(addr, val, amt) msg.MinSelfDelegation = amt tstaking.Handle(msg, true) @@ -84,7 +84,7 @@ func TestJailedValidatorDelegations(t *testing.T) { ctx := app.BaseApp.NewContext(false, tmproto.Header{Time: time.Unix(0, 0)}) pks := simapp.CreateTestPubKeys(3) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, app.StakingKeeper.TokensFromConsensusPower(ctx, 20)) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -145,7 +145,7 @@ func TestHandleAbsentValidator(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{Time: time.Unix(0, 0)}) pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) power := int64(100) diff --git a/x/slashing/keeper/grpc_query_test.go b/x/slashing/keeper/grpc_query_test.go index c4880afd7fab..6290b94e0004 100644 --- a/x/slashing/keeper/grpc_query_test.go +++ b/x/slashing/keeper/grpc_query_test.go @@ -35,7 +35,7 @@ func (suite *SlashingTestSuite) SetupTest() { app.BankKeeper.SetParams(ctx, banktypes.DefaultParams()) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) info1 := types.NewValidatorSigningInfo(sdk.ConsAddress(addrDels[0]), int64(4), int64(3), time.Unix(2, 0), false, int64(10)) diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 002d6a03a39e..7f3d42b0a7ed 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -23,7 +23,7 @@ func TestUnJailNotBonded(t *testing.T) { p.MaxValidators = 5 app.StakingKeeper.SetParams(ctx, p) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 6, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 6, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) pks := simapp.CreateTestPubKeys(6) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -39,7 +39,7 @@ func TestUnJailNotBonded(t *testing.T) { // create a 6th validator with less power than the cliff validator (won't be bonded) addr, val := valAddrs[5], pks[5] - amt := sdk.TokensFromConsensusPower(50, sdk.DefaultPowerReduction) + amt := app.StakingKeeper.TokensFromConsensusPower(ctx, 50) msg := tstaking.CreateValidatorMsg(addr, val, amt) msg.MinSelfDelegation = amt tstaking.Handle(msg, true) @@ -51,7 +51,7 @@ func TestUnJailNotBonded(t *testing.T) { // unbond below minimum self-delegation require.Equal(t, p.BondDenom, tstaking.Denom) - tstaking.Undelegate(sdk.AccAddress(addr), addr, sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction), true) + tstaking.Undelegate(sdk.AccAddress(addr), addr, app.StakingKeeper.TokensFromConsensusPower(ctx, 1), true) staking.EndBlocker(ctx, app.StakingKeeper) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) @@ -83,7 +83,7 @@ func TestHandleNewValidator(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) pks := simapp.CreateTestPubKeys(1) addr, val := valAddrs[0], pks[0] @@ -116,7 +116,7 @@ func TestHandleNewValidator(t *testing.T) { validator, _ := app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(val)) require.Equal(t, stakingtypes.Bonded, validator.GetStatus()) bondPool := app.StakingKeeper.GetBondedPool(ctx) - expTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + expTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) require.True(t, expTokens.Equal(app.BankKeeper.GetBalance(ctx, bondPool.GetAddress(), app.StakingKeeper.BondDenom(ctx)).Amount)) } @@ -127,7 +127,7 @@ func TestHandleAlreadyJailed(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) pks := simapp.CreateTestPubKeys(1) addr, val := valAddrs[0], pks[0] @@ -159,7 +159,7 @@ func TestHandleAlreadyJailed(t *testing.T) { require.Equal(t, stakingtypes.Unbonding, validator.GetStatus()) // validator should have been slashed - resultingTokens := amt.Sub(sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction)) + resultingTokens := amt.Sub(app.StakingKeeper.TokensFromConsensusPower(ctx, 1)) require.Equal(t, resultingTokens, validator.GetTokens()) // another block missed @@ -188,7 +188,7 @@ func TestValidatorDippingInAndOut(t *testing.T) { power := int64(100) pks := simapp.CreateTestPubKeys(3) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + simapp.AddTestAddrsFromPubKeys(app, ctx, pks, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) addr, val := pks[0].Address(), pks[0] consAddr := sdk.ConsAddress(addr) diff --git a/x/slashing/keeper/signing_info_test.go b/x/slashing/keeper/signing_info_test.go index e1b4f1720afe..2748042b3600 100644 --- a/x/slashing/keeper/signing_info_test.go +++ b/x/slashing/keeper/signing_info_test.go @@ -15,7 +15,7 @@ import ( func TestGetSetValidatorSigningInfo(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) info, found := app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0])) require.False(t, found) @@ -39,7 +39,7 @@ func TestGetSetValidatorSigningInfo(t *testing.T) { func TestGetSetValidatorMissedBlockBitArray(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) missed := app.SlashingKeeper.GetValidatorMissedBlockBitArray(ctx, sdk.ConsAddress(addrDels[0]), 0) require.False(t, missed) // treat empty key as not missed @@ -51,7 +51,7 @@ func TestGetSetValidatorMissedBlockBitArray(t *testing.T) { func TestTombstoned(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) require.Panics(t, func() { app.SlashingKeeper.Tombstone(ctx, sdk.ConsAddress(addrDels[0])) }) require.False(t, app.SlashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(addrDels[0]))) @@ -75,7 +75,7 @@ func TestTombstoned(t *testing.T) { func TestJailUntil(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)) + addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) require.Panics(t, func() { app.SlashingKeeper.JailUntil(ctx, sdk.ConsAddress(addrDels[0]), time.Now()) }) diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index 2042821c7a76..707233b21e53 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -77,7 +77,7 @@ func TestSimulateMsgUnjail(t *testing.T) { app.StakingKeeper.Jail(ctx, val0ConsAddress) // setup self delegation - delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) val0AccAddress, err := sdk.ValAddressFromBech32(validator0.OperatorAddress) require.NoError(t, err) @@ -116,7 +116,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { func getTestingAccounts(t *testing.T, r *rand.Rand, app *simapp.SimApp, ctx sdk.Context, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) + initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/staking/client/cli/cli_test.go b/x/staking/client/cli/cli_test.go index f1ef9edc6b8a..ab67a38b63d1 100644 --- a/x/staking/client/cli/cli_test.go +++ b/x/staking/client/cli/cli_test.go @@ -861,12 +861,13 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { historical_entries: 10000 max_entries: 7 max_validators: 100 +power_reduction: "1000000" unbonding_time: 1814400s`, }, { "with json output", []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - `{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":10000,"bond_denom":"stake"}`, + `{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":10000,"bond_denom":"stake","power_reduction":"1000000"}`, }, } for _, tc := range testCases { diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 4c4bf97847ce..745d851ca67d 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -23,7 +23,7 @@ func bootstrapGenesisTest(t *testing.T, power int64, numAddrs int) (*simapp.SimA addrDels, _ := generateAddresses(app, ctx, numAddrs, sdk.NewInt(10000)) - amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + amt := app.StakingKeeper.TokensFromConsensusPower(ctx, power) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -39,7 +39,7 @@ func bootstrapGenesisTest(t *testing.T, power int64, numAddrs int) (*simapp.SimA func TestInitGenesis(t *testing.T) { app, ctx, addrs := bootstrapGenesisTest(t, 1000, 10) - valTokens := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) params := app.StakingKeeper.GetParams(ctx) validators := make([]types.Validator, 2) @@ -91,7 +91,7 @@ func TestInitGenesis(t *testing.T) { abcivals := make([]abci.ValidatorUpdate, len(vals)) for i, val := range validators { - abcivals[i] = val.ABCIValidatorUpdate(sdk.DefaultPowerReduction) + abcivals[i] = val.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)) } require.Equal(t, abcivals, vals) @@ -113,9 +113,9 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) { require.NoError(t, err) validators[i].Status = types.Bonded - tokens := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) if i < 100 { - tokens = sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 2) } validators[i].Tokens = tokens validators[i].DelegatorShares = tokens.ToDec() @@ -126,7 +126,7 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) { abcivals := make([]abci.ValidatorUpdate, 100) for i, val := range validators[:100] { - abcivals[i] = val.ABCIValidatorUpdate(sdk.DefaultPowerReduction) + abcivals[i] = val.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)) } require.Equal(t, abcivals, vals) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 07c3c23854c0..aed5ab1b7041 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -32,7 +32,7 @@ func bootstrapHandlerGenesisTest(t *testing.T, power int64, numAddrs int, accAmo addrDels, addrVals := generateAddresses(app, ctx, numAddrs, accAmount) - amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + amt := app.StakingKeeper.TokensFromConsensusPower(ctx, power) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -45,6 +45,51 @@ func bootstrapHandlerGenesisTest(t *testing.T, power int64, numAddrs int, accAmo return app, ctx, addrDels, addrVals } +func TestPowerReductionChangeValidatorSetUpdates(t *testing.T) { + initPower := int64(1000000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) + validatorAddr, validatorAddr3 := valAddrs[0], valAddrs[1] + tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) + + // create validator + tstaking.CreateValidatorWithValPower(validatorAddr, PKs[0], initPower, true) + + // must end-block + updates, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + require.Equal(t, 1, len(updates)) + + // create a second validator keep it bonded + tstaking.CreateValidatorWithValPower(validatorAddr3, PKs[2], initPower, true) + + // must end-block + updates, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + require.Equal(t, 1, len(updates)) + + // modify power reduction to 10 times bigger one + params := app.StakingKeeper.GetParams(ctx) + params.PowerReduction = sdk.DefaultPowerReduction.Mul(sdk.NewInt(10)) + app.StakingKeeper.SetParams(ctx, params) + + // validator updates for tendermint power + updates, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + require.Equal(t, 2, len(updates)) + require.Equal(t, updates[0].Power, initPower/10) + require.Equal(t, updates[1].Power, initPower/10) + + // power reduction back to default + params = app.StakingKeeper.GetParams(ctx) + params.PowerReduction = sdk.DefaultPowerReduction + app.StakingKeeper.SetParams(ctx, params) + + // power reduction change for all validators + updates, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + require.Equal(t, 2, len(updates)) +} + func TestValidatorByPowerIndex(t *testing.T) { initPower := int64(1000000) app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) @@ -68,7 +113,7 @@ func TestValidatorByPowerIndex(t *testing.T) { // verify that the by power index exists validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddr) require.True(t, found) - power := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) + power := types.GetValidatorsByPowerIndexKey(validator, app.StakingKeeper.PowerReduction(ctx)) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) // create a second validator keep it bonded @@ -97,11 +142,11 @@ func TestValidatorByPowerIndex(t *testing.T) { // but the new power record should have been created validator, found = app.StakingKeeper.GetValidator(ctx, validatorAddr) require.True(t, found) - power2 := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) + power2 := types.GetValidatorsByPowerIndexKey(validator, app.StakingKeeper.PowerReduction(ctx)) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power2)) // now the new record power index should be the same as the original record - power3 := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) + power3 := types.GetValidatorsByPowerIndexKey(validator, app.StakingKeeper.PowerReduction(ctx)) require.Equal(t, power2, power3) // unbond self-delegation @@ -491,8 +536,8 @@ func TestIncrementsMsgUnbond(t *testing.T) { errorCases := []sdk.Int{ //1<<64 - 1, // more than int64 power //1<<63 + 1, // more than int64 power - sdk.TokensFromConsensusPower(1<<63-1, sdk.DefaultPowerReduction), - sdk.TokensFromConsensusPower(1<<31, sdk.DefaultPowerReduction), + app.StakingKeeper.TokensFromConsensusPower(ctx, 1<<63-1), + app.StakingKeeper.TokensFromConsensusPower(ctx, 1<<31), initBond, } @@ -527,7 +572,7 @@ func TestMultipleMsgCreateValidator(t *testing.T) { } // bond them all - amt := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + amt := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) for i, validatorAddr := range validatorAddrs { tstaking.CreateValidator(validatorAddr, PKs[i], amt, true) // verify that the account is bonded @@ -1094,11 +1139,11 @@ func TestBondUnbondRedelegateSlashTwice(t *testing.T) { tstaking.Ctx = ctx // begin unbonding 4 stake - unbondAmt := sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction) + unbondAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 4) tstaking.Undelegate(del, valA, unbondAmt, true) // begin redelegate 6 stake - redAmt := sdk.NewCoin(sdk.DefaultBondDenom, sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction)) + redAmt := sdk.NewCoin(sdk.DefaultBondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 6)) msgBeginRedelegate := types.NewMsgBeginRedelegate(del, valA, valB, redAmt) tstaking.Handle(msgBeginRedelegate, true) @@ -1182,7 +1227,7 @@ func TestInvalidCoinDenom(t *testing.T) { valA, valB, delAddr := valAddrs[0], valAddrs[1], delAddrs[2] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) - valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) invalidCoin := sdk.NewCoin("churros", valTokens) validCoin := sdk.NewCoin(sdk.DefaultBondDenom, valTokens) oneCoin := sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt()) diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 7ec6bfe521d0..9e45b69f70ae 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -183,7 +183,7 @@ func TestUnbondDelegation(t *testing.T) { delAddrs := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000)) valAddrs := simapp.ConvertAddrsToValAddrs(delAddrs) - startTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) require.NoError(t, @@ -207,7 +207,7 @@ func TestUnbondDelegation(t *testing.T) { delegation := types.NewDelegation(delAddrs[0], valAddrs[0], issuedShares) app.StakingKeeper.SetDelegation(ctx, delegation) - bondTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) + bondTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) amount, err := app.StakingKeeper.Unbond(ctx, delAddrs[0], valAddrs[0], bondTokens.ToDec()) require.NoError(t, err) require.Equal(t, bondTokens, amount) // shares to be added to an unbonding delegation @@ -228,7 +228,7 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) bondDenom := app.StakingKeeper.BondDenom(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -310,7 +310,7 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) //create a validator with a self-delegation @@ -358,7 +358,7 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { app.StakingKeeper.SetDelegation(ctx, delegation) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - _, err = app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction).ToDec()) + _, err = app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], app.StakingKeeper.TokensFromConsensusPower(ctx, 6).ToDec()) require.NoError(t, err) // end block @@ -366,14 +366,14 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) - require.Equal(t, sdk.TokensFromConsensusPower(14, sdk.DefaultPowerReduction), validator.Tokens) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 14), validator.Tokens) require.Equal(t, types.Unbonding, validator.Status) require.True(t, validator.Jailed) } func TestUndelegateFromUnbondingValidator(t *testing.T) { _, app, ctx := createTestInput() - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) @@ -466,7 +466,7 @@ func TestUndelegateFromUnbondingValidator(t *testing.T) { func TestUndelegateFromUnbondedValidator(t *testing.T) { _, app, ctx := createTestInput() - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) @@ -483,7 +483,7 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -534,7 +534,7 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { require.Equal(t, validator.Status, types.Unbonded) // unbond some of the other delegation's shares - unbondTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) + unbondTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) _, err = app.StakingKeeper.Undelegate(ctx, addrDels[1], addrVals[0], unbondTokens.ToDec()) require.NoError(t, err) @@ -550,7 +550,7 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { func TestUnbondingAllDelegationFromValidator(t *testing.T) { _, app, ctx := createTestInput() - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) @@ -567,7 +567,7 @@ func TestUnbondingAllDelegationFromValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) @@ -720,7 +720,7 @@ func TestRedelegateToSameValidator(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), valTokens)) // add bonded tokens to pool for delegations @@ -751,7 +751,7 @@ func TestRedelegationMaxEntries(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -763,7 +763,7 @@ func TestRedelegationMaxEntries(t *testing.T) { // create a validator with a self-delegation validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -809,7 +809,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -823,7 +823,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) @@ -841,7 +841,7 @@ func TestRedelegateSelfDelegation(t *testing.T) { require.Equal(t, types.Bonded, validator2.Status) // create a second delegation to validator 1 - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(t, delTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -867,7 +867,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -881,7 +881,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -891,7 +891,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { // create a second delegation to this validator app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(t, delTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -933,7 +933,7 @@ func TestRedelegateFromUnbondingValidator(t *testing.T) { ctx = ctx.WithBlockHeader(header) // unbond some of the other delegation's shares - redelegateTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) + redelegateTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegateTokens.ToDec()) require.NoError(t, err) @@ -951,7 +951,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) // add bonded tokens to pool for delegations @@ -965,7 +965,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -975,7 +975,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { // create a second delegation to this validator app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) - delTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares = validator.AddTokensFromDel(delTokens) require.Equal(t, delTokens, issuedShares.RoundInt()) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) @@ -1009,7 +1009,7 @@ func TestRedelegateFromUnbondedValidator(t *testing.T) { app.StakingKeeper.UnbondingToUnbonded(ctx, validator) // redelegate some of the delegation's shares - redelegationTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) + redelegationTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegationTokens.ToDec()) require.NoError(t, err) diff --git a/x/staking/keeper/grpc_query_test.go b/x/staking/keeper/grpc_query_test.go index a1d4c88883ff..c82f71552e0f 100644 --- a/x/staking/keeper/grpc_query_test.go +++ b/x/staking/keeper/grpc_query_test.go @@ -395,7 +395,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryUnbondingDelegation() { addrAcc2 := addrs[1] addrVal2 := vals[1].OperatorAddress - unbondingTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + unbondingTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) valAddr, err1 := sdk.ValAddressFromBech32(addrVal2) suite.NoError(err1) _, err := app.StakingKeeper.Undelegate(ctx, addrAcc2, valAddr, unbondingTokens.ToDec()) @@ -450,7 +450,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() { addrAcc, addrAcc1 := addrs[0], addrs[1] addrVal, addrVal2 := vals[0].OperatorAddress, vals[1].OperatorAddress - unbondingTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + unbondingTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) valAddr1, err1 := sdk.ValAddressFromBech32(addrVal) suite.NoError(err1) _, err := app.StakingKeeper.Undelegate(ctx, addrAcc, valAddr1, unbondingTokens.ToDec()) @@ -592,12 +592,12 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() { addrAcc, addrAcc1 := addrs[0], addrs[1] valAddrs := simapp.ConvertAddrsToValAddrs(addrs) val1, val2, val3, val4 := vals[0], vals[1], valAddrs[3], valAddrs[4] - delAmount := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) + delAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) _, err := app.StakingKeeper.Delegate(ctx, addrAcc1, delAmount, types.Unbonded, val1, true) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) - rdAmount := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) + rdAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc1, val1.GetOperator(), val2.GetOperator(), rdAmount.ToDec()) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) @@ -684,7 +684,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { val1 := vals[0] // undelegate - undelAmount := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + undelAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) _, err := app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), undelAmount.ToDec()) suite.NoError(err) applyValidatorSetUpdates(suite.T(), ctx, app.StakingKeeper, -1) @@ -729,7 +729,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { } func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers []int64) ([]sdk.AccAddress, []sdk.ValAddress, []types.Validator) { - addrs := simapp.AddTestAddrsIncremental(app, ctx, 5, sdk.TokensFromConsensusPower(300, sdk.DefaultPowerReduction)) + addrs := simapp.AddTestAddrsIncremental(app, ctx, 5, app.StakingKeeper.TokensFromConsensusPower(ctx, 300)) valAddrs := simapp.ConvertAddrsToValAddrs(addrs) pks := simapp.CreateTestPubKeys(5) cdc := simapp.MakeTestEncodingConfig().Marshaler @@ -752,11 +752,11 @@ func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val1) app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val2) - _, err := app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0], sdk.DefaultPowerReduction), types.Unbonded, val1, true) + _, err := app.StakingKeeper.Delegate(ctx, addrs[0], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[0]), types.Unbonded, val1, true) require.NoError(t, err) - _, err = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1], sdk.DefaultPowerReduction), types.Unbonded, val2, true) + _, err = app.StakingKeeper.Delegate(ctx, addrs[1], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[1]), types.Unbonded, val2, true) require.NoError(t, err) - _, err = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[2], sdk.DefaultPowerReduction), types.Unbonded, val2, true) + _, err = app.StakingKeeper.Delegate(ctx, addrs[0], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[2]), types.Unbonded, val2, true) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index b31407cf8e96..727fe58959af 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -25,7 +25,7 @@ func TestHistoricalInfo(t *testing.T) { validators[i] = teststaking.NewValidator(t, valAddr, PKs[i]) } - hi := types.NewHistoricalInfo(ctx.BlockHeader(), validators, sdk.DefaultPowerReduction) + hi := types.NewHistoricalInfo(ctx.BlockHeader(), validators, app.StakingKeeper.PowerReduction(ctx)) app.StakingKeeper.SetHistoricalInfo(ctx, 2, &hi) recv, found := app.StakingKeeper.GetHistoricalInfo(ctx, 2) @@ -65,8 +65,8 @@ func TestTrackHistoricalInfo(t *testing.T) { teststaking.NewValidator(t, addrVals[0], PKs[0]), teststaking.NewValidator(t, addrVals[1], PKs[1]), } - hi4 := types.NewHistoricalInfo(h4, valSet, sdk.DefaultPowerReduction) - hi5 := types.NewHistoricalInfo(h5, valSet, sdk.DefaultPowerReduction) + hi4 := types.NewHistoricalInfo(h4, valSet, app.StakingKeeper.PowerReduction(ctx)) + hi5 := types.NewHistoricalInfo(h5, valSet, app.StakingKeeper.PowerReduction(ctx)) app.StakingKeeper.SetHistoricalInfo(ctx, 4, &hi4) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi5) recv, found := app.StakingKeeper.GetHistoricalInfo(ctx, 4) diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index bc0825a8e74a..b0533c8ab02f 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -45,7 +45,7 @@ func (suite *KeeperTestSuite) SetupTest() { // have its order changed sortedVals := make([]types.Validator, len(validators)) copy(sortedVals, validators) - hi := types.NewHistoricalInfo(header, sortedVals, sdk.DefaultPowerReduction) + hi := types.NewHistoricalInfo(header, sortedVals, app.StakingKeeper.PowerReduction(ctx)) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi) suite.app, suite.ctx, suite.queryClient, suite.addrs, suite.vals = app, ctx, queryClient, addrs, validators diff --git a/x/staking/keeper/power_reduction_test.go b/x/staking/keeper/power_reduction_test.go index df54a0358f07..b1e3c79429fd 100644 --- a/x/staking/keeper/power_reduction_test.go +++ b/x/staking/keeper/power_reduction_test.go @@ -1,21 +1,28 @@ package keeper_test import ( - "testing" + "math/big" sdk "github.com/cosmos/cosmos-sdk/types" ) -func (suite *KeeperTestSuite) TestPowerReductionChange(t *testing.T) { - // TODO: Implement! +func (suite *KeeperTestSuite) TestPowerReductionChange() { + // modify power reduction + newPowerReduction := sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(12), nil)) + params := suite.app.StakingKeeper.GetParams(suite.ctx) + params.PowerReduction = newPowerReduction + suite.app.StakingKeeper.SetParams(suite.ctx, params) + + // check power reduction change + suite.Require().Equal(newPowerReduction, suite.app.StakingKeeper.PowerReduction(suite.ctx)) } func (suite *KeeperTestSuite) TestTokensToConsensusPower() { - suite.Require().Equal(int64(0), suite.app.StakingKeeper.TokensToConsensusPower(suite.ctx, sdk.NewInt(999_999))) - suite.Require().Equal(int64(1), suite.app.StakingKeeper.TokensToConsensusPower(suite.ctx, sdk.NewInt(1_000_000))) + suite.Require().Equal(int64(0), suite.app.StakingKeeper.TokensToConsensusPower(suite.ctx, sdk.DefaultPowerReduction.Sub(sdk.NewInt(1)))) + suite.Require().Equal(int64(1), suite.app.StakingKeeper.TokensToConsensusPower(suite.ctx, sdk.DefaultPowerReduction)) } func (suite *KeeperTestSuite) TestTokensFromConsensusPower() { suite.Require().Equal(sdk.NewInt(0), suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 0)) - suite.Require().Equal(sdk.NewInt(1_000_000), suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 1)) + suite.Require().Equal(sdk.DefaultPowerReduction, suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 1)) } diff --git a/x/staking/keeper/querier_test.go b/x/staking/keeper/querier_test.go index 14cd841f2e9b..6abe7d53cddd 100644 --- a/x/staking/keeper/querier_test.go +++ b/x/staking/keeper/querier_test.go @@ -37,7 +37,7 @@ func TestNewQuerier(t *testing.T) { ChainID: "HelloChain", Height: 5, } - hi := types.NewHistoricalInfo(header, validators[:], sdk.DefaultPowerReduction) + hi := types.NewHistoricalInfo(header, validators[:], app.StakingKeeper.PowerReduction(ctx)) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi) query := abci.RequestQuery{ @@ -140,7 +140,7 @@ func TestQueryValidators(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 500, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) + addrs := simapp.AddTestAddrs(app, ctx, 500, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) // Create Validators amts := []sdk.Int{sdk.NewInt(9), sdk.NewInt(8), sdk.NewInt(7)} @@ -208,7 +208,7 @@ func TestQueryDelegation(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) + addrs := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1, addrVal2 := sdk.ValAddress(addrAcc1), sdk.ValAddress(addrAcc2) @@ -224,7 +224,7 @@ func TestQueryDelegation(t *testing.T) { app.StakingKeeper.SetValidator(ctx, val2) app.StakingKeeper.SetValidatorByPowerIndex(ctx, val2) - delTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) _, err := app.StakingKeeper.Delegate(ctx, addrAcc2, delTokens, types.Unbonded, val1, true) require.NoError(t, err) @@ -348,7 +348,7 @@ func TestQueryDelegation(t *testing.T) { require.Equal(t, sdk.NewCoin(sdk.DefaultBondDenom, delegation.Shares.TruncateInt()), delegationsRes[0].Balance) // Query unbonding delegation - unbondingTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + unbondingTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) _, err = app.StakingKeeper.Undelegate(ctx, addrAcc2, val1.GetOperator(), unbondingTokens.ToDec()) require.NoError(t, err) @@ -401,7 +401,7 @@ func TestQueryDelegation(t *testing.T) { require.Error(t, err) // Query redelegation - redelegationTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + redelegationTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator(), redelegationTokens.ToDec()) require.NoError(t, err) @@ -456,7 +456,7 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 100, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) + addrs := simapp.AddTestAddrs(app, ctx, 100, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) pubKeys := simapp.CreateTestPubKeys(1) valAddress := sdk.ValAddress(addrs[0]) @@ -472,7 +472,7 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { t.Error("expected validator not found") } - delTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) _, err := app.StakingKeeper.Delegate(ctx, addr, delTokens, types.Unbonded, validator, true) require.NoError(t, err) } @@ -506,7 +506,7 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { // Undelegate for _, addr := range addrs { - delTokens := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) _, err := app.StakingKeeper.Undelegate(ctx, addr, val1.GetOperator(), delTokens.ToDec()) require.NoError(t, err) } @@ -541,7 +541,7 @@ func TestQueryRedelegations(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) + addrs := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1, addrVal2 := sdk.ValAddress(addrAcc1), sdk.ValAddress(addrAcc2) @@ -551,12 +551,12 @@ func TestQueryRedelegations(t *testing.T) { app.StakingKeeper.SetValidator(ctx, val1) app.StakingKeeper.SetValidator(ctx, val2) - delAmount := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + delAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) _, err := app.StakingKeeper.Delegate(ctx, addrAcc2, delAmount, types.Unbonded, val1, true) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) - rdAmount := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) + rdAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) _, err = app.StakingKeeper.BeginRedelegation(ctx, addrAcc2, val1.GetOperator(), val2.GetOperator(), rdAmount.ToDec()) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) @@ -613,7 +613,7 @@ func TestQueryUnbondingDelegation(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) + addrs := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1 := sdk.ValAddress(addrAcc1) @@ -622,13 +622,13 @@ func TestQueryUnbondingDelegation(t *testing.T) { app.StakingKeeper.SetValidator(ctx, val1) // delegate - delAmount := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + delAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) _, err := app.StakingKeeper.Delegate(ctx, addrAcc1, delAmount, types.Unbonded, val1, true) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) // undelegate - undelAmount := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) + undelAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) _, err = app.StakingKeeper.Undelegate(ctx, addrAcc1, val1.GetOperator(), undelAmount.ToDec()) require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) @@ -709,7 +709,7 @@ func TestQueryHistoricalInfo(t *testing.T) { legacyQuerierCdc := codec.NewAminoCodec(cdc) querier := keeper.NewQuerier(app.StakingKeeper, legacyQuerierCdc.LegacyAmino) - addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) + addrs := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) addrAcc1, addrAcc2 := addrs[0], addrs[1] addrVal1, addrVal2 := sdk.ValAddress(addrAcc1), sdk.ValAddress(addrAcc2) @@ -724,7 +724,7 @@ func TestQueryHistoricalInfo(t *testing.T) { ChainID: "HelloChain", Height: 5, } - hi := types.NewHistoricalInfo(header, vals, sdk.DefaultPowerReduction) + hi := types.NewHistoricalInfo(header, vals, app.StakingKeeper.PowerReduction(ctx)) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi) queryHistoricalParams := types.QueryHistoricalInfoRequest{Height: 4} diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 42e5b383ef02..7b88fbfca17c 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -29,7 +29,7 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh } // Amount of slashing = slash slashFactor * power at time of infraction - amount := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + amount := k.TokensFromConsensusPower(ctx, power) slashAmountDec := amount.ToDec().Mul(slashFactor) slashAmount := slashAmountDec.TruncateInt() diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 941a5a70be46..2320ac857983 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -22,7 +22,7 @@ func bootstrapSlashTest(t *testing.T, power int64) (*simapp.SimApp, sdk.Context, addrDels, addrVals := generateAddresses(app, ctx, 100) - amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + amt := app.StakingKeeper.TokensFromConsensusPower(ctx, power) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -219,12 +219,12 @@ func TestSlashAtNegativeHeight(t *testing.T) { validator, found = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) require.True(t, found) // power decreased - require.Equal(t, int64(5), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(5), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // pool bonded shares decreased newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction).String(), diffTokens.String()) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 5).String(), diffTokens.String()) } // tests Slash at the current height @@ -250,12 +250,12 @@ func TestSlashValidatorAtCurrentHeight(t *testing.T) { validator, found = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) assert.True(t, found) // power decreased - require.Equal(t, int64(5), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(5), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // pool bonded shares decreased newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(5, sdk.DefaultPowerReduction).String(), diffTokens.String()) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 5).String(), diffTokens.String()) } // tests Slash at a previous height with an unbonding delegation @@ -267,7 +267,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // set an unbonding delegation with expiration timestamp beyond which the // unbonding delegation shouldn't be slashed - ubdTokens := sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction) + ubdTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 4) ubd := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 11, time.Unix(0, 0), ubdTokens) app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) @@ -290,12 +290,12 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { require.Len(t, ubd.Entries, 1) // balance decreased - require.Equal(t, sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction), ubd.Entries[0].Balance) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 2), ubd.Entries[0].Balance) // bonded tokens burned newBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens := oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(3, sdk.DefaultPowerReduction), diffTokens) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 3), diffTokens) // read updated validator validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) @@ -305,7 +305,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // was still bonded at the time of discovery and was slashed by half, 4 stake // bonded at the time of discovery hadn't been bonded at the time of infraction // and wasn't slashed - require.Equal(t, int64(7), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(7), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // slash validator again ctx = ctx.WithBlockHeight(13) @@ -321,14 +321,14 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned again newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction), diffTokens) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 6), diffTokens) // read updated validator validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 3 again - require.Equal(t, int64(4), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(4), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // slash validator again // all originally bonded stake has been slashed, so this will have no effect @@ -347,14 +347,14 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // bonded tokens burned again newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(9, sdk.DefaultPowerReduction), diffTokens) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 9), diffTokens) // read updated validator validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 3 again - require.Equal(t, int64(1), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(1), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // slash validator again // all originally bonded stake has been slashed, so this will have no effect @@ -373,7 +373,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { // just 1 bonded token burned again since that's all the validator now has newBondedPoolBalances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) diffTokens = oldBondedPoolBalances.Sub(newBondedPoolBalances).AmountOf(app.StakingKeeper.BondDenom(ctx)) - require.Equal(t, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction), diffTokens) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 10), diffTokens) // apply TM updates applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) @@ -394,7 +394,7 @@ func TestSlashWithRedelegation(t *testing.T) { bondDenom := app.StakingKeeper.BondDenom(ctx) // set a redelegation - rdTokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) + rdTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdTokens, rdTokens.ToDec()) app.StakingKeeper.SetRedelegation(ctx, rd) @@ -424,7 +424,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, fraction) }) - burnAmount := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec().Mul(fraction).TruncateInt() + burnAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec().Mul(fraction).TruncateInt() bondedPool = app.StakingKeeper.GetBondedPool(ctx) notBondedPool = app.StakingKeeper.GetNotBondedPool(ctx) @@ -448,14 +448,14 @@ func TestSlashWithRedelegation(t *testing.T) { // was still bonded at the time of discovery and was slashed by half, 4 stake // bonded at the time of discovery hadn't been bonded at the time of infraction // and wasn't slashed - require.Equal(t, int64(8), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(8), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // slash the validator again validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, sdk.OneDec()) }) - burnAmount = sdk.TokensFromConsensusPower(7, sdk.DefaultPowerReduction) + burnAmount = app.StakingKeeper.TokensFromConsensusPower(ctx, 7) // read updated pool bondedPool = app.StakingKeeper.GetBondedPool(ctx) @@ -481,7 +481,7 @@ func TestSlashWithRedelegation(t *testing.T) { validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 4 - require.Equal(t, int64(4), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(4), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // slash the validator again, by 100% ctx = ctx.WithBlockHeight(12) @@ -490,7 +490,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, sdk.OneDec()) }) - burnAmount = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec().Mul(sdk.OneDec()).TruncateInt() + burnAmount = app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec().Mul(sdk.OneDec()).TruncateInt() burnAmount = burnAmount.Sub(sdk.OneDec().MulInt(rdTokens).TruncateInt()) // read updated pool @@ -550,7 +550,7 @@ func TestSlashBoth(t *testing.T) { // set a redelegation with expiration timestamp beyond which the // redelegation shouldn't be slashed - rdATokens := sdk.TokensFromConsensusPower(6, sdk.DefaultPowerReduction) + rdATokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) rdA := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, time.Unix(0, 0), rdATokens, rdATokens.ToDec()) @@ -562,7 +562,7 @@ func TestSlashBoth(t *testing.T) { // set an unbonding delegation with expiration timestamp (beyond which the // unbonding delegation shouldn't be slashed) - ubdATokens := sdk.TokensFromConsensusPower(4, sdk.DefaultPowerReduction) + ubdATokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 4) ubdA := types.NewUnbondingDelegation(addrDels[0], addrVals[0], 11, time.Unix(0, 0), ubdATokens) app.StakingKeeper.SetUnbondingDelegation(ctx, ubdA) @@ -593,7 +593,7 @@ func TestSlashBoth(t *testing.T) { app.StakingKeeper.Slash(ctx, consAddr0, 10, 10, fraction) burnedNotBondedAmount := fraction.MulInt(ubdATokens).TruncateInt() - burnedBondAmount := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction).ToDec().Mul(fraction).TruncateInt() + burnedBondAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec().Mul(fraction).TruncateInt() burnedBondAmount = burnedBondAmount.Sub(burnedNotBondedAmount) // read updated pool @@ -614,5 +614,5 @@ func TestSlashBoth(t *testing.T) { validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) require.True(t, found) // power not decreased, all stake was bonded since - require.Equal(t, int64(10), validator.GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(10), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) } diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index 4d847977c91a..9d9c0635cbbf 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -30,7 +30,7 @@ func bootstrapValidatorTest(t *testing.T, power int64, numAddrs int) (*simapp.Si addrDels, addrVals := generateAddresses(app, ctx, numAddrs) - amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + amt := app.StakingKeeper.TokensFromConsensusPower(ctx, power) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -49,7 +49,7 @@ func initValidators(t *testing.T, power int64, numAddrs int, powers []int64) (*s vs := make([]types.Validator, len(powers)) for i, power := range powers { vs[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) vs[i], _ = vs[i].AddTokensFromDel(tokens) } return app, ctx, addrs, valAddrs, vs @@ -60,7 +60,7 @@ func TestSetValidator(t *testing.T) { valPubKey := PKs[0] valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) - valTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) // test how the validator is set from a purely unbonbed pool validator := teststaking.NewValidator(t, valAddr, valPubKey) @@ -75,7 +75,7 @@ func TestSetValidator(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validator, found := app.StakingKeeper.GetValidator(ctx, valAddr) require.True(t, found) - require.Equal(t, validator.ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validator.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) // after the save the validator should be bonded require.Equal(t, types.Bonded, validator.Status) @@ -114,10 +114,10 @@ func TestUpdateValidatorByPowerIndex(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234, sdk.DefaultPowerReduction)))) + err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 1234)))) require.NoError(t, err) - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)))) + err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)))) require.NoError(t, err) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) @@ -125,28 +125,28 @@ func TestUpdateValidatorByPowerIndex(t *testing.T) { // add a validator validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - validator, delSharesCreated := validator.AddTokensFromDel(sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction)) + validator, delSharesCreated := validator.AddTokensFromDel(app.StakingKeeper.TokensFromConsensusPower(ctx, 100)) require.Equal(t, types.Unbonded, validator.Status) - require.Equal(t, sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), validator.Tokens) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 100), validator.Tokens) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) - require.Equal(t, sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), validator.Tokens) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 100), validator.Tokens) - power := types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) + power := types.GetValidatorsByPowerIndexKey(validator, app.StakingKeeper.PowerReduction(ctx)) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) // burn half the delegator shares app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) validator, burned := validator.RemoveDelShares(delSharesCreated.Quo(sdk.NewDec(2))) - require.Equal(t, sdk.TokensFromConsensusPower(50, sdk.DefaultPowerReduction), burned) + require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 50), burned) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) // update the validator, possibly kicking it out require.False(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) - power = types.GetValidatorsByPowerIndexKey(validator, sdk.DefaultPowerReduction) + power = types.GetValidatorsByPowerIndexKey(validator, app.StakingKeeper.PowerReduction(ctx)) require.True(t, keeper.ValidatorByPowerIndexExists(ctx, app.StakingKeeper, power)) } @@ -166,10 +166,10 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { app.StakingKeeper.SetParams(ctx, params) // create a random pool - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234, sdk.DefaultPowerReduction)))) + err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 1234)))) require.NoError(t, err) - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)))) + err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)))) require.NoError(t, err) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) @@ -179,7 +179,7 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { for i := 0; i < len(validators); i++ { moniker := fmt.Sprintf("val#%d", int64(i)) val := newMonikerValidator(t, valAddrs[i], PKs[i], moniker) - delTokens := sdk.TokensFromConsensusPower(int64((i+1)*10), sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, int64((i+1)*10)) val, _ = val.AddTokensFromDel(delTokens) val = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, val, true) @@ -191,7 +191,7 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { // remove enough tokens to kick out the validator below the current cliff // validator and next in line cliff validator app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, nextCliffVal) - shares := sdk.TokensFromConsensusPower(21, sdk.DefaultPowerReduction) + shares := app.StakingKeeper.TokensFromConsensusPower(ctx, 21) nextCliffVal, _ = nextCliffVal.RemoveDelShares(shares.ToDec()) nextCliffVal = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, nextCliffVal, true) @@ -220,7 +220,7 @@ func TestSlashToZeroPowerRemoved(t *testing.T) { // add a validator validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) bondedPool := app.StakingKeeper.GetBondedPool(ctx) @@ -256,13 +256,13 @@ func TestValidatorBasics(t *testing.T) { validators[i] = teststaking.NewValidator(t, addrVals[i], PKs[i]) validators[i].Status = types.Unbonded validators[i].Tokens = sdk.ZeroInt() - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) } - assert.Equal(t, sdk.TokensFromConsensusPower(9, sdk.DefaultPowerReduction), validators[0].Tokens) - assert.Equal(t, sdk.TokensFromConsensusPower(8, sdk.DefaultPowerReduction), validators[1].Tokens) - assert.Equal(t, sdk.TokensFromConsensusPower(7, sdk.DefaultPowerReduction), validators[2].Tokens) + assert.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 9), validators[0].Tokens) + assert.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 8), validators[1].Tokens) + assert.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 7), validators[2].Tokens) // check the empty keeper first _, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) @@ -292,11 +292,11 @@ func TestValidatorBasics(t *testing.T) { require.Equal(t, 1, len(resVals)) assert.True(ValEq(t, validators[0], resVals[0])) assert.Equal(t, types.Bonded, validators[0].Status) - assert.True(sdk.IntEq(t, sdk.TokensFromConsensusPower(9, sdk.DefaultPowerReduction), validators[0].BondedTokens())) + assert.True(sdk.IntEq(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 9), validators[0].BondedTokens())) // modify a records, save, and retrieve validators[0].Status = types.Bonded - validators[0].Tokens = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + validators[0].Tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validators[0].DelegatorShares = validators[0].Tokens.ToDec() validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], true) resVal, found = app.StakingKeeper.GetValidator(ctx, addrVals[0]) @@ -351,10 +351,10 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { // initialize some validators into the state amts := []sdk.Int{ sdk.NewIntFromUint64(0), - sdk.DefaultPowerReduction.MulRaw(100), - sdk.DefaultPowerReduction, - sdk.DefaultPowerReduction.MulRaw(400), - sdk.DefaultPowerReduction.MulRaw(200)} + app.StakingKeeper.PowerReduction(ctx).MulRaw(100), + app.StakingKeeper.PowerReduction(ctx), + app.StakingKeeper.PowerReduction(ctx).MulRaw(400), + app.StakingKeeper.PowerReduction(ctx).MulRaw(200)} n := len(amts) var validators [5]types.Validator for i, amt := range amts { @@ -368,10 +368,10 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { // first make sure everything made it in to the gotValidator group resValidators := app.StakingKeeper.GetBondedValidatorsByPower(ctx) assert.Equal(t, n, len(resValidators)) - assert.Equal(t, sdk.NewInt(400).Mul(sdk.DefaultPowerReduction), resValidators[0].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(200).Mul(sdk.DefaultPowerReduction), resValidators[1].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(100).Mul(sdk.DefaultPowerReduction), resValidators[2].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(1).Mul(sdk.DefaultPowerReduction), resValidators[3].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(400).Mul(app.StakingKeeper.PowerReduction(ctx)), resValidators[0].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(200).Mul(app.StakingKeeper.PowerReduction(ctx)), resValidators[1].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(100).Mul(app.StakingKeeper.PowerReduction(ctx)), resValidators[2].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(1).Mul(app.StakingKeeper.PowerReduction(ctx)), resValidators[3].BondedTokens(), "%v", resValidators) assert.Equal(t, sdk.NewInt(0), resValidators[4].BondedTokens(), "%v", resValidators) assert.Equal(t, validators[3].OperatorAddress, resValidators[0].OperatorAddress, "%v", resValidators) assert.Equal(t, validators[4].OperatorAddress, resValidators[1].OperatorAddress, "%v", resValidators) @@ -380,14 +380,14 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { assert.Equal(t, validators[0].OperatorAddress, resValidators[4].OperatorAddress, "%v", resValidators) // test a basic increase in voting power - validators[3].Tokens = sdk.NewInt(500).Mul(sdk.DefaultPowerReduction) + validators[3].Tokens = sdk.NewInt(500).Mul(app.StakingKeeper.PowerReduction(ctx)) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) require.Equal(t, len(resValidators), n) assert.True(ValEq(t, validators[3], resValidators[0])) // test a decrease in voting power - validators[3].Tokens = sdk.NewInt(300).Mul(sdk.DefaultPowerReduction) + validators[3].Tokens = sdk.NewInt(300).Mul(app.StakingKeeper.PowerReduction(ctx)) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) require.Equal(t, len(resValidators), n) @@ -395,7 +395,7 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { assert.True(ValEq(t, validators[4], resValidators[1])) // test equal voting power, different age - validators[3].Tokens = sdk.NewInt(200).Mul(sdk.DefaultPowerReduction) + validators[3].Tokens = sdk.NewInt(200).Mul(app.StakingKeeper.PowerReduction(ctx)) ctx = ctx.WithBlockHeight(10) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) @@ -412,8 +412,8 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { assert.True(ValEq(t, validators[4], resValidators[1])) // change in voting power of both validators, both still in v-set, no age change - validators[3].Tokens = sdk.NewInt(300).Mul(sdk.DefaultPowerReduction) - validators[4].Tokens = sdk.NewInt(300).Mul(sdk.DefaultPowerReduction) + validators[3].Tokens = sdk.NewInt(300).Mul(app.StakingKeeper.PowerReduction(ctx)) + validators[4].Tokens = sdk.NewInt(300).Mul(app.StakingKeeper.PowerReduction(ctx)) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) require.Equal(t, len(resValidators), n) @@ -430,10 +430,10 @@ func TestGetValidatorSortingMixed(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(501, sdk.DefaultPowerReduction)))) + err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 501)))) require.NoError(t, err) - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(0, sdk.DefaultPowerReduction)))) + err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 0)))) require.NoError(t, err) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) @@ -447,10 +447,10 @@ func TestGetValidatorSortingMixed(t *testing.T) { // initialize some validators into the state amts := []sdk.Int{ sdk.NewIntFromUint64(0), - sdk.DefaultPowerReduction.MulRaw(100), - sdk.DefaultPowerReduction, - sdk.DefaultPowerReduction.MulRaw(400), - sdk.DefaultPowerReduction.MulRaw(200)} + app.StakingKeeper.PowerReduction(ctx).MulRaw(100), + app.StakingKeeper.PowerReduction(ctx), + app.StakingKeeper.PowerReduction(ctx).MulRaw(400), + app.StakingKeeper.PowerReduction(ctx).MulRaw(200)} var validators [5]types.Validator for i, amt := range amts { @@ -481,8 +481,8 @@ func TestGetValidatorSortingMixed(t *testing.T) { resValidators := app.StakingKeeper.GetBondedValidatorsByPower(ctx) // The validators returned should match the max validators assert.Equal(t, 2, len(resValidators)) - assert.Equal(t, sdk.NewInt(400).Mul(sdk.DefaultPowerReduction), resValidators[0].BondedTokens(), "%v", resValidators) - assert.Equal(t, sdk.NewInt(200).Mul(sdk.DefaultPowerReduction), resValidators[1].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(400).Mul(app.StakingKeeper.PowerReduction(ctx)), resValidators[0].BondedTokens(), "%v", resValidators) + assert.Equal(t, sdk.NewInt(200).Mul(app.StakingKeeper.PowerReduction(ctx)), resValidators[1].BondedTokens(), "%v", resValidators) assert.Equal(t, validators[3].OperatorAddress, resValidators[0].OperatorAddress, "%v", resValidators) assert.Equal(t, validators[4].OperatorAddress, resValidators[1].OperatorAddress, "%v", resValidators) } @@ -504,7 +504,7 @@ func TestGetValidatorsEdgeCases(t *testing.T) { moniker := fmt.Sprintf("val#%d", int64(i)) validators[i] = newMonikerValidator(t, sdk.ValAddress(addrs[i]), PKs[i], moniker) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -523,7 +523,7 @@ func TestGetValidatorsEdgeCases(t *testing.T) { // delegate 500 tokens to validator 0 app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[0]) - delTokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 500) validators[0], _ = validators[0].AddTokensFromDel(delTokens) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -558,10 +558,10 @@ func TestGetValidatorsEdgeCases(t *testing.T) { validators[3], found = app.StakingKeeper.GetValidator(ctx, validators[3].GetOperator()) assert.True(t, found) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[3]) - validators[3], _ = validators[3].AddTokensFromDel(sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction)) + validators[3], _ = validators[3].AddTokensFromDel(app.StakingKeeper.TokensFromConsensusPower(ctx, 1)) notBondedPool = app.StakingKeeper.GetNotBondedPool(ctx) - newTokens = sdk.NewCoins(sdk.NewCoin(params.BondDenom, sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction))) + newTokens = sdk.NewCoins(sdk.NewCoin(params.BondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 1))) balances = app.BankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) require.NoError(t, app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), balances.Add(newTokens...))) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) @@ -620,9 +620,9 @@ func TestValidatorBondHeight(t *testing.T) { validators[1] = teststaking.NewValidator(t, sdk.ValAddress(addrs[1]), PKs[1]) validators[2] = teststaking.NewValidator(t, sdk.ValAddress(addrs[2]), PKs[2]) - tokens0 := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) - tokens1 := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) - tokens2 := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + tokens0 := app.StakingKeeper.TokensFromConsensusPower(ctx, 200) + tokens1 := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) + tokens2 := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) validators[0], _ = validators[0].AddTokensFromDel(tokens0) validators[1], _ = validators[1].AddTokensFromDel(tokens1) validators[2], _ = validators[2].AddTokensFromDel(tokens2) @@ -642,7 +642,7 @@ func TestValidatorBondHeight(t *testing.T) { assert.True(ValEq(t, validators[1], resValidators[1])) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[1]) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[2]) - delTokens := sdk.TokensFromConsensusPower(50, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 50) validators[1], _ = validators[1].AddTokensFromDel(delTokens) validators[2], _ = validators[2].AddTokensFromDel(delTokens) validators[2] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[2], true) @@ -665,7 +665,7 @@ func TestFullValidatorSetPowerChange(t *testing.T) { var validators [5]types.Validator for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[i], true) } @@ -686,7 +686,7 @@ func TestFullValidatorSetPowerChange(t *testing.T) { // test a swap in voting power - tokens := sdk.TokensFromConsensusPower(600, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 600) validators[0], _ = validators[0].AddTokensFromDel(tokens) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], true) resValidators = app.StakingKeeper.GetBondedValidatorsByPower(ctx) @@ -705,7 +705,7 @@ func TestApplyAndReturnValidatorSetUpdatesAllNone(t *testing.T) { valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) validators[i] = teststaking.NewValidator(t, valAddr, valPubKey) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) } @@ -720,8 +720,8 @@ func TestApplyAndReturnValidatorSetUpdatesAllNone(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - assert.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) - assert.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + assert.Equal(t, validators[0].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[1]) + assert.Equal(t, validators[1].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesIdentical(t *testing.T) { @@ -732,7 +732,7 @@ func TestApplyAndReturnValidatorSetUpdatesIdentical(t *testing.T) { for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) } @@ -755,7 +755,7 @@ func TestApplyAndReturnValidatorSetUpdatesSingleValueChange(t *testing.T) { for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) } @@ -766,11 +766,11 @@ func TestApplyAndReturnValidatorSetUpdatesSingleValueChange(t *testing.T) { // test single value change // tendermintUpdate set: {} -> {c1'} validators[0].Status = types.Bonded - validators[0].Tokens = sdk.TokensFromConsensusPower(600, sdk.DefaultPowerReduction) + validators[0].Tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 600) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) - require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[0].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesMultipleValueChange(t *testing.T) { @@ -784,16 +784,16 @@ func TestApplyAndReturnValidatorSetUpdatesMultipleValueChange(t *testing.T) { // test multiple value change // tendermintUpdate set: {c1, c3} -> {c1', c3'} - delTokens1 := sdk.TokensFromConsensusPower(190, sdk.DefaultPowerReduction) - delTokens2 := sdk.TokensFromConsensusPower(80, sdk.DefaultPowerReduction) + delTokens1 := app.StakingKeeper.TokensFromConsensusPower(ctx, 190) + delTokens2 := app.StakingKeeper.TokensFromConsensusPower(ctx, 80) validators[0], _ = validators[0].AddTokensFromDel(delTokens1) validators[1], _ = validators[1].AddTokensFromDel(delTokens2) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) validators[1] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[1], false) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) - require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) + require.Equal(t, validators[0].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[1]) } func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { @@ -810,7 +810,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[2]) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) - require.Equal(t, validators[2].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[2].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) // test validtor added at the beginning // tendermintUpdate set: {} -> {c0} @@ -818,7 +818,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[3]) updates = applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validators[3], _ = app.StakingKeeper.GetValidator(ctx, validators[3].GetOperator()) - require.Equal(t, validators[3].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[3].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) // test validtor added at the end // tendermintUpdate set: {} -> {c0} @@ -826,7 +826,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[4]) updates = applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) validators[4], _ = app.StakingKeeper.GetValidator(ctx, validators[4].GetOperator()) - require.Equal(t, validators[4].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[4].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { @@ -839,7 +839,7 @@ func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { var validators [5]types.Validator for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) } validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) @@ -855,14 +855,14 @@ func TestApplyAndReturnValidatorSetUpdatesWithCliffValidator(t *testing.T) { // tendermintUpdate set: {} -> {c0, c4} applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) - tokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validators[2], _ = validators[2].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[2]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[2]) updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) require.Equal(t, validators[0].ABCIValidatorUpdateZero(), updates[1]) - require.Equal(t, validators[2].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[2].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) } func TestApplyAndReturnValidatorSetUpdatesPowerDecrease(t *testing.T) { @@ -872,7 +872,7 @@ func TestApplyAndReturnValidatorSetUpdatesPowerDecrease(t *testing.T) { var validators [2]types.Validator for i, power := range powers { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) } validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) @@ -880,26 +880,26 @@ func TestApplyAndReturnValidatorSetUpdatesPowerDecrease(t *testing.T) { applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) // check initial power - require.Equal(t, int64(100), validators[0].GetConsensusPower(sdk.DefaultPowerReduction)) - require.Equal(t, int64(100), validators[1].GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(100), validators[0].GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) + require.Equal(t, int64(100), validators[1].GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // test multiple value change // tendermintUpdate set: {c1, c3} -> {c1', c3'} - delTokens1 := sdk.TokensFromConsensusPower(20, sdk.DefaultPowerReduction) - delTokens2 := sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction) + delTokens1 := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) + delTokens2 := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) validators[0], _ = validators[0].RemoveDelShares(delTokens1.ToDec()) validators[1], _ = validators[1].RemoveDelShares(delTokens2.ToDec()) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) validators[1] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[1], false) // power has changed - require.Equal(t, int64(80), validators[0].GetConsensusPower(sdk.DefaultPowerReduction)) - require.Equal(t, int64(70), validators[1].GetConsensusPower(sdk.DefaultPowerReduction)) + require.Equal(t, int64(80), validators[0].GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) + require.Equal(t, int64(70), validators[1].GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // Tendermint updates should reflect power change updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) - require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) + require.Equal(t, validators[0].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[1]) } func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { @@ -918,7 +918,7 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) validators[i] = teststaking.NewValidator(t, valAddr, valPubKey) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[i]) @@ -929,8 +929,8 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, len(validators)) validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) + require.Equal(t, validators[0].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[1]) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) @@ -938,7 +938,7 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { for i, power := range powers { app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[i]) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[i]) @@ -965,7 +965,7 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { valAddr = sdk.ValAddress(valPubKey.Address().Bytes()) validator = teststaking.NewValidator(t, valAddr, valPubKey) - tokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 500) validator, _ = validator.AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validator) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validator) @@ -975,9 +975,9 @@ func TestApplyAndReturnValidatorSetUpdatesNewValidator(t *testing.T) { validator, _ = app.StakingKeeper.GetValidator(ctx, validator.GetOperator()) validators[0], _ = app.StakingKeeper.GetValidator(ctx, validators[0].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - require.Equal(t, validator.ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) - require.Equal(t, validators[0].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) - require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[2]) + require.Equal(t, validator.ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) + require.Equal(t, validators[0].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[1]) + require.Equal(t, validators[1].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[2]) } func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { @@ -997,7 +997,7 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { valAddr := sdk.ValAddress(valPubKey.Address().Bytes()) validators[i] = newMonikerValidator(t, valAddr, valPubKey, moniker) - tokens := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) validators[i], _ = validators[i].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[i]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[i]) @@ -1007,8 +1007,8 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { updates := applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) validators[2], _ = app.StakingKeeper.GetValidator(ctx, validators[2].GetOperator()) validators[1], _ = app.StakingKeeper.GetValidator(ctx, validators[1].GetOperator()) - require.Equal(t, validators[2].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) - require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[1]) + require.Equal(t, validators[2].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[1]) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) @@ -1020,7 +1020,7 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { require.True(t, found) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[0]) - tokens := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 1) validators[0], _ = validators[0].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[0]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[0]) @@ -1042,14 +1042,14 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validators[1]) - tokens = sdk.TokensFromConsensusPower(250, sdk.DefaultPowerReduction) + tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 250) validators[1], _ = validators[1].AddTokensFromDel(tokens) app.StakingKeeper.SetValidator(ctx, validators[1]) app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[1]) // verify initial Tendermint updates are correct updates = applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) - require.Equal(t, validators[1].ABCIValidatorUpdate(sdk.DefaultPowerReduction), updates[0]) + require.Equal(t, validators[1].ABCIValidatorUpdate(app.StakingKeeper.PowerReduction(ctx)), updates[0]) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 0) } diff --git a/x/staking/legacy/v040/migrate_test.go b/x/staking/legacy/v040/migrate_test.go index 2be5e80dbc31..16bb4374b503 100644 --- a/x/staking/legacy/v040/migrate_test.go +++ b/x/staking/legacy/v040/migrate_test.go @@ -55,6 +55,7 @@ func TestMigrate(t *testing.T) { "historical_entries": 0, "max_entries": 0, "max_validators": 0, + "power_reduction": "1000000", "unbonding_time": "0s" }, "redelegations": [], diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index 35e59b6c2342..a307ce9ad756 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -47,7 +47,7 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, uint32(8687), stakingGenesis.Params.HistoricalEntries) require.Equal(t, "stake", stakingGenesis.Params.BondDenom) require.Equal(t, float64(238280), stakingGenesis.Params.UnbondingTime.Seconds()) - require.Equal(t, sdk.NewInt(1000000), stakingGenesis.Params.PowerReduction) + require.Equal(t, sdk.DefaultPowerReduction, stakingGenesis.Params.PowerReduction) // check numbers of Delegations and Validators require.Len(t, stakingGenesis.Delegations, 3) require.Len(t, stakingGenesis.Validators, 3) diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 6ca1886bf592..2942a6ed626a 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -181,7 +181,7 @@ func TestSimulateMsgUndelegate(t *testing.T) { validator0 := getTestingValidator0(t, app, ctx, accounts) // setup delegation - delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) delegator := accounts[1] delegation := types.NewDelegation(delegator.Address, validator0.GetOperator(), issuedShares) @@ -227,7 +227,7 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { validator0 := getTestingValidator0(t, app, ctx, accounts) validator1 := getTestingValidator1(t, app, ctx, accounts) - delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 2) validator0, issuedShares := validator0.AddTokensFromDel(delTokens) // setup accounts[2] as delegator @@ -276,7 +276,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { func getTestingAccounts(t *testing.T, r *rand.Rand, app *simapp.SimApp, ctx sdk.Context, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) + initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts @@ -309,7 +309,7 @@ func getTestingValidator(t *testing.T, app *simapp.SimApp, ctx sdk.Context, acco require.NoError(t, err) validator.DelegatorShares = sdk.NewDec(100) - validator.Tokens = sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + validator.Tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 100) app.StakingKeeper.SetValidator(ctx, validator) diff --git a/x/staking/teststaking/helper.go b/x/staking/teststaking/helper.go index 607ad56ada4c..25b021df07a1 100644 --- a/x/staking/teststaking/helper.go +++ b/x/staking/teststaking/helper.go @@ -40,7 +40,7 @@ func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, st // CreateValidatorWithValPower calls handler to create a new staking validator with zero // commission func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotypes.PubKey, valPower int64, ok bool) sdk.Int { - amount := sdk.TokensFromConsensusPower(valPower, sdk.DefaultPowerReduction) + amount := sh.k.TokensFromConsensusPower(sh.Ctx, valPower) coin := sdk.NewCoin(sh.Denom, amount) sh.createValidator(addr, pk, coin, ok) return amount @@ -69,7 +69,7 @@ func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount // DelegateWithPower calls handler to delegate stake for a validator func (sh *Helper) DelegateWithPower(delegator sdk.AccAddress, val sdk.ValAddress, power int64) { - coin := sdk.NewCoin(sh.Denom, sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction)) + coin := sdk.NewCoin(sh.Denom, sh.k.TokensFromConsensusPower(sh.Ctx, power)) msg := stakingtypes.NewMsgDelegate(delegator, val, coin) sh.Handle(msg, true) } From 86844b24d9ebb511b3a124527abfa925072d5359 Mon Sep 17 00:00:00 2001 From: psaradev Date: Thu, 28 Jan 2021 23:59:16 +1000 Subject: [PATCH 04/23] comment update --- x/staking/handler_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index aed5ab1b7041..aa9da641b4ba 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -84,7 +84,7 @@ func TestPowerReductionChangeValidatorSetUpdates(t *testing.T) { params.PowerReduction = sdk.DefaultPowerReduction app.StakingKeeper.SetParams(ctx, params) - // power reduction change for all validators + // validator updates for tendermint power updates, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) require.NoError(t, err) require.Equal(t, 2, len(updates)) From 60c6c0a3c0836305da5fe2a2b11299ccb6995f75 Mon Sep 17 00:00:00 2001 From: psaradev Date: Tue, 2 Feb 2021 00:00:45 +1000 Subject: [PATCH 05/23] legacy genesis migration test and feedbacks --- x/bank/keeper/keeper_test.go | 1 + x/evidence/keeper/keeper_test.go | 1 + x/slashing/init_test.go | 1 + x/slashing/keeper/common_test.go | 1 + x/staking/keeper/val_state_change.go | 8 +- x/staking/legacy/v040/commission.go | 17 + x/staking/legacy/v040/delegation.go | 100 + x/staking/legacy/v040/genesis.pb.go | 777 +++++ x/staking/legacy/v040/{types.go => keys.go} | 0 x/staking/legacy/v040/migrate.go | 51 +- x/staking/legacy/v040/migrate_test.go | 1 - x/staking/legacy/v040/params.go | 11 + x/staking/legacy/v040/staking.pb.go | 3293 +++++++++++++++++++ x/staking/legacy/v040/validator.go | 43 + x/staking/legacy/v042/migrate.go | 117 + x/staking/legacy/v042/migrate_test.go | 101 + x/staking/legacy/v042/types.go | 5 + x/staking/types/historical_info.go | 1 - 18 files changed, 4497 insertions(+), 32 deletions(-) create mode 100644 x/staking/legacy/v040/commission.go create mode 100644 x/staking/legacy/v040/delegation.go create mode 100644 x/staking/legacy/v040/genesis.pb.go rename x/staking/legacy/v040/{types.go => keys.go} (100%) create mode 100644 x/staking/legacy/v040/params.go create mode 100644 x/staking/legacy/v040/staking.pb.go create mode 100644 x/staking/legacy/v040/validator.go create mode 100644 x/staking/legacy/v042/migrate.go create mode 100644 x/staking/legacy/v042/migrate_test.go create mode 100644 x/staking/legacy/v042/types.go diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index b86887a9afd0..6ddecb42bc6c 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -35,6 +35,7 @@ var ( multiPermAcc = authtypes.NewEmptyModuleAccount(multiPerm, authtypes.Burner, authtypes.Minter, authtypes.Staking) randomPermAcc = authtypes.NewEmptyModuleAccount(randomPerm, "random") + // The default power validators are initialized to have within tests initTokens = sdk.TokensFromConsensusPower(initialPower, sdk.DefaultPowerReduction) initCoins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initTokens)) ) diff --git a/x/evidence/keeper/keeper_test.go b/x/evidence/keeper/keeper_test.go index 0d518fa61f71..f40b8d2d7b95 100644 --- a/x/evidence/keeper/keeper_test.go +++ b/x/evidence/keeper/keeper_test.go @@ -34,6 +34,7 @@ var ( sdk.ValAddress(pubkeys[2].Address()), } + // The default power validators are initialized to have within tests initAmt = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) ) diff --git a/x/slashing/init_test.go b/x/slashing/init_test.go index fac4f3f32625..a2217cfda7b0 100644 --- a/x/slashing/init_test.go +++ b/x/slashing/init_test.go @@ -5,5 +5,6 @@ import ( ) var ( + // The default power validators are initialized to have within tests InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) ) diff --git a/x/slashing/keeper/common_test.go b/x/slashing/keeper/common_test.go index aed5aa920393..91a972ed1110 100644 --- a/x/slashing/keeper/common_test.go +++ b/x/slashing/keeper/common_test.go @@ -3,5 +3,6 @@ package keeper_test import sdk "github.com/cosmos/cosmos-sdk/types" var ( + // The default power validators are initialized to have within tests InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) ) diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index b8e1c3d4584c..20333d62ff11 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -110,7 +110,9 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { // at the previous block height or were removed from the validator set entirely // are returned to Tendermint. func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []abci.ValidatorUpdate, err error) { - maxValidators := k.GetParams(ctx).MaxValidators + params := k.GetParams(ctx) + maxValidators := params.MaxValidators + powerReduction := params.PowerReduction totalPower := sdk.ZeroInt() amtFromBondedToNotBonded, amtFromNotBondedToBonded := sdk.ZeroInt(), sdk.ZeroInt() @@ -164,12 +166,12 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab copy(valAddrBytes[:], valAddr[:]) oldPowerBytes, found := last[valAddrBytes] - newPower := validator.ConsensusPower(k.PowerReduction(ctx)) + newPower := validator.ConsensusPower(powerReduction) newPowerBytes := k.cdc.MustMarshalBinaryBare(&gogotypes.Int64Value{Value: newPower}) // update the validator set if power has changed if !found || !bytes.Equal(oldPowerBytes, newPowerBytes) { - updates = append(updates, validator.ABCIValidatorUpdate(k.PowerReduction(ctx))) + updates = append(updates, validator.ABCIValidatorUpdate(powerReduction)) k.SetLastValidatorPower(ctx, valAddr, newPower) } diff --git a/x/staking/legacy/v040/commission.go b/x/staking/legacy/v040/commission.go new file mode 100644 index 000000000000..c7d4044a213d --- /dev/null +++ b/x/staking/legacy/v040/commission.go @@ -0,0 +1,17 @@ +package v040 + +import ( + yaml "gopkg.in/yaml.v2" +) + +// String implements the Stringer interface for a Commission object. +func (c Commission) String() string { + out, _ := yaml.Marshal(c) + return string(out) +} + +// String implements the Stringer interface for a CommissionRates object. +func (cr CommissionRates) String() string { + out, _ := yaml.Marshal(cr) + return string(out) +} diff --git a/x/staking/legacy/v040/delegation.go b/x/staking/legacy/v040/delegation.go new file mode 100644 index 000000000000..8c3f99874cee --- /dev/null +++ b/x/staking/legacy/v040/delegation.go @@ -0,0 +1,100 @@ +package v040 + +import ( + "fmt" + "strings" + + yaml "gopkg.in/yaml.v2" +) + +// String returns a human readable string representation of a Delegation. +func (d Delegation) String() string { + out, _ := yaml.Marshal(d) + return string(out) +} + +// Delegations is a collection of delegations +type Delegations []Delegation + +func (d Delegations) String() (out string) { + for _, del := range d { + out += del.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// String implements the stringer interface for a UnbondingDelegationEntry. +func (e UnbondingDelegationEntry) String() string { + out, _ := yaml.Marshal(e) + return string(out) +} + +// String returns a human readable string representation of an UnbondingDelegation. +func (ubd UnbondingDelegation) String() string { + out := fmt.Sprintf(`Unbonding Delegations between: + Delegator: %s + Validator: %s + Entries:`, ubd.DelegatorAddress, ubd.ValidatorAddress) + for i, entry := range ubd.Entries { + out += fmt.Sprintf(` Unbonding Delegation %d: + Creation Height: %v + Min time to unbond (unix): %v + Expected balance: %s`, i, entry.CreationHeight, + entry.CompletionTime, entry.Balance) + } + + return out +} + +// UnbondingDelegations is a collection of UnbondingDelegation +type UnbondingDelegations []UnbondingDelegation + +func (ubds UnbondingDelegations) String() (out string) { + for _, u := range ubds { + out += u.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// String implements the Stringer interface for a RedelegationEntry object. +func (e RedelegationEntry) String() string { + out, _ := yaml.Marshal(e) + return string(out) +} + +// String returns a human readable string representation of a Redelegation. +func (red Redelegation) String() string { + out := fmt.Sprintf(`Redelegations between: + Delegator: %s + Source Validator: %s + Destination Validator: %s + Entries: +`, + red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress, + ) + + for i, entry := range red.Entries { + out += fmt.Sprintf(` Redelegation Entry #%d: + Creation height: %v + Min time to unbond (unix): %v + Dest Shares: %s +`, + i, entry.CreationHeight, entry.CompletionTime, entry.SharesDst, + ) + } + + return strings.TrimRight(out, "\n") +} + +// Redelegations are a collection of Redelegation +type Redelegations []Redelegation + +func (d Redelegations) String() (out string) { + for _, red := range d { + out += red.String() + "\n" + } + + return strings.TrimSpace(out) +} diff --git a/x/staking/legacy/v040/genesis.pb.go b/x/staking/legacy/v040/genesis.pb.go new file mode 100644 index 000000000000..11649dfde948 --- /dev/null +++ b/x/staking/legacy/v040/genesis.pb.go @@ -0,0 +1,777 @@ +package v040 + +import ( + fmt "fmt" + io "io" + math_bits "math/bits" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// GenesisState defines the staking module's genesis state. +type GenesisState struct { + // params defines all the paramaters of related to deposit. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // last_total_power tracks the total amounts of bonded tokens recorded during + // the previous end block. + LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_total_power" yaml:"last_total_power"` + // last_validator_powers is a special index that provides a historical list + // of the last-block's bonded validators. + LastValidatorPowers []LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers" yaml:"last_validator_powers"` + // delegations defines the validator set at genesis. + Validators []Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"` + // delegations defines the delegations active at genesis. + Delegations []Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations"` + // unbonding_delegations defines the unbonding delegations active at genesis. + UnbondingDelegations []UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations" yaml:"unbonding_delegations"` + // redelegations defines the redelegations active at genesis. + Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"` + Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} + +// LastValidatorPower required for validator set update logic. +type LastValidatorPower struct { + // address is the address of the validator. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // power defines the power of the validator. + Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` +} + +func (m *LastValidatorPower) Reset() { *m = LastValidatorPower{} } +func (m *LastValidatorPower) String() string { return proto.CompactTextString(m) } +func (*LastValidatorPower) ProtoMessage() {} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exported { + i-- + if m.Exported { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.Redelegations) > 0 { + for iNdEx := len(m.Redelegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Redelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.UnbondingDelegations) > 0 { + for iNdEx := len(m.UnbondingDelegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.Delegations) > 0 { + for iNdEx := len(m.Delegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Delegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.LastValidatorPowers) > 0 { + for iNdEx := len(m.LastValidatorPowers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LastValidatorPowers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size := m.LastTotalPower.Size() + i -= size + if _, err := m.LastTotalPower.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *LastValidatorPower) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LastValidatorPower) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastValidatorPower) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Power != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Power)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.LastTotalPower.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.LastValidatorPowers) > 0 { + for _, e := range m.LastValidatorPowers { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Validators) > 0 { + for _, e := range m.Validators { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Delegations) > 0 { + for _, e := range m.Delegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.UnbondingDelegations) > 0 { + for _, e := range m.UnbondingDelegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Redelegations) > 0 { + for _, e := range m.Redelegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.Exported { + n += 2 + } + return n +} + +func (m *LastValidatorPower) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Power != 0 { + n += 1 + sovGenesis(uint64(m.Power)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTotalPower", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTotalPower.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastValidatorPowers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastValidatorPowers = append(m.LastValidatorPowers, LastValidatorPower{}) + if err := m.LastValidatorPowers[len(m.LastValidatorPowers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validators = append(m.Validators, Validator{}) + if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Delegations = append(m.Delegations, Delegation{}) + if err := m.Delegations[len(m.Delegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnbondingDelegations = append(m.UnbondingDelegations, UnbondingDelegation{}) + if err := m.UnbondingDelegations[len(m.UnbondingDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Redelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Redelegations = append(m.Redelegations, Redelegation{}) + if err := m.Redelegations[len(m.Redelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exported", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exported = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LastValidatorPower: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastValidatorPower: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + } + m.Power = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Power |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/staking/legacy/v040/types.go b/x/staking/legacy/v040/keys.go similarity index 100% rename from x/staking/legacy/v040/types.go rename to x/staking/legacy/v040/keys.go diff --git a/x/staking/legacy/v040/migrate.go b/x/staking/legacy/v040/migrate.go index 87ec0000efb7..a0d9b4c90378 100644 --- a/x/staking/legacy/v040/migrate.go +++ b/x/staking/legacy/v040/migrate.go @@ -4,22 +4,20 @@ import ( "fmt" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func migrateBondStatus(oldStatus v034staking.BondStatus) v040staking.BondStatus { +func migrateBondStatus(oldStatus v034staking.BondStatus) BondStatus { switch oldStatus { case v034staking.Unbonded: - return v040staking.Unbonded + return Unbonded case v034staking.Unbonding: - return v040staking.Unbonding + return Unbonding case v034staking.Bonded: - return v040staking.Bonded + return Bonded default: panic(fmt.Errorf("invalid bond status %d", oldStatus)) @@ -32,29 +30,29 @@ func migrateBondStatus(oldStatus v034staking.BondStatus) v040staking.BondStatus // - Convert addresses from bytes to bech32 strings. // - Update BondStatus staking constants. // - Re-encode in v0.40 GenesisState. -func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { - newLastValidatorPowers := make([]v040staking.LastValidatorPower, len(stakingState.LastValidatorPowers)) +func Migrate(stakingState v038staking.GenesisState) *GenesisState { + newLastValidatorPowers := make([]LastValidatorPower, len(stakingState.LastValidatorPowers)) for i, oldLastValidatorPower := range stakingState.LastValidatorPowers { - newLastValidatorPowers[i] = v040staking.LastValidatorPower{ + newLastValidatorPowers[i] = LastValidatorPower{ Address: oldLastValidatorPower.Address.String(), Power: oldLastValidatorPower.Power, } } - newValidators := make([]v040staking.Validator, len(stakingState.Validators)) + newValidators := make([]Validator, len(stakingState.Validators)) for i, oldValidator := range stakingState.Validators { pkAny, err := codectypes.NewAnyWithValue(oldValidator.ConsPubKey) if err != nil { panic(fmt.Sprintf("Can't pack validator consensus PK as Any: %s", err)) } - newValidators[i] = v040staking.Validator{ + newValidators[i] = Validator{ OperatorAddress: oldValidator.OperatorAddress.String(), ConsensusPubkey: pkAny, Jailed: oldValidator.Jailed, Status: migrateBondStatus(oldValidator.Status), Tokens: oldValidator.Tokens, DelegatorShares: oldValidator.DelegatorShares, - Description: v040staking.Description{ + Description: Description{ Moniker: oldValidator.Description.Moniker, Identity: oldValidator.Description.Identity, Website: oldValidator.Description.Website, @@ -63,8 +61,8 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { }, UnbondingHeight: oldValidator.UnbondingHeight, UnbondingTime: oldValidator.UnbondingCompletionTime, - Commission: v040staking.Commission{ - CommissionRates: v040staking.CommissionRates{ + Commission: Commission{ + CommissionRates: CommissionRates{ Rate: oldValidator.Commission.Rate, MaxRate: oldValidator.Commission.MaxRate, MaxChangeRate: oldValidator.Commission.MaxChangeRate, @@ -75,20 +73,20 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - newDelegations := make([]v040staking.Delegation, len(stakingState.Delegations)) + newDelegations := make([]Delegation, len(stakingState.Delegations)) for i, oldDelegation := range stakingState.Delegations { - newDelegations[i] = v040staking.Delegation{ + newDelegations[i] = Delegation{ DelegatorAddress: oldDelegation.DelegatorAddress.String(), ValidatorAddress: oldDelegation.ValidatorAddress.String(), Shares: oldDelegation.Shares, } } - newUnbondingDelegations := make([]v040staking.UnbondingDelegation, len(stakingState.UnbondingDelegations)) + newUnbondingDelegations := make([]UnbondingDelegation, len(stakingState.UnbondingDelegations)) for i, oldUnbondingDelegation := range stakingState.UnbondingDelegations { - newEntries := make([]v040staking.UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) + newEntries := make([]UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) for j, oldEntry := range oldUnbondingDelegation.Entries { - newEntries[j] = v040staking.UnbondingDelegationEntry{ + newEntries[j] = UnbondingDelegationEntry{ CreationHeight: oldEntry.CreationHeight, CompletionTime: oldEntry.CompletionTime, InitialBalance: oldEntry.InitialBalance, @@ -96,18 +94,18 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - newUnbondingDelegations[i] = v040staking.UnbondingDelegation{ + newUnbondingDelegations[i] = UnbondingDelegation{ DelegatorAddress: oldUnbondingDelegation.DelegatorAddress.String(), ValidatorAddress: oldUnbondingDelegation.ValidatorAddress.String(), Entries: newEntries, } } - newRedelegations := make([]v040staking.Redelegation, len(stakingState.Redelegations)) + newRedelegations := make([]Redelegation, len(stakingState.Redelegations)) for i, oldRedelegation := range stakingState.Redelegations { - newEntries := make([]v040staking.RedelegationEntry, len(oldRedelegation.Entries)) + newEntries := make([]RedelegationEntry, len(oldRedelegation.Entries)) for j, oldEntry := range oldRedelegation.Entries { - newEntries[j] = v040staking.RedelegationEntry{ + newEntries[j] = RedelegationEntry{ CreationHeight: oldEntry.CreationHeight, CompletionTime: oldEntry.CompletionTime, InitialBalance: oldEntry.InitialBalance, @@ -115,7 +113,7 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - newRedelegations[i] = v040staking.Redelegation{ + newRedelegations[i] = Redelegation{ DelegatorAddress: oldRedelegation.DelegatorAddress.String(), ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress.String(), ValidatorDstAddress: oldRedelegation.ValidatorDstAddress.String(), @@ -123,14 +121,13 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - return &v040staking.GenesisState{ - Params: v040staking.Params{ + return &GenesisState{ + Params: Params{ UnbondingTime: stakingState.Params.UnbondingTime, MaxValidators: uint32(stakingState.Params.MaxValidators), MaxEntries: uint32(stakingState.Params.MaxEntries), HistoricalEntries: uint32(stakingState.Params.HistoricalEntries), BondDenom: stakingState.Params.BondDenom, - PowerReduction: sdk.DefaultPowerReduction, }, LastTotalPower: stakingState.LastTotalPower, LastValidatorPowers: newLastValidatorPowers, diff --git a/x/staking/legacy/v040/migrate_test.go b/x/staking/legacy/v040/migrate_test.go index 16bb4374b503..2be5e80dbc31 100644 --- a/x/staking/legacy/v040/migrate_test.go +++ b/x/staking/legacy/v040/migrate_test.go @@ -55,7 +55,6 @@ func TestMigrate(t *testing.T) { "historical_entries": 0, "max_entries": 0, "max_validators": 0, - "power_reduction": "1000000", "unbonding_time": "0s" }, "redelegations": [], diff --git a/x/staking/legacy/v040/params.go b/x/staking/legacy/v040/params.go new file mode 100644 index 000000000000..32ad0c72ebba --- /dev/null +++ b/x/staking/legacy/v040/params.go @@ -0,0 +1,11 @@ +package v040 + +import ( + yaml "gopkg.in/yaml.v2" +) + +// String returns a human readable string representation of the parameters. +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} diff --git a/x/staking/legacy/v040/staking.pb.go b/x/staking/legacy/v040/staking.pb.go new file mode 100644 index 000000000000..f5bd8fe5e7cd --- /dev/null +++ b/x/staking/legacy/v040/staking.pb.go @@ -0,0 +1,3293 @@ +package v040 + +import ( + fmt "fmt" + io "io" + math_bits "math/bits" + reflect "reflect" + strings "strings" + time "time" + + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types2 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/golang/protobuf/ptypes/timestamp" + _ "github.com/regen-network/cosmos-proto" +) + +// BondStatus is the status of a validator. +type BondStatus int32 + +const ( + // UNSPECIFIED defines an invalid validator status. + Unspecified BondStatus = 0 + // UNBONDED defines a validator that is not bonded. + Unbonded BondStatus = 1 + // UNBONDING defines a validator that is unbonding. + Unbonding BondStatus = 2 + // BONDED defines a validator that is bonded. + Bonded BondStatus = 3 +) + +var BondStatus_name = map[int32]string{ + 0: "BOND_STATUS_UNSPECIFIED", + 1: "BOND_STATUS_UNBONDED", + 2: "BOND_STATUS_UNBONDING", + 3: "BOND_STATUS_BONDED", +} + +var BondStatus_value = map[string]int32{ + "BOND_STATUS_UNSPECIFIED": 0, + "BOND_STATUS_UNBONDED": 1, + "BOND_STATUS_UNBONDING": 2, + "BOND_STATUS_BONDED": 3, +} + +func (x BondStatus) String() string { + return proto.EnumName(BondStatus_name, int32(x)) +} + +// CommissionRates defines the initial commission rates to be used for creating +// a validator. +type CommissionRates struct { + Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` + MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` +} + +func (m *CommissionRates) Reset() { *m = CommissionRates{} } +func (*CommissionRates) ProtoMessage() {} + +// Commission defines commission parameters for a given validator. +type Commission struct { + CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` + UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` +} + +func (m *Commission) Reset() { *m = Commission{} } +func (*Commission) ProtoMessage() {} + +// Description defines a validator description. +type Description struct { + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty" yaml:"security_contact"` + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (m *Description) Reset() { *m = Description{} } +func (*Description) ProtoMessage() {} + +// Validator defines a validator, together with the total amount of the +// Validator's bond shares and their exchange rate to coins. Slashing results in +// a decrease in the exchange rate, allowing correct calculation of future +// undelegations without iterating over delegators. When coins are delegated to +// this validator, the validator is credited with a delegation whose number of +// bond shares is based on the amount of coins delegated divided by the current +// exchange rate. Voting power can be calculated as total bonded shares +// multiplied by exchange rate. +type Validator struct { + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` + ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` + DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` + UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` + UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` + Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` +} + +func (m *Validator) Reset() { *m = Validator{} } +func (*Validator) ProtoMessage() {} + +// ValAddresses defines a repeated set of validator addresses. +type ValAddresses struct { + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` +} + +func (m *ValAddresses) Reset() { *m = ValAddresses{} } +func (*ValAddresses) ProtoMessage() {} + +// Delegation represents the bond with tokens held by an account. It is +// owned by one delegator, and is associated with the voting power of one +// validator. +type Delegation struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` +} + +func (m *Delegation) Reset() { *m = Delegation{} } +func (*Delegation) ProtoMessage() {} + +// UnbondingDelegation stores all of a single delegator's unbonding bonds +// for a single validator in an time-ordered list. +type UnbondingDelegation struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` +} + +func (m *UnbondingDelegation) Reset() { *m = UnbondingDelegation{} } +func (*UnbondingDelegation) ProtoMessage() {} + +// UnbondingDelegationEntry defines an unbonding object with relevant metadata. +type UnbondingDelegationEntry struct { + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` +} + +func (m *UnbondingDelegationEntry) Reset() { *m = UnbondingDelegationEntry{} } +func (*UnbondingDelegationEntry) ProtoMessage() {} + +// RedelegationEntry defines a redelegation object with relevant metadata. +type RedelegationEntry struct { + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` +} + +func (m *RedelegationEntry) Reset() { *m = RedelegationEntry{} } +func (*RedelegationEntry) ProtoMessage() {} + +// Redelegation contains the list of a particular delegator's redelegating bonds +// from a particular source validator to a particular destination validator. +type Redelegation struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` + ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` + Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` +} + +func (m *Redelegation) Reset() { *m = Redelegation{} } +func (*Redelegation) ProtoMessage() {} + +// Params defines the parameters for the staking module. +type Params struct { + UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` + MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` + MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` + HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` + BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} + +// DelegationResponse is equivalent to Delegation except that it contains a +// balance in addition to shares which is more suitable for client responses. +type DelegationResponse struct { + Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` + Balance types2.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` +} + +// Pool is used for tracking bonded and not-bonded token supply of the bond +// denomination. +type Pool struct { + NotBondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` + BondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens" yaml:"bonded_tokens"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (m *Pool) String() string { return proto.CompactTextString(m) } +func (*Pool) ProtoMessage() {} + +func (m *CommissionRates) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommissionRates) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommissionRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MaxChangeRate.Size() + i -= size + if _, err := m.MaxChangeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.MaxRate.Size() + i -= size + if _, err := m.MaxRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Rate.Size() + i -= size + if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Commission) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Commission) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commission) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintStaking(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + { + size, err := m.CommissionRates.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Description) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Description) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x2a + } + if len(m.SecurityContact) > 0 { + i -= len(m.SecurityContact) + copy(dAtA[i:], m.SecurityContact) + i = encodeVarintStaking(dAtA, i, uint64(len(m.SecurityContact))) + i-- + dAtA[i] = 0x22 + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Validator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Validator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinSelfDelegation.Size() + i -= size + if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintStaking(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x4a + if m.UnbondingHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.UnbondingHeight)) + i-- + dAtA[i] = 0x40 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.DelegatorShares.Size() + i -= size + if _, err := m.DelegatorShares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Tokens.Size() + i -= size + if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.Status != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Jailed { + i-- + if m.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.ConsensusPubkey != nil { + { + size, err := m.ConsensusPubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValAddresses) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValAddresses) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Delegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Delegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Shares.Size() + i -= size + if _, err := m.Shares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnbondingDelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnbondingDelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnbondingDelegationEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnbondingDelegationEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingDelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Balance.Size() + i -= size + if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.InitialBalance.Size() + i -= size + if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintStaking(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RedelegationEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RedelegationEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RedelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SharesDst.Size() + i -= size + if _, err := m.SharesDst.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.InitialBalance.Size() + i -= size + if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintStaking(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Redelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Redelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Redelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ValidatorDstAddress) > 0 { + i -= len(m.ValidatorDstAddress) + copy(dAtA[i:], m.ValidatorDstAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorSrcAddress) > 0 { + i -= len(m.ValidatorSrcAddress) + copy(dAtA[i:], m.ValidatorSrcAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i-- + dAtA[i] = 0x32 + if len(m.BondDenom) > 0 { + i -= len(m.BondDenom) + copy(dAtA[i:], m.BondDenom) + i = encodeVarintStaking(dAtA, i, uint64(len(m.BondDenom))) + i-- + dAtA[i] = 0x2a + } + if m.HistoricalEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.HistoricalEntries)) + i-- + dAtA[i] = 0x20 + } + if m.MaxEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxEntries)) + i-- + dAtA[i] = 0x18 + } + if m.MaxValidators != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxValidators)) + i-- + dAtA[i] = 0x10 + } + n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintStaking(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Pool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.BondedTokens.Size() + i -= size + if _, err := m.BondedTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.NotBondedTokens.Size() + i -= size + if _, err := m.NotBondedTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintStaking(dAtA []byte, offset int, v uint64) int { + offset -= sovStaking(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *CommissionRates) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Rate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxRate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxChangeRate.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Commission) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CommissionRates.Size() + n += 1 + l + sovStaking(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime) + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Description) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.SecurityContact) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *Validator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if m.ConsensusPubkey != nil { + l = m.ConsensusPubkey.Size() + n += 1 + l + sovStaking(uint64(l)) + } + if m.Jailed { + n += 2 + } + if m.Status != 0 { + n += 1 + sovStaking(uint64(m.Status)) + } + l = m.Tokens.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.DelegatorShares.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Description.Size() + n += 1 + l + sovStaking(uint64(l)) + if m.UnbondingHeight != 0 { + n += 1 + sovStaking(uint64(m.UnbondingHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.Commission.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MinSelfDelegation.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *ValAddresses) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Delegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = m.Shares.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *UnbondingDelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *UnbondingDelegationEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovStaking(uint64(m.CreationHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.InitialBalance.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *RedelegationEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovStaking(uint64(m.CreationHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.InitialBalance.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.SharesDst.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Redelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorSrcAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorDstAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + if m.MaxValidators != 0 { + n += 1 + sovStaking(uint64(m.MaxValidators)) + } + if m.MaxEntries != 0 { + n += 1 + sovStaking(uint64(m.MaxEntries)) + } + if m.HistoricalEntries != 0 { + n += 1 + sovStaking(uint64(m.HistoricalEntries)) + } + l = len(m.BondDenom) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.NotBondedTokens.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.BondedTokens.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func sovStaking(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStaking(x uint64) (n int) { + return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ValAddresses) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValAddresses{`, + `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `}`, + }, "") + return s +} +func valueToStringStaking(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func (m *CommissionRates) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommissionRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommissionRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxChangeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxChangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Commission) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Commission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommissionRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommissionRates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Description) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Description: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecurityContact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Validator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Validator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusPubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusPubkey == nil { + m.ConsensusPubkey = &types1.Any{} + } + if err := m.ConsensusPubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= BondStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorShares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DelegatorShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingHeight", wireType) + } + m.UnbondingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValAddresses) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValAddresses: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValAddresses: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *Delegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Delegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Delegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Shares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnbondingDelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnbondingDelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, UnbondingDelegationEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnbondingDelegationEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnbondingDelegationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingDelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RedelegationEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RedelegationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RedelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SharesDst", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SharesDst.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Redelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Redelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Redelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, RedelegationEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) + } + m.MaxValidators = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxValidators |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) + } + m.MaxEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) + } + m.HistoricalEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistoricalEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BondDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NotBondedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NotBondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStaking(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthStaking + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStaking + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthStaking + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthStaking = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStaking = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStaking = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/staking/legacy/v040/validator.go b/x/staking/legacy/v040/validator.go new file mode 100644 index 000000000000..e68b3b6dd913 --- /dev/null +++ b/x/staking/legacy/v040/validator.go @@ -0,0 +1,43 @@ +package v040 + +import ( + "strings" + + "gopkg.in/yaml.v2" +) + +var ( + BondStatusUnspecified = BondStatus_name[int32(Unspecified)] + BondStatusUnbonded = BondStatus_name[int32(Unbonded)] + BondStatusUnbonding = BondStatus_name[int32(Unbonding)] + BondStatusBonded = BondStatus_name[int32(Bonded)] +) + +// String implements the Stringer interface for a Validator object. +func (v Validator) String() string { + out, _ := yaml.Marshal(v) + return string(out) +} + +// Validators is a collection of Validator +type Validators []Validator + +func (v Validators) String() (out string) { + for _, val := range v { + out += val.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// ValidatorsByVotingPower implements sort.Interface for []Validator based on +// the VotingPower and Address fields. +// The validators are sorted first by their voting power (descending). Secondary index - Address (ascending). +// Copied from tendermint/types/validator_set.go +type ValidatorsByVotingPower []Validator + +// String implements the Stringer interface for a Description object. +func (d Description) String() string { + out, _ := yaml.Marshal(d) + return string(out) +} diff --git a/x/staking/legacy/v042/migrate.go b/x/staking/legacy/v042/migrate.go new file mode 100644 index 000000000000..8e3a0eacc1cb --- /dev/null +++ b/x/staking/legacy/v042/migrate.go @@ -0,0 +1,117 @@ +package v042 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" + v042staking "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// Migrate accepts exported v0.40 x/staking genesis state and migrates it to +// v0.42 x/staking genesis state. The migration includes: +// +// - Adding power reduction on-chain param +func Migrate(stakingState v040staking.GenesisState) *v042staking.GenesisState { + newLastValidatorPowers := make([]v042staking.LastValidatorPower, len(stakingState.LastValidatorPowers)) + for i, oldLastValidatorPower := range stakingState.LastValidatorPowers { + newLastValidatorPowers[i] = v042staking.LastValidatorPower{ + Address: oldLastValidatorPower.Address, + Power: oldLastValidatorPower.Power, + } + } + + newValidators := make([]v042staking.Validator, len(stakingState.Validators)) + for i, oldValidator := range stakingState.Validators { + newValidators[i] = v042staking.Validator{ + OperatorAddress: oldValidator.OperatorAddress, + ConsensusPubkey: oldValidator.ConsensusPubkey, + Jailed: oldValidator.Jailed, + Status: v042staking.BondStatus(oldValidator.Status), + Tokens: oldValidator.Tokens, + DelegatorShares: oldValidator.DelegatorShares, + Description: v042staking.Description{ + Moniker: oldValidator.Description.Moniker, + Identity: oldValidator.Description.Identity, + Website: oldValidator.Description.Website, + SecurityContact: oldValidator.Description.SecurityContact, + Details: oldValidator.Description.Details, + }, + UnbondingHeight: oldValidator.UnbondingHeight, + UnbondingTime: oldValidator.UnbondingTime, + Commission: v042staking.Commission{ + CommissionRates: v042staking.CommissionRates{ + Rate: oldValidator.Commission.Rate, + MaxRate: oldValidator.Commission.MaxRate, + MaxChangeRate: oldValidator.Commission.MaxChangeRate, + }, + UpdateTime: oldValidator.Commission.UpdateTime, + }, + MinSelfDelegation: oldValidator.MinSelfDelegation, + } + } + + newDelegations := make([]v042staking.Delegation, len(stakingState.Delegations)) + for i, oldDelegation := range stakingState.Delegations { + newDelegations[i] = v042staking.Delegation{ + DelegatorAddress: oldDelegation.DelegatorAddress, + ValidatorAddress: oldDelegation.ValidatorAddress, + Shares: oldDelegation.Shares, + } + } + + newUnbondingDelegations := make([]v042staking.UnbondingDelegation, len(stakingState.UnbondingDelegations)) + for i, oldUnbondingDelegation := range stakingState.UnbondingDelegations { + newEntries := make([]v042staking.UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) + for j, oldEntry := range oldUnbondingDelegation.Entries { + newEntries[j] = v042staking.UnbondingDelegationEntry{ + CreationHeight: oldEntry.CreationHeight, + CompletionTime: oldEntry.CompletionTime, + InitialBalance: oldEntry.InitialBalance, + Balance: oldEntry.Balance, + } + } + + newUnbondingDelegations[i] = v042staking.UnbondingDelegation{ + DelegatorAddress: oldUnbondingDelegation.DelegatorAddress, + ValidatorAddress: oldUnbondingDelegation.ValidatorAddress, + Entries: newEntries, + } + } + + newRedelegations := make([]v042staking.Redelegation, len(stakingState.Redelegations)) + for i, oldRedelegation := range stakingState.Redelegations { + newEntries := make([]v042staking.RedelegationEntry, len(oldRedelegation.Entries)) + for j, oldEntry := range oldRedelegation.Entries { + newEntries[j] = v042staking.RedelegationEntry{ + CreationHeight: oldEntry.CreationHeight, + CompletionTime: oldEntry.CompletionTime, + InitialBalance: oldEntry.InitialBalance, + SharesDst: oldEntry.SharesDst, + } + } + + newRedelegations[i] = v042staking.Redelegation{ + DelegatorAddress: oldRedelegation.DelegatorAddress, + ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress, + ValidatorDstAddress: oldRedelegation.ValidatorDstAddress, + Entries: newEntries, + } + } + + return &v042staking.GenesisState{ + Params: v042staking.Params{ + UnbondingTime: stakingState.Params.UnbondingTime, + MaxValidators: stakingState.Params.MaxValidators, + MaxEntries: stakingState.Params.MaxEntries, + HistoricalEntries: stakingState.Params.HistoricalEntries, + BondDenom: stakingState.Params.BondDenom, + PowerReduction: sdk.DefaultPowerReduction, + }, + LastTotalPower: stakingState.LastTotalPower, + LastValidatorPowers: newLastValidatorPowers, + Validators: newValidators, + Delegations: newDelegations, + UnbondingDelegations: newUnbondingDelegations, + Redelegations: newRedelegations, + Exported: stakingState.Exported, + } +} diff --git a/x/staking/legacy/v042/migrate_test.go b/x/staking/legacy/v042/migrate_test.go new file mode 100644 index 000000000000..8bd00fd4db07 --- /dev/null +++ b/x/staking/legacy/v042/migrate_test.go @@ -0,0 +1,101 @@ +package v042_test + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/simapp" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" + v042staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v042" +) + +func TestMigrate(t *testing.T) { + encodingConfig := simapp.MakeTestEncodingConfig() + clientCtx := client.Context{}. + WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithLegacyAmino(encodingConfig.Amino). + WithJSONMarshaler(encodingConfig.Marshaler) + + consPubKey := ed25519.GenPrivKeyFromSecret([]byte("val0")).PubKey() + pkAny, err := codectypes.NewAnyWithValue(consPubKey) + if err != nil { + panic(fmt.Sprintf("Can't pack validator consensus PK as Any: %s", err)) + } + stakingGenState := v040staking.GenesisState{ + Validators: v040staking.Validators{v040staking.Validator{ + ConsensusPubkey: pkAny, + Status: v040staking.Unbonded, + }}, + } + + migrated := v042staking.Migrate(stakingGenState) + bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) + require.NoError(t, err) + + // Indent the JSON bz correctly. + var jsonObj map[string]interface{} + err = json.Unmarshal(bz, &jsonObj) + require.NoError(t, err) + indentedBz, err := json.MarshalIndent(jsonObj, "", " ") + require.NoError(t, err) + + // Make sure about: + // - consensus_pubkey: should be an any + // - validator's status should be 1 (new unbonded) + expected := `{ + "delegations": [], + "exported": false, + "last_total_power": "0", + "last_validator_powers": [], + "params": { + "bond_denom": "", + "historical_entries": 0, + "max_entries": 0, + "max_validators": 0, + "power_reduction": "1000000", + "unbonding_time": "0s" + }, + "redelegations": [], + "unbonding_delegations": [], + "validators": [ + { + "commission": { + "commission_rates": { + "max_change_rate": "0", + "max_rate": "0", + "rate": "0" + }, + "update_time": "0001-01-01T00:00:00Z" + }, + "consensus_pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "KTeVrjP7NJIufvgMJsQRxZjfFyD+Exda6O7x+oxIvmA=" + }, + "delegator_shares": "0", + "description": { + "details": "", + "identity": "", + "moniker": "", + "security_contact": "", + "website": "" + }, + "jailed": false, + "min_self_delegation": "0", + "operator_address": "", + "status": "BOND_STATUS_UNBONDED", + "tokens": "0", + "unbonding_height": "0", + "unbonding_time": "0001-01-01T00:00:00Z" + } + ] +}` + + require.Equal(t, expected, string(indentedBz)) +} diff --git a/x/staking/legacy/v042/types.go b/x/staking/legacy/v042/types.go new file mode 100644 index 000000000000..0a7df2a327d0 --- /dev/null +++ b/x/staking/legacy/v042/types.go @@ -0,0 +1,5 @@ +package v042 + +const ( + ModuleName = "staking" +) diff --git a/x/staking/types/historical_info.go b/x/staking/types/historical_info.go index c06e82dc0261..5a278a7e541d 100644 --- a/x/staking/types/historical_info.go +++ b/x/staking/types/historical_info.go @@ -16,7 +16,6 @@ import ( // it will first sort valset before inclusion into historical info func NewHistoricalInfo(header tmproto.Header, valSet Validators, powerReduction sdk.Int) HistoricalInfo { // Must sort in the same way that tendermint does - // TODO: check with sort.Sort(ValidatorsByVotingPower(valSet)) sort.SliceStable(valSet, func(i, j int) bool { return ValidatorsByVotingPower(valSet).LessAfterPowerReductionApply(i, j, powerReduction) }) From 7b5cf61eef0cc370f1fc6ff46008f14c86863a7c Mon Sep 17 00:00:00 2001 From: psaradev Date: Tue, 2 Feb 2021 00:11:33 +1000 Subject: [PATCH 06/23] remove dependency between min deposit tokens and power reduction --- x/gov/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gov/types/params.go b/x/gov/types/params.go index 45ed3ec522dc..95621e100f8e 100644 --- a/x/gov/types/params.go +++ b/x/gov/types/params.go @@ -17,7 +17,7 @@ const ( // Default governance params var ( - DefaultMinDepositTokens = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + DefaultMinDepositTokens = sdk.NewInt(10000000) DefaultQuorum = sdk.NewDecWithPrec(334, 3) DefaultThreshold = sdk.NewDecWithPrec(5, 1) DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3) From 1c1e67fa51103c5da7f3258550867b0c1eaa92c0 Mon Sep 17 00:00:00 2001 From: psaradev Date: Tue, 2 Feb 2021 13:12:05 +1000 Subject: [PATCH 07/23] Less function to not use default power reduction --- x/staking/keeper/historical_info_test.go | 22 ++++++++++++++++++---- x/staking/types/historical_info.go | 2 +- x/staking/types/validator.go | 6 +----- x/staking/types/validator_test.go | 4 +++- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index 727fe58959af..db6c6a6b47af 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "sort" "testing" "github.com/stretchr/testify/require" @@ -13,6 +12,17 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) +// IsValSetSorted reports whether valset is sorted. +func IsValSetSorted(data []types.Validator, powerReduction sdk.Int) bool { + n := len(data) + for i := n - 1; i > 0; i-- { + if types.ValidatorsByVotingPower(data).Less(i, i-1, powerReduction) { + return false + } + } + return true +} + func TestHistoricalInfo(t *testing.T) { _, app, ctx := createTestInput() @@ -31,7 +41,7 @@ func TestHistoricalInfo(t *testing.T) { recv, found := app.StakingKeeper.GetHistoricalInfo(ctx, 2) require.True(t, found, "HistoricalInfo not found after set") require.Equal(t, hi, recv, "HistoricalInfo not equal") - require.True(t, sort.IsSorted(types.ValidatorsByVotingPower(recv.Valset)), "HistoricalInfo validators is not sorted") + require.True(t, IsValSetSorted(recv.Valset, app.StakingKeeper.PowerReduction(ctx)), "HistoricalInfo validators is not sorted") app.StakingKeeper.DeleteHistoricalInfo(ctx, 2) @@ -78,14 +88,18 @@ func TestTrackHistoricalInfo(t *testing.T) { // Set bonded validators in keeper val1 := teststaking.NewValidator(t, addrVals[2], PKs[2]) + val1.Status = types.Bonded // when not bonded, consensus power is Zero + val1.Tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 10) app.StakingKeeper.SetValidator(ctx, val1) app.StakingKeeper.SetLastValidatorPower(ctx, val1.GetOperator(), 10) val2 := teststaking.NewValidator(t, addrVals[3], PKs[3]) + val1.Status = types.Bonded + val2.Tokens = app.StakingKeeper.TokensFromConsensusPower(ctx, 80) app.StakingKeeper.SetValidator(ctx, val2) app.StakingKeeper.SetLastValidatorPower(ctx, val2.GetOperator(), 80) vals := []types.Validator{val1, val2} - sort.Sort(types.ValidatorsByVotingPower(vals)) + IsValSetSorted(vals, app.StakingKeeper.PowerReduction(ctx)) // Set Header for BeginBlock context header := tmproto.Header{ @@ -103,7 +117,7 @@ func TestTrackHistoricalInfo(t *testing.T) { } recv, found = app.StakingKeeper.GetHistoricalInfo(ctx, 10) require.True(t, found, "GetHistoricalInfo failed after BeginBlock") - require.Equal(t, expected, recv, "GetHistoricalInfo returned eunexpected result") + require.Equal(t, expected, recv, "GetHistoricalInfo returned unexpected result") // Check HistoricalInfo at height 5, 4 is pruned recv, found = app.StakingKeeper.GetHistoricalInfo(ctx, 4) diff --git a/x/staking/types/historical_info.go b/x/staking/types/historical_info.go index 5a278a7e541d..6e474bb0c673 100644 --- a/x/staking/types/historical_info.go +++ b/x/staking/types/historical_info.go @@ -17,7 +17,7 @@ import ( func NewHistoricalInfo(header tmproto.Header, valSet Validators, powerReduction sdk.Int) HistoricalInfo { // Must sort in the same way that tendermint does sort.SliceStable(valSet, func(i, j int) bool { - return ValidatorsByVotingPower(valSet).LessAfterPowerReductionApply(i, j, powerReduction) + return ValidatorsByVotingPower(valSet).Less(i, j, powerReduction) }) return HistoricalInfo{ diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 5cf55db5d636..d8b113bbc56e 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -116,11 +116,7 @@ type ValidatorsByVotingPower []Validator func (valz ValidatorsByVotingPower) Len() int { return len(valz) } -func (valz ValidatorsByVotingPower) Less(i, j int) bool { - return valz.LessAfterPowerReductionApply(i, j, sdk.DefaultPowerReduction) -} - -func (valz ValidatorsByVotingPower) LessAfterPowerReductionApply(i, j int, powerReduction sdk.Int) bool { +func (valz ValidatorsByVotingPower) Less(i, j int, powerReduction sdk.Int) bool { if valz[i].ConsensusPower(powerReduction) == valz[j].ConsensusPower(powerReduction) { addrI, errI := valz[i].GetConsAddr() addrJ, errJ := valz[j].GetConsAddr() diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index f7888b7e425f..8601fbeec723 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -295,7 +295,9 @@ func TestValidatorsSortTendermint(t *testing.T) { sort.Sort(tmtypes.ValidatorsByVotingPower(expectedVals)) // sort in SDK and then convert to tendermint - sort.Sort(types.ValidatorsByVotingPower(valz)) + sort.SliceStable(valz, func(i, j int) bool { + return types.ValidatorsByVotingPower(valz).Less(i, j, sdk.DefaultPowerReduction) + }) actualVals, err := teststaking.ToTmValidators(valz, sdk.DefaultPowerReduction) require.NoError(t, err) From 5acdc07df4e143cfe1ca55c413eebcfb333c72e1 Mon Sep 17 00:00:00 2001 From: psaradev Date: Wed, 3 Feb 2021 19:59:37 +1000 Subject: [PATCH 08/23] reduce power reduction var name --- x/staking/teststaking/tm.go | 8 ++++---- x/staking/types/validator.go | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/x/staking/teststaking/tm.go b/x/staking/teststaking/tm.go index 4c0863f593cd..e927c0e0387a 100644 --- a/x/staking/teststaking/tm.go +++ b/x/staking/teststaking/tm.go @@ -20,21 +20,21 @@ func GetTmConsPubKey(v types.Validator) (tmcrypto.PubKey, error) { } // ToTmValidator casts an SDK validator to a tendermint type Validator. -func ToTmValidator(v types.Validator, powerReduction sdk.Int) (*tmtypes.Validator, error) { +func ToTmValidator(v types.Validator, r sdk.Int) (*tmtypes.Validator, error) { tmPk, err := GetTmConsPubKey(v) if err != nil { return nil, err } - return tmtypes.NewValidator(tmPk, v.ConsensusPower(powerReduction)), nil + return tmtypes.NewValidator(tmPk, v.ConsensusPower(r)), nil } // ToTmValidators casts all validators to the corresponding tendermint type. -func ToTmValidators(v types.Validators, powerReduction sdk.Int) ([]*tmtypes.Validator, error) { +func ToTmValidators(v types.Validators, r sdk.Int) ([]*tmtypes.Validator, error) { validators := make([]*tmtypes.Validator, len(v)) var err error for i, val := range v { - validators[i], err = ToTmValidator(val, powerReduction) + validators[i], err = ToTmValidator(val, r) if err != nil { return nil, err } diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index d8b113bbc56e..1bed8192cc52 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -116,8 +116,8 @@ type ValidatorsByVotingPower []Validator func (valz ValidatorsByVotingPower) Len() int { return len(valz) } -func (valz ValidatorsByVotingPower) Less(i, j int, powerReduction sdk.Int) bool { - if valz[i].ConsensusPower(powerReduction) == valz[j].ConsensusPower(powerReduction) { +func (valz ValidatorsByVotingPower) Less(i, j int, r sdk.Int) bool { + if valz[i].ConsensusPower(r) == valz[j].ConsensusPower(r) { addrI, errI := valz[i].GetConsAddr() addrJ, errJ := valz[j].GetConsAddr() // If either returns error, then return false @@ -126,7 +126,7 @@ func (valz ValidatorsByVotingPower) Less(i, j int, powerReduction sdk.Int) bool } return bytes.Compare(addrI, addrJ) == -1 } - return valz[i].ConsensusPower(powerReduction) > valz[j].ConsensusPower(powerReduction) + return valz[i].ConsensusPower(r) > valz[j].ConsensusPower(r) } func (valz ValidatorsByVotingPower) Swap(i, j int) { @@ -257,7 +257,7 @@ func (d Description) EnsureLength() (Description, error) { // ABCIValidatorUpdate returns an abci.ValidatorUpdate from a staking validator type // with the full validator power -func (v Validator) ABCIValidatorUpdate(powerReduction sdk.Int) abci.ValidatorUpdate { +func (v Validator) ABCIValidatorUpdate(r sdk.Int) abci.ValidatorUpdate { tmProtoPk, err := v.TmConsPublicKey() if err != nil { panic(err) @@ -265,7 +265,7 @@ func (v Validator) ABCIValidatorUpdate(powerReduction sdk.Int) abci.ValidatorUpd return abci.ValidatorUpdate{ PubKey: tmProtoPk, - Power: v.ConsensusPower(powerReduction), + Power: v.ConsensusPower(r), } } @@ -349,17 +349,17 @@ func (v Validator) BondedTokens() sdk.Int { // ConsensusPower gets the consensus-engine power. Aa reduction of 10^6 from // validator tokens is applied -func (v Validator) ConsensusPower(powerReduction sdk.Int) int64 { +func (v Validator) ConsensusPower(r sdk.Int) int64 { if v.IsBonded() { - return v.PotentialConsensusPower(powerReduction) + return v.PotentialConsensusPower(r) } return 0 } // PotentialConsensusPower returns the potential consensus-engine power. -func (v Validator) PotentialConsensusPower(powerReduction sdk.Int) int64 { - return sdk.TokensToConsensusPower(v.Tokens, powerReduction) +func (v Validator) PotentialConsensusPower(r sdk.Int) int64 { + return sdk.TokensToConsensusPower(v.Tokens, r) } // UpdateStatus updates the location of the shares within a validator @@ -507,8 +507,8 @@ func (v Validator) GetConsAddr() (sdk.ConsAddress, error) { func (v Validator) GetTokens() sdk.Int { return v.Tokens } func (v Validator) GetBondedTokens() sdk.Int { return v.BondedTokens() } -func (v Validator) GetConsensusPower(powerReduction sdk.Int) int64 { - return v.ConsensusPower(powerReduction) +func (v Validator) GetConsensusPower(r sdk.Int) int64 { + return v.ConsensusPower(r) } func (v Validator) GetCommission() sdk.Dec { return v.Commission.Rate } func (v Validator) GetMinSelfDelegation() sdk.Int { return v.MinSelfDelegation } From 2ce6d4bcba5aa59e17d356fab3a99fbee2d240ee Mon Sep 17 00:00:00 2001 From: psaradev Date: Wed, 3 Feb 2021 20:14:37 +1000 Subject: [PATCH 09/23] increase gas limit for redelegation only --- client/flags/flags.go | 2 +- x/staking/client/testutil/test_helpers.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/flags/flags.go b/client/flags/flags.go index bf861dbf0d60..282a61c4c9fb 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -15,7 +15,7 @@ const ( // failures due to state changes that might occur between the tx simulation // and the actual run. DefaultGasAdjustment = 1.0 - DefaultGasLimit = 300000 + DefaultGasLimit = 200000 GasFlagAuto = "auto" // DefaultKeyringBackend diff --git a/x/staking/client/testutil/test_helpers.go b/x/staking/client/testutil/test_helpers.go index 1a2a4b84bcbf..e3e822703bb8 100644 --- a/x/staking/client/testutil/test_helpers.go +++ b/x/staking/client/testutil/test_helpers.go @@ -26,6 +26,7 @@ func MsgRedelegateExec(clientCtx client.Context, from, src, dst, amount fmt.Stri dst.String(), amount.String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, from.String()), + fmt.Sprintf("--%s=%d", flags.FlagGas, 300000), } args = append(args, commonArgs...) From cc4ef50d2a37531e9c65ae0462bb4fe9bf8d7742 Mon Sep 17 00:00:00 2001 From: psaradev Date: Wed, 3 Feb 2021 22:36:29 +1000 Subject: [PATCH 10/23] Merge cosmos-sdk master --- .github/workflows/docker.yml | 1 + .github/workflows/proto-docker.yml | 1 + .github/workflows/test.yml | 20 + CHANGELOG.md | 12 + Makefile | 2 +- client/cmd.go | 13 + client/cmd_test.go | 3 +- client/context.go | 8 + client/flags/flags.go | 2 + client/grpc/tmservice/block.go | 4 +- client/grpc/tmservice/service.go | 18 +- client/grpc/tmservice/status.go | 4 +- client/keys/migrate.go | 26 +- client/keys/parse.go | 3 +- client/keys/testdata/keys/keys.db/000002.ldb | Bin 391 -> 0 bytes client/keys/testdata/keys/keys.db/CURRENT | 2 +- client/keys/testdata/keys/keys.db/CURRENT.bak | 2 +- client/keys/testdata/keys/keys.db/LOG | 48 +- .../testdata/keys/keys.db/MANIFEST-000004 | Bin 237 -> 0 bytes .../testdata/keys/keys.db/MANIFEST-000005 | Bin 0 -> 41 bytes client/query.go | 5 + client/rpc/validators.go | 10 +- client/tx/tx.go | 1 + client/tx_config.go | 1 + contrib/rosetta/configuration/bootstrap.json | 4 +- contrib/rosetta/configuration/data.sh | 5 +- contrib/rosetta/configuration/staking.ros | 4 +- contrib/rosetta/node/data.tar.gz | Bin 34626 -> 36558 bytes crypto/armor_test.go | 2 + crypto/keyring/keyring.go | 1 + crypto/keys/internal/benchmarking/bench.go | 1 + crypto/keys/secp256k1/bench_test.go | 3 + docs/building-modules/beginblock-endblock.md | 2 +- docs/building-modules/module-manager.md | 5 +- docs/core/cli.md | 18 + docs/core/proto-docs.md | 424 +++- docs/run-node/interact-node.md | 8 +- docs/run-node/run-node.md | 4 +- docs/run-node/txs.md | 2 +- proto/cosmos/feegrant/v1beta1/feegrant.proto | 81 + proto/cosmos/feegrant/v1beta1/genesis.proto | 12 + proto/cosmos/feegrant/v1beta1/query.proto | 52 + proto/cosmos/feegrant/v1beta1/tx.proto | 40 + proto/cosmos/staking/v1beta1/staking.proto | 45 + server/tm_cmds.go | 6 +- server/util.go | 35 + simapp/app.go | 17 +- simapp/export.go | 2 +- simapp/params/weights.go | 4 + simapp/sim_bench_test.go | 2 + snapshots/helpers_test.go | 6 +- snapshots/store.go | 6 +- snapshots/store_test.go | 6 +- store/cache/benchmark_test.go | 1 + store/cachekv/store_bench_test.go | 1 + store/cachekv/store_test.go | 2 + store/iavl/store_test.go | 1 + store/rootmulti/store.go | 4 +- store/rootmulti/store_test.go | 2 + types/address.go | 14 +- types/address/store_key.go | 33 + types/address/store_key_test.go | 38 + types/address_bench_test.go | 2 + types/address_test.go | 40 +- types/coin_benchmark_test.go | 4 +- types/decimal_test.go | 1 + types/query/filtered_pagination_test.go | 5 +- types/query/pagination_test.go | 3 +- x/auth/client/cli/query.go | 5 +- x/auth/keeper/keeper_bench_test.go | 1 + x/auth/legacy/legacytx/stdtx_builder.go | 3 + x/authz/types/keys.go | 19 +- x/bank/bench_test.go | 1 + x/bank/client/cli/query.go | 13 +- x/bank/client/testutil/cli_helpers.go | 3 +- x/bank/keeper/grpc_query.go | 4 +- x/bank/keeper/send.go | 9 +- x/bank/keeper/view.go | 15 +- x/bank/types/key.go | 18 +- x/bank/types/key_test.go | 5 +- x/bank/types/metadata.go | 39 +- x/bank/types/metadata_test.go | 55 +- x/bank/types/msgs_test.go | 21 +- x/distribution/client/cli/query.go | 16 +- x/distribution/client/cli/tx.go | 3 +- x/distribution/types/keys.go | 143 +- x/evidence/types/evidence.go | 3 +- x/evidence/types/evidence_test.go | 20 + x/feegrant/ante/ante.go | 35 + x/feegrant/ante/fee.go | 82 + x/feegrant/ante/fee_test.go | 287 +++ x/feegrant/client/cli/cli_test.go | 621 ++++++ x/feegrant/client/cli/query.go | 129 ++ x/feegrant/client/cli/tx.go | 211 ++ x/feegrant/client/rest/grpc_query_test.go | 209 ++ x/feegrant/doc.go | 29 + x/feegrant/genesis.go | 61 + x/feegrant/genesis_test.go | 56 + x/feegrant/keeper/grpc_query.go | 94 + x/feegrant/keeper/keeper.go | 190 ++ x/feegrant/keeper/keeper_test.go | 257 +++ x/feegrant/keeper/msg_server.go | 72 + x/feegrant/module.go | 210 ++ x/feegrant/simulation/decoder.go | 26 + x/feegrant/simulation/decoder_test.go | 62 + x/feegrant/simulation/genesis.go | 38 + x/feegrant/simulation/genesis_test.go | 39 + x/feegrant/simulation/operations.go | 200 ++ x/feegrant/simulation/operations_test.go | 173 ++ x/feegrant/types/basic_fee.go | 61 + x/feegrant/types/basic_fee_test.go | 140 ++ x/feegrant/types/codec.go | 24 + x/feegrant/types/errors.go | 21 + x/feegrant/types/events.go | 13 + x/feegrant/types/expected_keepers.go | 23 + x/feegrant/types/expiration.go | 138 ++ x/feegrant/types/expiration_test.go | 161 ++ x/feegrant/types/feegrant.pb.go | 1701 +++++++++++++++++ x/feegrant/types/fees.go | 32 + x/feegrant/types/genesis.go | 40 + x/feegrant/types/genesis.pb.go | 333 ++++ x/feegrant/types/grant.go | 92 + x/feegrant/types/grant_test.go | 99 + x/feegrant/types/key.go | 36 + x/feegrant/types/msgs.go | 101 + x/feegrant/types/periodic_fee.go | 120 ++ x/feegrant/types/periodic_fee_test.go | 205 ++ x/feegrant/types/query.pb.go | 1172 ++++++++++++ x/feegrant/types/query.pb.gw.go | 322 ++++ x/feegrant/types/tx.pb.go | 1033 ++++++++++ x/gov/client/cli/query.go | 39 +- x/gov/types/keys.go | 17 +- x/gov/types/keys_test.go | 10 - .../applications/transfer/client/cli/query.go | 7 +- x/ibc/applications/transfer/module.go | 6 +- x/ibc/core/02-client/client/cli/query.go | 7 +- x/ibc/core/02-client/types/client.go | 2 +- x/ibc/core/03-connection/client/cli/query.go | 3 +- x/ibc/core/04-channel/client/cli/query.go | 11 +- x/ibc/core/04-channel/keeper/packet.go | 12 + x/ibc/core/04-channel/types/events.go | 1 + x/mint/client/cli/query.go | 7 +- x/mint/simulation/decoder.go | 2 +- x/mint/types/minter_test.go | 3 + x/params/client/cli/query.go | 4 +- x/slashing/client/cli/query.go | 7 +- x/slashing/types/keys.go | 23 +- x/staking/client/cli/query.go | 27 +- x/staking/keeper/val_state_change.go | 63 +- x/staking/keeper/validator.go | 2 +- x/staking/spec/01_state.md | 147 +- x/staking/spec/02_state_transitions.md | 25 +- x/staking/spec/03_messages.md | 101 +- x/staking/spec/07_events.md | 16 +- x/staking/spec/README.md | 18 +- x/staking/types/keys.go | 155 +- x/staking/types/keys_test.go | 20 +- x/staking/types/staking.pb.go | 105 +- x/upgrade/client/cli/query.go | 9 +- 159 files changed, 10603 insertions(+), 724 deletions(-) delete mode 100644 client/keys/testdata/keys/keys.db/000002.ldb delete mode 100644 client/keys/testdata/keys/keys.db/MANIFEST-000004 create mode 100644 client/keys/testdata/keys/keys.db/MANIFEST-000005 create mode 100644 proto/cosmos/feegrant/v1beta1/feegrant.proto create mode 100644 proto/cosmos/feegrant/v1beta1/genesis.proto create mode 100644 proto/cosmos/feegrant/v1beta1/query.proto create mode 100644 proto/cosmos/feegrant/v1beta1/tx.proto create mode 100644 types/address/store_key.go create mode 100644 types/address/store_key_test.go create mode 100644 x/feegrant/ante/ante.go create mode 100644 x/feegrant/ante/fee.go create mode 100644 x/feegrant/ante/fee_test.go create mode 100644 x/feegrant/client/cli/cli_test.go create mode 100644 x/feegrant/client/cli/query.go create mode 100644 x/feegrant/client/cli/tx.go create mode 100644 x/feegrant/client/rest/grpc_query_test.go create mode 100644 x/feegrant/doc.go create mode 100644 x/feegrant/genesis.go create mode 100644 x/feegrant/genesis_test.go create mode 100644 x/feegrant/keeper/grpc_query.go create mode 100644 x/feegrant/keeper/keeper.go create mode 100644 x/feegrant/keeper/keeper_test.go create mode 100644 x/feegrant/keeper/msg_server.go create mode 100644 x/feegrant/module.go create mode 100644 x/feegrant/simulation/decoder.go create mode 100644 x/feegrant/simulation/decoder_test.go create mode 100644 x/feegrant/simulation/genesis.go create mode 100644 x/feegrant/simulation/genesis_test.go create mode 100644 x/feegrant/simulation/operations.go create mode 100644 x/feegrant/simulation/operations_test.go create mode 100644 x/feegrant/types/basic_fee.go create mode 100644 x/feegrant/types/basic_fee_test.go create mode 100644 x/feegrant/types/codec.go create mode 100644 x/feegrant/types/errors.go create mode 100644 x/feegrant/types/events.go create mode 100644 x/feegrant/types/expected_keepers.go create mode 100644 x/feegrant/types/expiration.go create mode 100644 x/feegrant/types/expiration_test.go create mode 100644 x/feegrant/types/feegrant.pb.go create mode 100644 x/feegrant/types/fees.go create mode 100644 x/feegrant/types/genesis.go create mode 100644 x/feegrant/types/genesis.pb.go create mode 100644 x/feegrant/types/grant.go create mode 100644 x/feegrant/types/grant_test.go create mode 100644 x/feegrant/types/key.go create mode 100644 x/feegrant/types/msgs.go create mode 100644 x/feegrant/types/periodic_fee.go create mode 100644 x/feegrant/types/periodic_fee_test.go create mode 100644 x/feegrant/types/query.pb.go create mode 100644 x/feegrant/types/query.pb.gw.go create mode 100644 x/feegrant/types/tx.pb.go diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9456ebf30255..6116e6d92107 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -42,6 +42,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub + if: ${{ github.event_name != 'pull_request' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml index b127de0a5874..7a9aecfb25ee 100644 --- a/.github/workflows/proto-docker.yml +++ b/.github/workflows/proto-docker.yml @@ -31,6 +31,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub + if: ${{ github.event_name != 'pull_request' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUBTM_USERNAME }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8f051e60cb7..dd09041862d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,26 @@ jobs: path: ~/go/bin key: ${{ runner.os }}-go-tparse-binary + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-arch: ["amd64", "arm", "arm64"] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.1.3 + with: + go-version: 1.15 + - uses: technote-space/get-diff-action@v4 + id: git_diff + with: + PATTERNS: | + **/**.go + go.mod + go.sum + - name: Build + run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build + test-cosmovisor: runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 75f7adb0b421..73b4ff3ecd3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,20 +36,32 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Client Breaking Changes + +* [\#8363](https://github.com/cosmos/cosmos-sdk/issues/8363) Addresses no longer have a fixed 20-byte length. From the SDK modules' point of view, any 1-255 bytes-long byte array is a valid address. + ### State Machine Breaking +* (x/{bank,distrib,gov,slashing,staking}) [\#8363](https://github.com/cosmos/cosmos-sdk/issues/8363) Store keys have been modified to allow for variable-length addresses. * (x/ibc) [\#8266](https://github.com/cosmos/cosmos-sdk/issues/8266) Add amino JSON for IBC messages in order to support Ledger text signing. ### Improvements +* (x/ibc) [\#8458](https://github.com/cosmos/cosmos-sdk/pull/8458) Add `packet_connection` attribute to ibc events to enable relayer filtering +* (x/bank) [\#8479](https://github.com/cosmos/cosmos-sdk/pull/8479) Adittional client denom metadata validation for `base` and `display` denoms. * (x/ibc) [\#8404](https://github.com/cosmos/cosmos-sdk/pull/8404) Reorder IBC `ChanOpenAck` and `ChanOpenConfirm` handler execution to perform core handler first, followed by application callbacks. +* [\#8396](https://github.com/cosmos/cosmos-sdk/pull/8396) Add support for ARM platform ### Bug Fixes +* (x/evidence) [#8461](https://github.com/cosmos/cosmos-sdk/pull/8461) Fix bech32 prefix in evidence validator address conversion * (x/slashing) [\#8427](https://github.com/cosmos/cosmos-sdk/pull/8427) Fix query signing infos command * (simapp) [\#8418](https://github.com/cosmos/cosmos-sdk/pull/8418) Add balance coin to supply when adding a new genesis account * (x/bank) [\#8417](https://github.com/cosmos/cosmos-sdk/pull/8417) Validate balances and coin denom metadata on genesis * (server) [\#8399](https://github.com/cosmos/cosmos-sdk/pull/8399) fix gRPC-web flag default value +* (client/keys) [\#8436](https://github.com/cosmos/cosmos-sdk/pull/8436) Fix key migration issue +* (server) [\#8481](https://github.com/cosmos/cosmos-sdk/pull/8481) Don't create + files when running `{appd} tendermint show-*` subcommands ## [v0.40.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.1) - 2021-01-19 diff --git a/Makefile b/Makefile index 0f4cf9e80fb2..f49f95e73449 100644 --- a/Makefile +++ b/Makefile @@ -479,4 +479,4 @@ rosetta-data: docker run --name data_dir_build -t rosetta-ci:latest sh /rosetta/data.sh docker cp data_dir_build:/tmp/data.tar.gz "$(CURDIR)/contrib/rosetta/node/data.tar.gz" docker container rm data_dir_build -.PHONY: rosetta-data \ No newline at end of file +.PHONY: rosetta-data diff --git a/client/cmd.go b/client/cmd.go index eccf59c3515c..437022695d47 100644 --- a/client/cmd.go +++ b/client/cmd.go @@ -221,6 +221,19 @@ func readTxCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Context, err clientCtx = clientCtx.WithSignModeStr(signModeStr) } + if clientCtx.FeeGranter == nil || flagSet.Changed(flags.FlagFeeAccount) { + granter, _ := flagSet.GetString(flags.FlagFeeAccount) + + if granter != "" { + granterAcc, err := sdk.AccAddressFromBech32(granter) + if err != nil { + return clientCtx, err + } + + clientCtx = clientCtx.WithFeeGranterAddress(granterAcc) + } + } + if clientCtx.From == "" || flagSet.Changed(flags.FlagFrom) { from, _ := flagSet.GetString(flags.FlagFrom) fromAddr, fromName, keyType, err := GetFromFields(clientCtx.Keyring, from, clientCtx.GenerateOnly) diff --git a/client/cmd_test.go b/client/cmd_test.go index 02e2c414f63a..65161fe4752b 100644 --- a/client/cmd_test.go +++ b/client/cmd_test.go @@ -97,8 +97,7 @@ func TestSetCmdClientContextHandler(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { - ctx := context.Background() - ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{}) + ctx := context.WithValue(context.Background(), client.ClientContextKey, &client.Context{}) cmd := newCmd() _ = testutil.ApplyMockIODiscardOutErr(cmd) diff --git a/client/context.go b/client/context.go index 0e3d1181af6e..f7f555339c2c 100644 --- a/client/context.go +++ b/client/context.go @@ -44,6 +44,7 @@ type Context struct { TxConfig TxConfig AccountRetriever AccountRetriever NodeURI string + FeeGranter sdk.AccAddress // TODO: Deprecated (remove). LegacyAmino *codec.LegacyAmino @@ -166,6 +167,13 @@ func (ctx Context) WithFromAddress(addr sdk.AccAddress) Context { return ctx } +// WithFeeGranterAddress returns a copy of the context with an updated fee granter account +// address. +func (ctx Context) WithFeeGranterAddress(addr sdk.AccAddress) Context { + ctx.FeeGranter = addr + return ctx +} + // WithBroadcastMode returns a copy of the context with an updated broadcast // mode. func (ctx Context) WithBroadcastMode(mode string) Context { diff --git a/client/flags/flags.go b/client/flags/flags.go index 282a61c4c9fb..1afb55b46733 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -70,6 +70,7 @@ const ( FlagCountTotal = "count-total" FlagTimeoutHeight = "timeout-height" FlagKeyAlgorithm = "algo" + FlagFeeAccount = "fee-account" // Tendermint logging flags FlagLogLevel = "log_level" @@ -112,6 +113,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().String(FlagKeyringBackend, DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)") cmd.Flags().String(FlagSignMode, "", "Choose sign mode (direct|amino-json), this is an advanced feature") cmd.Flags().Uint64(FlagTimeoutHeight, 0, "Set a block timeout height to prevent the tx from being committed past a certain height") + cmd.Flags().String(FlagFeeAccount, "", "Fee account pays fees for the transaction instead of deducting from the signer") // --gas can accept integers and "auto" cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically (default %d)", GasFlagAuto, DefaultGasLimit)) diff --git a/client/grpc/tmservice/block.go b/client/grpc/tmservice/block.go index e92fbec72bd2..554156982dda 100644 --- a/client/grpc/tmservice/block.go +++ b/client/grpc/tmservice/block.go @@ -8,12 +8,12 @@ import ( "github.com/cosmos/cosmos-sdk/client" ) -func getBlock(clientCtx client.Context, height *int64) (*ctypes.ResultBlock, error) { +func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*ctypes.ResultBlock, error) { // get the node node, err := clientCtx.GetNode() if err != nil { return nil, err } - return node.Block(context.Background(), height) + return node.Block(ctx, height) } diff --git a/client/grpc/tmservice/service.go b/client/grpc/tmservice/service.go index 58d44af579cc..b621dff570c2 100644 --- a/client/grpc/tmservice/service.go +++ b/client/grpc/tmservice/service.go @@ -34,8 +34,8 @@ func NewQueryServer(clientCtx client.Context, interfaceRegistry codectypes.Inter } // GetSyncing implements ServiceServer.GetSyncing -func (s queryServer) GetSyncing(_ context.Context, _ *GetSyncingRequest) (*GetSyncingResponse, error) { - status, err := getNodeStatus(s.clientCtx) +func (s queryServer) GetSyncing(ctx context.Context, _ *GetSyncingRequest) (*GetSyncingResponse, error) { + status, err := getNodeStatus(ctx, s.clientCtx) if err != nil { return nil, err } @@ -45,8 +45,8 @@ func (s queryServer) GetSyncing(_ context.Context, _ *GetSyncingRequest) (*GetSy } // GetLatestBlock implements ServiceServer.GetLatestBlock -func (s queryServer) GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) { - status, err := getBlock(s.clientCtx, nil) +func (s queryServer) GetLatestBlock(ctx context.Context, _ *GetLatestBlockRequest) (*GetLatestBlockResponse, error) { + status, err := getBlock(ctx, s.clientCtx, nil) if err != nil { return nil, err } @@ -64,7 +64,7 @@ func (s queryServer) GetLatestBlock(context.Context, *GetLatestBlockRequest) (*G } // GetBlockByHeight implements ServiceServer.GetBlockByHeight -func (s queryServer) GetBlockByHeight(_ context.Context, req *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { +func (s queryServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { chainHeight, err := rpc.GetChainHeight(s.clientCtx) if err != nil { return nil, err @@ -74,7 +74,7 @@ func (s queryServer) GetBlockByHeight(_ context.Context, req *GetBlockByHeightRe return nil, status.Error(codes.InvalidArgument, "requested block height is bigger then the chain length") } - res, err := getBlock(s.clientCtx, &req.Height) + res, err := getBlock(ctx, s.clientCtx, &req.Height) if err != nil { return nil, err } @@ -96,7 +96,7 @@ func (s queryServer) GetLatestValidatorSet(ctx context.Context, req *GetLatestVa return nil, err } - validatorsRes, err := rpc.GetValidators(s.clientCtx, nil, &page, &limit) + validatorsRes, err := rpc.GetValidators(ctx, s.clientCtx, nil, &page, &limit) if err != nil { return nil, err } @@ -147,7 +147,7 @@ func (s queryServer) GetValidatorSetByHeight(ctx context.Context, req *GetValida return nil, status.Error(codes.InvalidArgument, "requested block height is bigger then the chain length") } - validatorsRes, err := rpc.GetValidators(s.clientCtx, &req.Height, &page, &limit) + validatorsRes, err := rpc.GetValidators(ctx, s.clientCtx, &req.Height, &page, &limit) if err != nil { return nil, err @@ -175,7 +175,7 @@ func (s queryServer) GetValidatorSetByHeight(ctx context.Context, req *GetValida // GetNodeInfo implements ServiceServer.GetNodeInfo func (s queryServer) GetNodeInfo(ctx context.Context, req *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { - status, err := getNodeStatus(s.clientCtx) + status, err := getNodeStatus(ctx, s.clientCtx) if err != nil { return nil, err } diff --git a/client/grpc/tmservice/status.go b/client/grpc/tmservice/status.go index f1a8da8e8362..9e9c3d200943 100644 --- a/client/grpc/tmservice/status.go +++ b/client/grpc/tmservice/status.go @@ -8,10 +8,10 @@ import ( "github.com/cosmos/cosmos-sdk/client" ) -func getNodeStatus(clientCtx client.Context) (*ctypes.ResultStatus, error) { +func getNodeStatus(ctx context.Context, clientCtx client.Context) (*ctypes.ResultStatus, error) { node, err := clientCtx.GetNode() if err != nil { return &ctypes.ResultStatus{}, err } - return node.Status(context.Background()) + return node.Status(ctx) } diff --git a/client/keys/migrate.go b/client/keys/migrate.go index d80bbe163097..836a2655b087 100644 --- a/client/keys/migrate.go +++ b/client/keys/migrate.go @@ -62,7 +62,7 @@ func runMigrateCmd(cmd *cobra.Command, args []string) error { var ( tmpDir string - migrator keyring.InfoImporter + migrator keyring.Importer ) if dryRun, _ := cmd.Flags().GetBool(flags.FlagDryRun); dryRun { @@ -73,10 +73,10 @@ func runMigrateCmd(cmd *cobra.Command, args []string) error { defer os.RemoveAll(tmpDir) - migrator, err = keyring.NewInfoImporter(keyringServiceName, "test", tmpDir, buf) + migrator, err = keyring.New(keyringServiceName, keyring.BackendTest, tmpDir, buf) } else { backend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend) - migrator, err = keyring.NewInfoImporter(keyringServiceName, backend, rootDir, buf) + migrator, err = keyring.New(keyringServiceName, backend, rootDir, buf) } if err != nil { @@ -86,12 +86,12 @@ func runMigrateCmd(cmd *cobra.Command, args []string) error { )) } - for _, key := range oldKeys { - legKeyInfo, err := legacyKb.Export(key.GetName()) - if err != nil { - return err - } + if len(oldKeys) == 0 { + cmd.Print("Migration Aborted: no keys to migrate") + return nil + } + for _, key := range oldKeys { keyName := key.GetName() keyType := key.GetType() @@ -107,7 +107,12 @@ func runMigrateCmd(cmd *cobra.Command, args []string) error { } if keyType != keyring.TypeLocal { - if err := migrator.Import(keyName, legKeyInfo); err != nil { + pubkeyArmor, err := legacyKb.ExportPubKey(keyName) + if err != nil { + return err + } + + if err := migrator.ImportPubKey(keyName, pubkeyArmor); err != nil { return err } @@ -127,10 +132,11 @@ func runMigrateCmd(cmd *cobra.Command, args []string) error { return err } - if err := migrator.Import(keyName, armoredPriv); err != nil { + if err := migrator.ImportPrivKey(keyName, armoredPriv, migratePassphrase); err != nil { return err } } + cmd.Print("Migration Complete") return err } diff --git a/client/keys/parse.go b/client/keys/parse.go index 2af792c03c8e..b1169d68cc0e 100644 --- a/client/keys/parse.go +++ b/client/keys/parse.go @@ -1,7 +1,6 @@ package keys import ( - "context" "encoding/hex" "errors" "fmt" @@ -86,7 +85,7 @@ hexadecimal into bech32 cosmos prefixed format and vice versa. } func parseKey(cmd *cobra.Command, args []string) error { - config, _ := sdk.GetSealedConfig(context.Background()) + config, _ := sdk.GetSealedConfig(cmd.Context()) return doParseKey(cmd, config, args) } diff --git a/client/keys/testdata/keys/keys.db/000002.ldb b/client/keys/testdata/keys/keys.db/000002.ldb deleted file mode 100644 index b36586df3626e4a01631c987005dd5b167ff1da2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 391 zcmey$^r4Z#RxCNcI5)r8Fr~Dl+#<2KsJx`KtSZ&C+#n^bq%tF`u)-ugH7~cY)V$I% zr?5&dF(suawYZp(g#iqTO7lVsQW8s2opV#-y;CcV^fL3(^4ZPAathMRi}EtE%8be? z%1q6&N-NC^O3Kqxat-nfiYqI#QcBBG%aVb{ar!ebvHCgrGpHDX^)kqL7g=R6a7wZ; zGIE+rc**mTQf0Uyr1m=MWxFC%+6+;l*L&_w+s))UMK~hzht#w>p1XUJc$A%Z zPwESPNR;9%PE9T_GBwLK6yWnVVl8E1WG;$fU@+p1Im5hYq0HxtQ@kC!+?#3MRPJ a`@iD$YnizAFo}VL@PqK*4c#iG?zaJJVsO>~ diff --git a/client/keys/testdata/keys/keys.db/CURRENT b/client/keys/testdata/keys/keys.db/CURRENT index cacca7574c03..aa5bb8ea5090 100644 --- a/client/keys/testdata/keys/keys.db/CURRENT +++ b/client/keys/testdata/keys/keys.db/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000005 diff --git a/client/keys/testdata/keys/keys.db/CURRENT.bak b/client/keys/testdata/keys/keys.db/CURRENT.bak index feda7d6b2481..4fb1dad19e03 100644 --- a/client/keys/testdata/keys/keys.db/CURRENT.bak +++ b/client/keys/testdata/keys/keys.db/CURRENT.bak @@ -1 +1 @@ -MANIFEST-000000 +MANIFEST-000003 diff --git a/client/keys/testdata/keys/keys.db/LOG b/client/keys/testdata/keys/keys.db/LOG index 386101e4fb91..e37648b855bb 100644 --- a/client/keys/testdata/keys/keys.db/LOG +++ b/client/keys/testdata/keys/keys.db/LOG @@ -1,18 +1,30 @@ -=============== Mar 30, 2020 (CEST) =============== -02:07:34.137606 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -02:07:34.144547 db@open opening -02:07:34.144770 version@stat F·[] S·0B[] Sc·[] -02:07:34.145843 db@janitor F·2 G·0 -02:07:34.145875 db@open done T·1.315251ms -02:07:34.335635 db@close closing -02:07:34.335736 db@close done T·98.95µs -=============== Mar 30, 2020 (CEST) =============== -02:08:33.239115 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -02:08:33.239264 version@stat F·[] S·0B[] Sc·[] -02:08:33.239281 db@open opening -02:08:33.239310 journal@recovery F·1 -02:08:33.239398 journal@recovery recovering @1 -02:08:33.322008 memdb@flush created L0@2 N·4 S·391B "cos..ess,v4":"run..nfo,v3" -02:08:33.323091 version@stat F·[1] S·391B[391B] Sc·[0.25] -02:08:33.421979 db@janitor F·3 G·0 -02:08:33.422153 db@open done T·182.707962ms +=============== Feb 2, 2021 (IST) =============== +00:03:25.348369 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +00:03:25.350695 db@open opening +00:03:25.350888 version@stat F·[] S·0B[] Sc·[] +00:03:25.351864 db@janitor F·2 G·0 +00:03:25.351881 db@open done T·1.169825ms +00:03:25.351895 db@close closing +00:03:25.351929 db@close done T·33.042µs +=============== Feb 2, 2021 (IST) =============== +00:03:34.450638 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +00:03:34.450722 version@stat F·[] S·0B[] Sc·[] +00:03:34.450737 db@open opening +00:03:34.450765 journal@recovery F·1 +00:03:34.450851 journal@recovery recovering @1 +00:03:34.451173 version@stat F·[] S·0B[] Sc·[] +00:03:34.454278 db@janitor F·2 G·0 +00:03:34.454298 db@open done T·3.548046ms +00:03:34.454307 db@close closing +00:03:34.454327 db@close done T·19.017µs +=============== Feb 2, 2021 (IST) =============== +00:03:42.025705 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +00:03:42.025892 version@stat F·[] S·0B[] Sc·[] +00:03:42.025907 db@open opening +00:03:42.025943 journal@recovery F·1 +00:03:42.026790 journal@recovery recovering @2 +00:03:42.026946 version@stat F·[] S·0B[] Sc·[] +00:03:42.031645 db@janitor F·2 G·0 +00:03:42.031661 db@open done T·5.750008ms +00:03:42.283102 db@close closing +00:03:42.283162 db@close done T·58.775µs diff --git a/client/keys/testdata/keys/keys.db/MANIFEST-000004 b/client/keys/testdata/keys/keys.db/MANIFEST-000004 deleted file mode 100644 index 557b4bdbbc93fd41441cfe30d1ca16f08f47f344..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 237 zcmeykNagJ_21Z7yoYb<^oRlOzr^=Gl^338?=ltA)#G=HK{30f1W>ywfb_S+)X4~Za z;@tdV!<5pJa*M>`qVkf`vZ_?ma)Xq#lFE#%!U~i0)V$onQu9j7oWd%-#FUhx)Z$`B l76veoD=N(kEl5c$Np;RmiT6&eG}6n=OUq|uhDg)i1^~DrOBnzF diff --git a/client/keys/testdata/keys/keys.db/MANIFEST-000005 b/client/keys/testdata/keys/keys.db/MANIFEST-000005 new file mode 100644 index 0000000000000000000000000000000000000000..a9e8a261c7882e802f65360dc49782db7df6fb77 GIT binary patch literal 41 wcmYcef4W17fss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zle#2nT>@304?eb82|tP literal 0 HcmV?d00001 diff --git a/client/query.go b/client/query.go index 18a5c3c2f4ee..bb65d9bf3833 100644 --- a/client/query.go +++ b/client/query.go @@ -57,6 +57,11 @@ func (ctx Context) GetFromAddress() sdk.AccAddress { return ctx.FromAddress } +// GetFeeGranterAddress returns the fee granter address from the context +func (ctx Context) GetFeeGranterAddress() sdk.AccAddress { + return ctx.FeeGranter +} + // GetFromName returns the key name for the current context. func (ctx Context) GetFromName() string { return ctx.FromName diff --git a/client/rpc/validators.go b/client/rpc/validators.go index 66c594966ed7..175e7ff91ee6 100644 --- a/client/rpc/validators.go +++ b/client/rpc/validators.go @@ -50,7 +50,7 @@ func ValidatorCommand() *cobra.Command { page, _ := cmd.Flags().GetInt(flags.FlagPage) limit, _ := cmd.Flags().GetInt(flags.FlagLimit) - result, err := GetValidators(clientCtx, height, &page, &limit) + result, err := GetValidators(cmd.Context(), clientCtx, height, &page, &limit) if err != nil { return err } @@ -117,14 +117,14 @@ func validatorOutput(validator *tmtypes.Validator) (ValidatorOutput, error) { } // GetValidators from client -func GetValidators(clientCtx client.Context, height *int64, page, limit *int) (ResultValidatorsOutput, error) { +func GetValidators(ctx context.Context, clientCtx client.Context, height *int64, page, limit *int) (ResultValidatorsOutput, error) { // get the node node, err := clientCtx.GetNode() if err != nil { return ResultValidatorsOutput{}, err } - validatorsRes, err := node.Validators(context.Background(), height, page, limit) + validatorsRes, err := node.Validators(ctx, height, page, limit) if err != nil { return ResultValidatorsOutput{}, err } @@ -172,7 +172,7 @@ func ValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { return } - output, err := GetValidators(clientCtx, &height, &page, &limit) + output, err := GetValidators(r.Context(), clientCtx, &height, &page, &limit) if rest.CheckInternalServerError(w, err) { return } @@ -189,7 +189,7 @@ func LatestValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFu return } - output, err := GetValidators(clientCtx, nil, &page, &limit) + output, err := GetValidators(r.Context(), clientCtx, nil, &page, &limit) if rest.CheckInternalServerError(w, err) { return } diff --git a/client/tx/tx.go b/client/tx/tx.go index 594293732bc8..62e3e9098eea 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -117,6 +117,7 @@ func BroadcastTx(clientCtx client.Context, txf Factory, msgs ...sdk.Msg) error { } } + tx.SetFeeGranter(clientCtx.GetFeeGranterAddress()) err = Sign(txf, clientCtx.GetFromName(), tx, true) if err != nil { return err diff --git a/client/tx_config.go b/client/tx_config.go index 6992a7a2402d..8220e917b2bb 100644 --- a/client/tx_config.go +++ b/client/tx_config.go @@ -42,5 +42,6 @@ type ( SetFeeAmount(amount sdk.Coins) SetGasLimit(limit uint64) SetTimeoutHeight(height uint64) + SetFeeGranter(feeGranter sdk.AccAddress) } ) diff --git a/contrib/rosetta/configuration/bootstrap.json b/contrib/rosetta/configuration/bootstrap.json index 15b75b550862..1793988f37e5 100644 --- a/contrib/rosetta/configuration/bootstrap.json +++ b/contrib/rosetta/configuration/bootstrap.json @@ -1,12 +1,12 @@ [ { "account_identifier": { - "address":"cosmos1hdmjfmqmf8ck4pv4evu0s3up0ucm0yjjqfl87e" + "address":"cosmos158nkd0l9tyemv2crp579rmj8dg37qty8lzff88" }, "currency":{ "symbol":"stake", "decimals":0 }, - "value": "999900000000" + "value": "999990000000" } ] \ No newline at end of file diff --git a/contrib/rosetta/configuration/data.sh b/contrib/rosetta/configuration/data.sh index dc4f2cb59a86..45297d5a21bf 100644 --- a/contrib/rosetta/configuration/data.sh +++ b/contrib/rosetta/configuration/data.sh @@ -16,12 +16,13 @@ simd init simd --chain-id testing simd keys add fd --keyring-backend=test addr=$(simd keys show fd -a --keyring-backend=test) +val_addr=$(simd keys show fd --keyring-backend=test --bech val -a) # give the accounts some money simd add-genesis-account "$addr" 1000000000000stake --keyring-backend=test # save configs for the daemon -simd gentx fd --chain-id testing --keyring-backend=test +simd gentx fd 10000000stake --chain-id testing --keyring-backend=test # input genTx to the genesis file simd collect-gentxs @@ -55,4 +56,4 @@ echo zipping data dir and saving to /tmp/data.tar.gz tar -czvf /tmp/data.tar.gz /root/.simapp -echo new address for bootstrap.json "$addr" +echo new address for bootstrap.json "$addr" "$val_addr" diff --git a/contrib/rosetta/configuration/staking.ros b/contrib/rosetta/configuration/staking.ros index 1d9de1d180fa..4f89a43b9893 100644 --- a/contrib/rosetta/configuration/staking.ros +++ b/contrib/rosetta/configuration/staking.ros @@ -94,7 +94,7 @@ staking(1){ "account": { "address": "staking_account", "sub_account": { - "address" : "cosmosvaloper1hdmjfmqmf8ck4pv4evu0s3up0ucm0yjj9atjj2" + "address" : "cosmosvaloper158nkd0l9tyemv2crp579rmj8dg37qty86kaut5" } }, "amount":{ @@ -134,7 +134,7 @@ staking(1){ "account": { "address": "staking_account", "sub_account": { - "address" : "cosmosvaloper1hdmjfmqmf8ck4pv4evu0s3up0ucm0yjj9atjj2" + "address" : "cosmosvaloper158nkd0l9tyemv2crp579rmj8dg37qty86kaut5" } }, "amount":{ diff --git a/contrib/rosetta/node/data.tar.gz b/contrib/rosetta/node/data.tar.gz index a7bed60579ea098baa390af3a29e05b08d16dcc8..ad285ac62e75198c4945859e12ccf7b563c7c29b 100644 GIT binary patch literal 36558 zcmV)BK*PTuiwFP!000001MFN2coS8=@1%u>ft4Crw_9Y5kyV5?op+M1d=i7UZd*E1=-xipuAeRdn6U+lxho6)TH+T@_`$An0`!6jr#pey)ow zdb#J!OwyzYNr6)3Gw1uD$vOWy|Nr?vf9FhQWJyv>?TQd!L!r`~OVcpW92lnk#ghMO zpK%JqD1sqzg2=&e0%MpQD}9ONNoZk3Wo4^1M+S;WN0({*GHr6a{W(@;FM$)Bm;Gtb zkCU(~YyWO&$@T~OP`&93jDHf?pQ7<>{C7)BV}H#sxLuU|7s&(8!%);Y z>`xLjNcM^GPeXUHVqLPr4DCm5|KW%JcpqXx5aTQSi=ci!$SZ;}Lh>HFexA+v=2nFO zZ!5DA7=f2ycnRUC#mO=pE29WIK{*L0P0X|v+q`wG5OfP1pj3H96@q@yDFg*oU`2Nw zFZks7%_P$M){hT7~_1ixDp0s_>j zBic2WcY7s8b%%IalUoxT3_@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RGxdmu8}sh2x@@fGT4oC%u215IW+@2=wPkfl6wGL8 zvnJ})1Qu<#`t^KQPKyN+FWZQvN(;MQM19EwC7X5iq}50(oI0BF&H9q%gQ_A@q!$7} zpgijPvD9{Txc|FO#h<#-8N_&)|AQF*_w#?&7fb)&hR)vqg-l{RuUSwV|Mzsg&2TJ0 zu0JmYrk6?#wH`xdoS*upfd-rJQ`B|5&|%chUBBP-1c|Ak!g`F&@WozCU}2hiyC~_{v7{SPWlHE036-dUkGf=y^t%YDuhRj*wv6&ZBtpw*W zuL5du1b7rQ8&>O+{-|By*AF-LGEX}|D~X1By-uzyI-WBFf-+lHL&|v`oUKNAO%AF{ zY;M$ycsaJKJ$5C4(0D#9h88_kgdmFDB`j1?!eM9N3}!6_u8X!sPFWr#Xa>~gRS5|L zpf(brkOpchhvk8WFtJD&128Cru-Qij{Lr=xz8CeCfR)2O5hp{2w6NBgwlLHOM_h)@ z+?);MF*G(jk{McyqBje)aF%u9zQ{zw!jM){Tb>#Y?V>U_T>LKBYLqjjQ^WFNq>vcK8e3dG;3_E6ZaZ0H#4m%!T(ljN)tg58sBimHrAn20 O?DZF9r!))zMgjoC3=_)$ diff --git a/crypto/armor_test.go b/crypto/armor_test.go index abbc7870aaee..70854f6dcb41 100644 --- a/crypto/armor_test.go +++ b/crypto/armor_test.go @@ -158,6 +158,8 @@ func TestUnarmorInfoBytesErrors(t *testing.T) { } func BenchmarkBcryptGenerateFromPassword(b *testing.B) { + b.ReportAllocs() + passphrase := []byte("passphrase") for securityParam := 9; securityParam < 16; securityParam++ { param := securityParam diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index f88ffdc37010..164e6bfc19d5 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -108,6 +108,7 @@ type Signer interface { type Importer interface { // ImportPrivKey imports ASCII armored passphrase-encrypted private keys. ImportPrivKey(uid, armor, passphrase string) error + // ImportPubKey imports ASCII armored public keys. ImportPubKey(uid string, armor string) error } diff --git a/crypto/keys/internal/benchmarking/bench.go b/crypto/keys/internal/benchmarking/bench.go index a789da91f9c9..a55936d5c3c8 100644 --- a/crypto/keys/internal/benchmarking/bench.go +++ b/crypto/keys/internal/benchmarking/bench.go @@ -25,6 +25,7 @@ func (zeroReader) Read(buf []byte) (int, error) { // BenchmarkKeyGeneration benchmarks the given key generation algorithm using // a dummy reader. func BenchmarkKeyGeneration(b *testing.B, generateKey func(reader io.Reader) types.PrivKey) { + b.ReportAllocs() var zero zeroReader for i := 0; i < b.N; i++ { generateKey(zero) diff --git a/crypto/keys/secp256k1/bench_test.go b/crypto/keys/secp256k1/bench_test.go index 423f7a5a52de..a9f694de7552 100644 --- a/crypto/keys/secp256k1/bench_test.go +++ b/crypto/keys/secp256k1/bench_test.go @@ -9,6 +9,7 @@ import ( ) func BenchmarkKeyGeneration(b *testing.B) { + b.ReportAllocs() benchmarkKeygenWrapper := func(reader io.Reader) types.PrivKey { priv := genPrivKey(reader) return &PrivKey{Key: priv} @@ -17,11 +18,13 @@ func BenchmarkKeyGeneration(b *testing.B) { } func BenchmarkSigning(b *testing.B) { + b.ReportAllocs() priv := GenPrivKey() benchmarking.BenchmarkSigning(b, priv) } func BenchmarkVerification(b *testing.B) { + b.ReportAllocs() priv := GenPrivKey() benchmarking.BenchmarkVerification(b, priv) } diff --git a/docs/building-modules/beginblock-endblock.md b/docs/building-modules/beginblock-endblock.md index 09a48df8807a..cb8dbba1dda2 100644 --- a/docs/building-modules/beginblock-endblock.md +++ b/docs/building-modules/beginblock-endblock.md @@ -24,7 +24,7 @@ The actual implementation of `BeginBlocker` and `EndBlocker` in `./abci.go` are A specificity of the `EndBlocker` is that it can return validator updates to the underlying consensus engine in the form of an [`[]abci.ValidatorUpdates`](https://tendermint.com/docs/app-dev/abci-spec.html#validatorupdate). This is the preferred way to implement custom validator changes. -It is possible for developers to defined the order of execution between the `BeginBlocker`/`EndBlocker` functions of each of their application's modules via the module's manager `SetOrderBeginBlocker`/`SetOrderEndBlocker` methods. For more on the module manager, click [here](./module-manager.md#manager). +It is possible for developers to define the order of execution between the `BeginBlocker`/`EndBlocker` functions of each of their application's modules via the module's manager `SetOrderBeginBlocker`/`SetOrderEndBlocker` methods. For more on the module manager, click [here](./module-manager.md#manager). See an example implementation of `BeginBlocker` from the `distr` module: diff --git a/docs/building-modules/module-manager.md b/docs/building-modules/module-manager.md index cd8cc4b9eca0..919ec1425c84 100644 --- a/docs/building-modules/module-manager.md +++ b/docs/building-modules/module-manager.md @@ -74,7 +74,8 @@ Let us go through the methods of `AppModule`: - `LegacyQuerierHandler(*codec.LegacyAmino)` (deprecated): Returns a [`querier`](./query-services.md#legacy-queriers) given the query `path`, in order to process the `query`. - `RegisterServices(Configurator)`: Allows a module to register services. - `BeginBlock(sdk.Context, abci.RequestBeginBlock)`: This method gives module developers the option to implement logic that is automatically triggered at the beginning of each block. Implement empty if no logic needs to be triggered at the beginning of each block for this module. -- `EndBlock(sdk.Context, abci.RequestEndBlock)`: This method gives module developers the option to implement logic that is automatically triggered at the beginning of each block. This is also where the module can inform the underlying consensus engine of validator set changes (e.g. the `staking` module). Implement empty if no logic needs to be triggered at the beginning of each block for this module. +- `EndBlock(sdk.Context, abci.RequestEndBlock)`: This method gives module developers the option to implement logic that is automatically triggered at the end of each block. This is also where the module can inform the underlying consensus engine of validator set changes (e.g. the `staking` module). Implement empty if no logic needs to be triggered at the end of each block for this module. + ### Implementing the Application Module Interfaces @@ -132,7 +133,7 @@ The module manager is used throughout the application whenever an action on a co - `SetOrderInitGenesis(moduleNames ...string)`: Sets the order in which the [`InitGenesis`](./genesis.md#initgenesis) function of each module will be called when the application is first started. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). - `SetOrderExportGenesis(moduleNames ...string)`: Sets the order in which the [`ExportGenesis`](./genesis.md#exportgenesis) function of each module will be called in case of an export. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). - `SetOrderBeginBlockers(moduleNames ...string)`: Sets the order in which the `BeginBlock()` function of each module will be called at the beginning of each block. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). -- `SetOrderEndBlockers(moduleNames ...string)`: Sets the order in which the `EndBlock()` function of each module will be called at the beginning of each block. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). +- `SetOrderEndBlockers(moduleNames ...string)`: Sets the order in which the `EndBlock()` function of each module will be called at the end of each block. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). - `RegisterInvariants(ir sdk.InvariantRegistry)`: Registers the [invariants](./invariants.md) of each module. - `RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter, legacyQuerierCdc *codec.LegacyAmino)`: Registers legacy [`Msg`](./messages-and-queries.md#messages) and [`querier`](./query-services.md#legacy-queriers) routes. - `RegisterServices(cfg Configurator)`: Registers all module services. diff --git a/docs/core/cli.md b/docs/core/cli.md index 8e11bf488d2b..10203e769e8c 100644 --- a/docs/core/cli.md +++ b/docs/core/cli.md @@ -108,6 +108,24 @@ Flags are added to commands directly (generally in the [module's CLI file](../bu +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/simapp/simd/cmd/root.go#L118 +## Environment variables + +Each flag is bound to it's respecteve named environment variable. Then name of the environment variable consist of two parts - capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. For example flag `--home` for application with basename `GAIA` is bound to `GAIA_HOME`. It allows to reduce amount of flags typed for routine operations. For example instead of: +```sh +gaia --home=./ --node= --chain-id="testchain-1" --keyring-backend=test tx ... --from= +``` +this will be more convinient: +```sh +# define env variables in .env, .envrc etc +GAIA_HOME= +GAIA_NODE= +GAIA_CHAIN_ID="testchain-1" +GAIA_KEYRING_BACKEND="test" + +# and later just use +gaia tx ... --from= +``` + ## Configurations It is vital that the root command of an application uses `PersistentPreRun()` cobra command property for executing the command, so all child commands have access to the server and client contexts. These contexts are set as their default values initially and maybe modified, scoped to the command, in their respective `PersistentPreRun()` functions. Note that the `client.Context` is typically pre-populated with "default" values that may be useful for all commands to inherit and override if necessary. diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index ec30ba730ba1..b06aaf246185 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -264,6 +264,32 @@ - [Msg](#cosmos.evidence.v1beta1.Msg) +- [cosmos/feegrant/v1beta1/feegrant.proto](#cosmos/feegrant/v1beta1/feegrant.proto) + - [BasicFeeAllowance](#cosmos.feegrant.v1beta1.BasicFeeAllowance) + - [Duration](#cosmos.feegrant.v1beta1.Duration) + - [ExpiresAt](#cosmos.feegrant.v1beta1.ExpiresAt) + - [FeeAllowanceGrant](#cosmos.feegrant.v1beta1.FeeAllowanceGrant) + - [PeriodicFeeAllowance](#cosmos.feegrant.v1beta1.PeriodicFeeAllowance) + +- [cosmos/feegrant/v1beta1/genesis.proto](#cosmos/feegrant/v1beta1/genesis.proto) + - [GenesisState](#cosmos.feegrant.v1beta1.GenesisState) + +- [cosmos/feegrant/v1beta1/query.proto](#cosmos/feegrant/v1beta1/query.proto) + - [QueryFeeAllowanceRequest](#cosmos.feegrant.v1beta1.QueryFeeAllowanceRequest) + - [QueryFeeAllowanceResponse](#cosmos.feegrant.v1beta1.QueryFeeAllowanceResponse) + - [QueryFeeAllowancesRequest](#cosmos.feegrant.v1beta1.QueryFeeAllowancesRequest) + - [QueryFeeAllowancesResponse](#cosmos.feegrant.v1beta1.QueryFeeAllowancesResponse) + + - [Query](#cosmos.feegrant.v1beta1.Query) + +- [cosmos/feegrant/v1beta1/tx.proto](#cosmos/feegrant/v1beta1/tx.proto) + - [MsgGrantFeeAllowance](#cosmos.feegrant.v1beta1.MsgGrantFeeAllowance) + - [MsgGrantFeeAllowanceResponse](#cosmos.feegrant.v1beta1.MsgGrantFeeAllowanceResponse) + - [MsgRevokeFeeAllowance](#cosmos.feegrant.v1beta1.MsgRevokeFeeAllowance) + - [MsgRevokeFeeAllowanceResponse](#cosmos.feegrant.v1beta1.MsgRevokeFeeAllowanceResponse) + + - [Msg](#cosmos.feegrant.v1beta1.Msg) + - [cosmos/genutil/v1beta1/genesis.proto](#cosmos/genutil/v1beta1/genesis.proto) - [GenesisState](#cosmos.genutil.v1beta1.GenesisState) @@ -4097,6 +4123,312 @@ Msg defines the evidence Msg service. + +

    Top

    + +## cosmos/feegrant/v1beta1/feegrant.proto + + + + + +### BasicFeeAllowance +BasicFeeAllowance implements FeeAllowance with a one-time grant of tokens +that optionally expires. The delegatee can use up to SpendLimit to cover fees. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | spend_limit specifies the maximum amount of tokens that can be spent by this allowance and will be updated as tokens are spent. If it is empty, there is no spend limit and any amount of coins can be spent. | +| `expiration` | [ExpiresAt](#cosmos.feegrant.v1beta1.ExpiresAt) | | expiration specifies an optional time when this allowance expires | + + + + + + + + +### Duration +Duration is a span of a clock time or number of blocks. +This is designed to be added to an ExpiresAt struct. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | | +| `blocks` | [uint64](#uint64) | | | + + + + + + + + +### ExpiresAt +ExpiresAt is a point in time where something expires. +It may be *either* block time or block height + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `height` | [int64](#int64) | | | + + + + + + + + +### FeeAllowanceGrant +FeeAllowanceGrant is stored in the KVStore to record a grant with full context + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `allowance` | [google.protobuf.Any](#google.protobuf.Any) | | | + + + + + + + + +### PeriodicFeeAllowance +PeriodicFeeAllowance extends FeeAllowance to allow for both a maximum cap, +as well as a limit per time period. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `basic` | [BasicFeeAllowance](#cosmos.feegrant.v1beta1.BasicFeeAllowance) | | basic specifies a struct of `BasicFeeAllowance` | +| `period` | [Duration](#cosmos.feegrant.v1beta1.Duration) | | period specifies the time duration in which period_spend_limit coins can be spent before that allowance is reset | +| `period_spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | period_spend_limit specifies the maximum number of coins that can be spent in the period | +| `period_can_spend` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | period_can_spend is the number of coins left to be spent before the period_reset time | +| `period_reset` | [ExpiresAt](#cosmos.feegrant.v1beta1.ExpiresAt) | | period_reset is the time at which this period resets and a new one begins, it is calculated from the start time of the first transaction after the last period ended | + + + + + + + + + + + + + + + + +

    Top

    + +## cosmos/feegrant/v1beta1/genesis.proto + + + + + +### GenesisState +GenesisState contains a set of fee allowances, persisted from the store + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fee_allowances` | [FeeAllowanceGrant](#cosmos.feegrant.v1beta1.FeeAllowanceGrant) | repeated | | + + + + + + + + + + + + + + + + +

    Top

    + +## cosmos/feegrant/v1beta1/query.proto + + + + + +### QueryFeeAllowanceRequest +QueryFeeAllowanceRequest is the request type for the Query/FeeAllowance RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | + + + + + + + + +### QueryFeeAllowanceResponse +QueryFeeAllowanceResponse is the response type for the Query/FeeAllowance RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fee_allowance` | [FeeAllowanceGrant](#cosmos.feegrant.v1beta1.FeeAllowanceGrant) | | fee_allowance is a fee_allowance granted for grantee by granter. | + + + + + + + + +### QueryFeeAllowancesRequest +QueryFeeAllowancesRequest is the request type for the Query/FeeAllowances RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `grantee` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | + + + + + + + + +### QueryFeeAllowancesResponse +QueryFeeAllowancesResponse is the response type for the Query/FeeAllowances RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fee_allowances` | [FeeAllowanceGrant](#cosmos.feegrant.v1beta1.FeeAllowanceGrant) | repeated | fee_allowances are fee_allowance's granted for grantee by granter. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | + + + + + + + + + + + + + + +### Query +Query defines the gRPC querier service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `FeeAllowance` | [QueryFeeAllowanceRequest](#cosmos.feegrant.v1beta1.QueryFeeAllowanceRequest) | [QueryFeeAllowanceResponse](#cosmos.feegrant.v1beta1.QueryFeeAllowanceResponse) | FeeAllowance returns fee granted to the grantee by the granter. | GET|/cosmos/feegrant/v1beta1/fee_allowance/{granter}/{grantee}| +| `FeeAllowances` | [QueryFeeAllowancesRequest](#cosmos.feegrant.v1beta1.QueryFeeAllowancesRequest) | [QueryFeeAllowancesResponse](#cosmos.feegrant.v1beta1.QueryFeeAllowancesResponse) | FeeAllowances returns all the grants for address. | GET|/cosmos/feegrant/v1beta1/fee_allowances/{grantee}| + + + + + + +

    Top

    + +## cosmos/feegrant/v1beta1/tx.proto + + + + + +### MsgGrantFeeAllowance +MsgGrantFeeAllowance adds permission for Grantee to spend up to Allowance +of fees from the account of Granter. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `allowance` | [google.protobuf.Any](#google.protobuf.Any) | | | + + + + + + + + +### MsgGrantFeeAllowanceResponse +MsgGrantFeeAllowanceResponse defines the Msg/GrantFeeAllowanceResponse response type. + + + + + + + + +### MsgRevokeFeeAllowance +MsgRevokeFeeAllowance removes any existing FeeAllowance from Granter to Grantee. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | + + + + + + + + +### MsgRevokeFeeAllowanceResponse +MsgRevokeFeeAllowanceResponse defines the Msg/RevokeFeeAllowanceResponse response type. + + + + + + + + + + + + + + +### Msg +Msg defines the feegrant msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `GrantFeeAllowance` | [MsgGrantFeeAllowance](#cosmos.feegrant.v1beta1.MsgGrantFeeAllowance) | [MsgGrantFeeAllowanceResponse](#cosmos.feegrant.v1beta1.MsgGrantFeeAllowanceResponse) | GrantFeeAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time. | | +| `RevokeFeeAllowance` | [MsgRevokeFeeAllowance](#cosmos.feegrant.v1beta1.MsgRevokeFeeAllowance) | [MsgRevokeFeeAllowanceResponse](#cosmos.feegrant.v1beta1.MsgRevokeFeeAllowanceResponse) | RevokeFeeAllowance revokes any fee allowance of granter's account that has been granted to the grantee. | | + + + + +

    Top

    @@ -5375,8 +5707,8 @@ Commission defines commission parameters for a given validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `commission_rates` | [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) | | | -| `update_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `commission_rates` | [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) | | commission_rates defines the initial commission rates to be used for creating a validator. | +| `update_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | update_time is the last time the commission rate was changed. | @@ -5392,9 +5724,9 @@ a validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `rate` | [string](#string) | | | -| `max_rate` | [string](#string) | | | -| `max_change_rate` | [string](#string) | | | +| `rate` | [string](#string) | | rate is the commission rate charged to delegators, as a fraction. | +| `max_rate` | [string](#string) | | max_rate defines the maximum commission rate which validator can ever charge, as a fraction. | +| `max_change_rate` | [string](#string) | | max_change_rate defines the maximum daily increase of the validator commission, as a fraction. | @@ -5479,9 +5811,9 @@ validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_address` | [string](#string) | | | -| `shares` | [string](#string) | | | +| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | +| `validator_address` | [string](#string) | | validator_address is the bech32-encoded address of the validator. | +| `shares` | [string](#string) | | shares define the delegation shares received. | @@ -5513,11 +5845,11 @@ Description defines a validator description. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `moniker` | [string](#string) | | | -| `identity` | [string](#string) | | | -| `website` | [string](#string) | | | -| `security_contact` | [string](#string) | | | -| `details` | [string](#string) | | | +| `moniker` | [string](#string) | | moniker defines a human-readable name for the validator. | +| `identity` | [string](#string) | | identity defines an optional identity signature (ex. UPort or Keybase). | +| `website` | [string](#string) | | website defines an optional website link. | +| `security_contact` | [string](#string) | | security_contact defines an optional email for security contact. | +| `details` | [string](#string) | | details define other optional details. | @@ -5551,11 +5883,11 @@ Params defines the parameters for the staking module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | | -| `max_validators` | [uint32](#uint32) | | | -| `max_entries` | [uint32](#uint32) | | | -| `historical_entries` | [uint32](#uint32) | | | -| `bond_denom` | [string](#string) | | | +| `unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | unbonding_time is the time duration of unbonding. | +| `max_validators` | [uint32](#uint32) | | max_validators is the maximum number of validators. | +| `max_entries` | [uint32](#uint32) | | max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). | +| `historical_entries` | [uint32](#uint32) | | historical_entries is the number of historical entries to persist. | +| `bond_denom` | [string](#string) | | bond_denom defines the bondable coin denomination. | @@ -5588,10 +5920,12 @@ from a particular source validator to a particular destination validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_src_address` | [string](#string) | | | -| `validator_dst_address` | [string](#string) | | | -| `entries` | [RedelegationEntry](#cosmos.staking.v1beta1.RedelegationEntry) | repeated | redelegation entries | +| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | +| `validator_src_address` | [string](#string) | | validator_src_address is the validator redelegation source operator address. | +| `validator_dst_address` | [string](#string) | | validator_dst_address is the validator redelegation destination operator address. | +| `entries` | [RedelegationEntry](#cosmos.staking.v1beta1.RedelegationEntry) | repeated | entries are the redelegation entries. + +redelegation entries | @@ -5606,10 +5940,10 @@ RedelegationEntry defines a redelegation object with relevant metadata. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `creation_height` | [int64](#int64) | | | -| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `initial_balance` | [string](#string) | | | -| `shares_dst` | [string](#string) | | | +| `creation_height` | [int64](#int64) | | creation_height defines the height which the redelegation took place. | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | completion_time defines the unix time for redelegation completion. | +| `initial_balance` | [string](#string) | | initial_balance defines the initial balance when redelegation started. | +| `shares_dst` | [string](#string) | | shares_dst is the amount of destination-validator shares created by redelegation. | @@ -5661,9 +5995,11 @@ for a single validator in an time-ordered list. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_address` | [string](#string) | | | -| `entries` | [UnbondingDelegationEntry](#cosmos.staking.v1beta1.UnbondingDelegationEntry) | repeated | unbonding delegation entries | +| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | +| `validator_address` | [string](#string) | | validator_address is the bech32-encoded address of the validator. | +| `entries` | [UnbondingDelegationEntry](#cosmos.staking.v1beta1.UnbondingDelegationEntry) | repeated | entries are the unbonding delegation entries. + +unbonding delegation entries | @@ -5678,10 +6014,10 @@ UnbondingDelegationEntry defines an unbonding object with relevant metadata. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `creation_height` | [int64](#int64) | | | -| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `initial_balance` | [string](#string) | | | -| `balance` | [string](#string) | | | +| `creation_height` | [int64](#int64) | | creation_height is the height which the unbonding took place. | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | completion_time is the unix time for unbonding completion. | +| `initial_balance` | [string](#string) | | initial_balance defines the tokens initially scheduled to receive at completion. | +| `balance` | [string](#string) | | balance defines the tokens to receive at completion. | @@ -5718,17 +6054,17 @@ multiplied by exchange rate. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `operator_address` | [string](#string) | | | -| `consensus_pubkey` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `jailed` | [bool](#bool) | | | -| `status` | [BondStatus](#cosmos.staking.v1beta1.BondStatus) | | | -| `tokens` | [string](#string) | | | -| `delegator_shares` | [string](#string) | | | -| `description` | [Description](#cosmos.staking.v1beta1.Description) | | | -| `unbonding_height` | [int64](#int64) | | | -| `unbonding_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `commission` | [Commission](#cosmos.staking.v1beta1.Commission) | | | -| `min_self_delegation` | [string](#string) | | | +| `operator_address` | [string](#string) | | operator_address defines the address of the validator's operator; bech encoded in JSON. | +| `consensus_pubkey` | [google.protobuf.Any](#google.protobuf.Any) | | consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. | +| `jailed` | [bool](#bool) | | jailed defined whether the validator has been jailed from bonded status or not. | +| `status` | [BondStatus](#cosmos.staking.v1beta1.BondStatus) | | status is the validator status (bonded/unbonding/unbonded). | +| `tokens` | [string](#string) | | tokens define the delegated tokens (incl. self-delegation). | +| `delegator_shares` | [string](#string) | | delegator_shares defines total shares issued to a validator's delegators. | +| `description` | [Description](#cosmos.staking.v1beta1.Description) | | description defines the description terms for the validator. | +| `unbonding_height` | [int64](#int64) | | unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. | +| `unbonding_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. | +| `commission` | [Commission](#cosmos.staking.v1beta1.Commission) | | commission defines the commission parameters. | +| `min_self_delegation` | [string](#string) | | min_self_delegation is the validator's self declared minimum self delegation. | diff --git a/docs/run-node/interact-node.md b/docs/run-node/interact-node.md index a07981341fe7..bb208f7d8df1 100644 --- a/docs/run-node/interact-node.md +++ b/docs/run-node/interact-node.md @@ -16,7 +16,7 @@ There are multiple ways to interact with a node: using the CLI, using gRPC or us Now that your chain is running, it is time to try sending tokens from the first account you created to a second account. In a new terminal window, start by running the following query command: ```bash -simd query account $MY_VALIDATOR_ADDRESS --chain-id my-test-chain +simd query bank balances $MY_VALIDATOR_ADDRESS --chain-id my-test-chain ``` You should see the current balance of the account you created, equal to the original balance of `stake` you granted it minus the amount you delegated via the `gentx`. Now, create a second account: @@ -31,16 +31,16 @@ RECIPIENT=$(simd keys show recipient -a --keyring-backend test) The command above creates a local key-pair that is not yet registered on the chain. An account is created the first time it receives tokens from another account. Now, run the following command to send tokens to the `recipient` account: ```bash -simd tx bank send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake --chain-id my-test-chain +simd tx bank send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000000stake --chain-id my-test-chain --keyring-backend test # Check that the recipient account did receive the tokens. -simd query account $RECIPIENT --chain-id my-test-chain +simd query bank balances $RECIPIENT --chain-id my-test-chain ``` Finally, delegate some of the stake tokens sent to the `recipient` account to the validator: ```bash -simd tx staking delegate $(simd keys show my_validator --bech val -a --keyring-backend test) 500stake --from recipient --chain-id my-test-chain +simd tx staking delegate $(simd keys show my_validator --bech val -a --keyring-backend test) 500stake --from recipient --chain-id my-test-chain --keyring-backend test # Query the total delegations to `validator`. simd query staking delegations-to $(simd keys show my_validator --bech val -a --keyring-backend test) --chain-id my-test-chain diff --git a/docs/run-node/run-node.md b/docs/run-node/run-node.md index aee7d84e1301..d7aaf8f5822d 100644 --- a/docs/run-node/run-node.md +++ b/docs/run-node/run-node.md @@ -44,7 +44,7 @@ Before starting the chain, you need to populate the state with at least one acco Now that you have created a local account, go ahead and grant it some `stake` tokens in your chain's genesis file. Doing so will also make sure your chain is aware of this account's existence: ```bash -simd add-genesis-account $MY_VALIDATOR_ADDRESS 100000000stake +simd add-genesis-account $MY_VALIDATOR_ADDRESS 100000000000stake ``` Recall that `$MY_VALIDATOR_ADDRESS` is a variable that holds the address of the `my_validator` key in the [keyring](./keyring.md#adding-keys-to-the-keyring). Also note that the tokens in the SDK have the `{amount}{denom}` format: `amount` is is a 18-digit-precision decimal number, and `denom` is the unique token identifier with its denomination key (e.g. `atom` or `uatom`). Here, we are granting `stake` tokens, as `stake` is the token identifier used for staking in [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc3/simapp). For your own chain with its own staking denom, that token identifier should be used instead. @@ -53,7 +53,7 @@ Now that your account has some tokens, you need to add a validator to your chain ```bash # Create a gentx. -simd gentx my_validator 100000stake --chain-id my-test-chain --keyring-backend test +simd gentx my_validator 100000000stake --chain-id my-test-chain --keyring-backend test # Add the gentx to the genesis file. simd collect-gentxs diff --git a/docs/run-node/txs.md b/docs/run-node/txs.md index 9fbc642efc9d..ce977212d232 100644 --- a/docs/run-node/txs.md +++ b/docs/run-node/txs.md @@ -11,7 +11,7 @@ This document describes how to generate an (unsigned) transaction, signing it (w The easiest way to send transactions is using the CLI, as we have seen in the previous page when [interacting with a node](./interact-node.md#using-the-cli). For example, running the following command ```bash -simd tx bank send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake --chain-id my-test-chain +simd tx bank send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake --chain-id my-test-chain --keyring-backend test ``` will run the following steps: diff --git a/proto/cosmos/feegrant/v1beta1/feegrant.proto b/proto/cosmos/feegrant/v1beta1/feegrant.proto new file mode 100644 index 000000000000..534de582d977 --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -0,0 +1,81 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types"; + +// BasicFeeAllowance implements FeeAllowance with a one-time grant of tokens +// that optionally expires. The delegatee can use up to SpendLimit to cover fees. +message BasicFeeAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // spend_limit specifies the maximum amount of tokens that can be spent + // by this allowance and will be updated as tokens are spent. If it is + // empty, there is no spend limit and any amount of coins can be spent. + repeated cosmos.base.v1beta1.Coin spend_limit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // expiration specifies an optional time when this allowance expires + ExpiresAt expiration = 2 [(gogoproto.nullable) = false]; +} + +// PeriodicFeeAllowance extends FeeAllowance to allow for both a maximum cap, +// as well as a limit per time period. +message PeriodicFeeAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // basic specifies a struct of `BasicFeeAllowance` + BasicFeeAllowance basic = 1 [(gogoproto.nullable) = false]; + + // period specifies the time duration in which period_spend_limit coins can + // be spent before that allowance is reset + Duration period = 2 [(gogoproto.nullable) = false]; + + // period_spend_limit specifies the maximum number of coins that can be spent + // in the period + repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // period_can_spend is the number of coins left to be spent before the period_reset time + repeated cosmos.base.v1beta1.Coin period_can_spend = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // period_reset is the time at which this period resets and a new one begins, + // it is calculated from the start time of the first transaction after the + // last period ended + ExpiresAt period_reset = 5 [(gogoproto.nullable) = false]; +} + +// Duration is a span of a clock time or number of blocks. +// This is designed to be added to an ExpiresAt struct. +message Duration { + // sum is the oneof that represents either duration or block + oneof sum { + google.protobuf.Duration duration = 1 [(gogoproto.stdduration) = true]; + uint64 blocks = 2; + } +} + +// ExpiresAt is a point in time where something expires. +// It may be *either* block time or block height +message ExpiresAt { + // sum is the oneof that represents either time or height + oneof sum { + google.protobuf.Timestamp time = 1 [(gogoproto.stdtime) = true]; + int64 height = 2; + } +} + +// FeeAllowanceGrant is stored in the KVStore to record a grant with full context +message FeeAllowanceGrant { + + string granter = 1; + string grantee = 2; + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} diff --git a/proto/cosmos/feegrant/v1beta1/genesis.proto b/proto/cosmos/feegrant/v1beta1/genesis.proto new file mode 100644 index 000000000000..a021ea61dfc7 --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/feegrant/v1beta1/feegrant.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types"; + +// GenesisState contains a set of fee allowances, persisted from the store +message GenesisState { + repeated FeeAllowanceGrant fee_allowances = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/feegrant/v1beta1/query.proto b/proto/cosmos/feegrant/v1beta1/query.proto new file mode 100644 index 000000000000..42d5f302005f --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/query.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/feegrant/v1beta1/feegrant.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types"; + +// Query defines the gRPC querier service. +service Query { + + // FeeAllowance returns fee granted to the grantee by the granter. + rpc FeeAllowance(QueryFeeAllowanceRequest) returns (QueryFeeAllowanceResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/fee_allowance/{granter}/{grantee}"; + } + + // FeeAllowances returns all the grants for address. + rpc FeeAllowances(QueryFeeAllowancesRequest) returns (QueryFeeAllowancesResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/fee_allowances/{grantee}"; + } +} + +// QueryFeeAllowanceRequest is the request type for the Query/FeeAllowance RPC method. +message QueryFeeAllowanceRequest { + string granter = 1; + string grantee = 2; +} + +// QueryFeeAllowanceResponse is the response type for the Query/FeeAllowance RPC method. +message QueryFeeAllowanceResponse { + // fee_allowance is a fee_allowance granted for grantee by granter. + cosmos.feegrant.v1beta1.FeeAllowanceGrant fee_allowance = 1; +} + +// QueryFeeAllowancesRequest is the request type for the Query/FeeAllowances RPC method. +message QueryFeeAllowancesRequest { + string grantee = 1; + + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryFeeAllowancesResponse is the response type for the Query/FeeAllowances RPC method. +message QueryFeeAllowancesResponse { + // fee_allowances are fee_allowance's granted for grantee by granter. + repeated cosmos.feegrant.v1beta1.FeeAllowanceGrant fee_allowances = 1; + + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/feegrant/v1beta1/tx.proto b/proto/cosmos/feegrant/v1beta1/tx.proto new file mode 100644 index 000000000000..a36f358f2503 --- /dev/null +++ b/proto/cosmos/feegrant/v1beta1/tx.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types"; + +// Msg defines the feegrant msg service. +service Msg { + + // GrantFeeAllowance grants fee allowance to the grantee on the granter's + // account with the provided expiration time. + rpc GrantFeeAllowance(MsgGrantFeeAllowance) returns (MsgGrantFeeAllowanceResponse); + + // RevokeFeeAllowance revokes any fee allowance of granter's account that + // has been granted to the grantee. + rpc RevokeFeeAllowance(MsgRevokeFeeAllowance) returns (MsgRevokeFeeAllowanceResponse); +} + +// MsgGrantFeeAllowance adds permission for Grantee to spend up to Allowance +// of fees from the account of Granter. +message MsgGrantFeeAllowance { + string granter = 1; + string grantee = 2; + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} + +// MsgGrantFeeAllowanceResponse defines the Msg/GrantFeeAllowanceResponse response type. +message MsgGrantFeeAllowanceResponse {} + +// MsgRevokeFeeAllowance removes any existing FeeAllowance from Granter to Grantee. +message MsgRevokeFeeAllowance { + string granter = 1; + string grantee = 2; +} + +// MsgRevokeFeeAllowanceResponse defines the Msg/RevokeFeeAllowanceResponse response type. +message MsgRevokeFeeAllowanceResponse {} diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index 456655cb86ea..987515bd380c 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -27,12 +27,15 @@ message CommissionRates { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; + // rate is the commission rate charged to delegators, as a fraction. string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. string max_rate = 2 [ (gogoproto.moretags) = "yaml:\"max_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; + // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. string max_change_rate = 3 [ (gogoproto.moretags) = "yaml:\"max_change_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", @@ -45,7 +48,9 @@ message Commission { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; + // commission_rates defines the initial commission rates to be used for creating a validator. CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + // update_time is the last time the commission rate was changed. google.protobuf.Timestamp update_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; } @@ -55,10 +60,15 @@ message Description { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; + // moniker defines a human-readable name for the validator. string moniker = 1; + // identity defines an optional identity signature (ex. UPort or Keybase). string identity = 2; + // website defines an optional website link. string website = 3; + // security_contact defines an optional email for security contact. string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""]; + // details define other optional details. string details = 5; } @@ -75,22 +85,33 @@ message Validator { option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_getters) = false; + // operator_address defines the address of the validator's operator; bech encoded in JSON. string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; + // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. google.protobuf.Any consensus_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; + // jailed defined whether the validator has been jailed from bonded status or not. bool jailed = 3; + // status is the validator status (bonded/unbonding/unbonded). BondStatus status = 4; + // tokens define the delegated tokens (incl. self-delegation). string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + // delegator_shares defines total shares issued to a validator's delegators. string delegator_shares = 6 [ (gogoproto.moretags) = "yaml:\"delegator_shares\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; + // description defines the description terms for the validator. Description description = 7 [(gogoproto.nullable) = false]; + // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; + // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. google.protobuf.Timestamp unbonding_time = 9 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + // commission defines the commission parameters. Commission commission = 10 [(gogoproto.nullable) = false]; + // min_self_delegation is the validator's self declared minimum self delegation. string min_self_delegation = 11 [ (gogoproto.moretags) = "yaml:\"min_self_delegation\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", @@ -164,8 +185,11 @@ message Delegation { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; + // delegator_address is the bech32-encoded address of the delegator. string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + // validator_address is the bech32-encoded address of the validator. string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + // shares define the delegation shares received. string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } @@ -176,8 +200,11 @@ message UnbondingDelegation { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; + // delegator_address is the bech32-encoded address of the delegator. string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + // validator_address is the bech32-encoded address of the validator. string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + // entries are the unbonding delegation entries. repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries } @@ -186,14 +213,18 @@ message UnbondingDelegationEntry { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; + // creation_height is the height which the unbonding took place. int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + // completion_time is the unix time for unbonding completion. google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + // initial_balance defines the tokens initially scheduled to receive at completion. string initial_balance = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"initial_balance\"" ]; + // balance defines the tokens to receive at completion. string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; } @@ -202,14 +233,18 @@ message RedelegationEntry { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; + // creation_height defines the height which the redelegation took place. int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + // completion_time defines the unix time for redelegation completion. google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + // initial_balance defines the initial balance when redelegation started. string initial_balance = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"initial_balance\"" ]; + // shares_dst is the amount of destination-validator shares created by redelegation. string shares_dst = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } @@ -221,9 +256,13 @@ message Redelegation { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; + // delegator_address is the bech32-encoded address of the delegator. string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + // validator_src_address is the validator redelegation source operator address. string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + // validator_dst_address is the validator redelegation destination operator address. string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + // entries are the redelegation entries. repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries } @@ -232,12 +271,18 @@ message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; + // unbonding_time is the time duration of unbonding. google.protobuf.Duration unbonding_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + // max_validators is the maximum number of validators. uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; + // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; + // historical_entries is the number of historical entries to persist. uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; + // bond_denom defines the bondable coin denomination. string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; + // power_reduction is the amount of staking tokens required for 1 unit of consensus-engine power string power_reduction = 6 [ (gogoproto.moretags) = "yaml:\"power_reduction\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", diff --git a/server/tm_cmds.go b/server/tm_cmds.go index b05a88f797da..854d4597fee8 100644 --- a/server/tm_cmds.go +++ b/server/tm_cmds.go @@ -28,7 +28,7 @@ func ShowNodeIDCmd() *cobra.Command { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config - nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile()) + nodeKey, err := p2p.LoadNodeKey(cfg.NodeKeyFile()) if err != nil { return err } @@ -48,7 +48,7 @@ func ShowValidatorCmd() *cobra.Command { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config - privValidator := pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) + privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) valPubKey, err := privValidator.GetPubKey() if err != nil { return err @@ -86,7 +86,7 @@ func ShowAddressCmd() *cobra.Command { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config - privValidator := pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) + privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) valConsAddr := (sdk.ConsAddress)(privValidator.GetAddress()) output, _ := cmd.Flags().GetString(cli.OutputFlag) diff --git a/server/util.go b/server/util.go index e461a12fb843..b431b715db27 100644 --- a/server/util.go +++ b/server/util.go @@ -17,6 +17,7 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/cobra" + "github.com/spf13/pflag" "github.com/spf13/viper" tmcfg "github.com/tendermint/tendermint/config" tmlog "github.com/tendermint/tendermint/libs/log" @@ -63,6 +64,37 @@ func NewContext(v *viper.Viper, config *tmcfg.Config, logger tmlog.Logger) *Cont return &Context{v, config, logger} } +func bindFlags(basename string, cmd *cobra.Command, v *viper.Viper) (err error) { + defer func() { + recover() + }() + + cmd.Flags().VisitAll(func(f *pflag.Flag) { + // Environment variables can't have dashes in them, so bind them to their equivalent + // keys with underscores, e.g. --favorite-color to STING_FAVORITE_COLOR + err = v.BindEnv(f.Name, fmt.Sprintf("%s_%s", basename, strings.ToUpper(strings.ReplaceAll(f.Name, "-", "_")))) + if err != nil { + panic(err) + } + + err = v.BindPFlag(f.Name, f) + if err != nil { + panic(err) + } + + // Apply the viper config value to the flag when the flag is not set and viper has a value + if !f.Changed && v.IsSet(f.Name) { + val := v.Get(f.Name) + err = cmd.Flags().Set(f.Name, fmt.Sprintf("%v", val)) + if err != nil { + panic(err) + } + } + }) + + return +} + // InterceptConfigsPreRunHandler performs a pre-run function for the root daemon // application command. It will create a Viper literal and a default server // Context. The server Tendermint configuration will either be read and parsed @@ -98,6 +130,9 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command) error { // return value is a tendermint configuration object serverCtx.Config = config + if err = bindFlags(basename, cmd, serverCtx.Viper); err != nil { + return err + } var logWriter io.Writer if strings.ToLower(serverCtx.Viper.GetString(flags.FlagLogFormat)) == tmcfg.LogFormatPlain { diff --git a/simapp/app.go b/simapp/app.go index 5e9c3e29e163..23ced043d047 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -55,6 +55,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/evidence" evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + feegrant "github.com/cosmos/cosmos-sdk/x/feegrant" + feegrantante "github.com/cosmos/cosmos-sdk/x/feegrant/ante" + feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" @@ -120,6 +124,7 @@ var ( crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, + feegrant.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, @@ -181,6 +186,7 @@ type SimApp struct { IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper @@ -222,7 +228,7 @@ func NewSimApp( keys := sdk.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, - govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, + govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegranttypes.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, authztypes.StoreKey, ) @@ -277,6 +283,8 @@ func NewSimApp( app.CrisisKeeper = crisiskeeper.NewKeeper( app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, ) + + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegranttypes.StoreKey], app.AccountKeeper) app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath) // register the staking hooks @@ -347,6 +355,7 @@ func NewSimApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), + feegrant.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), @@ -379,6 +388,7 @@ func NewSimApp( capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName, ibchost.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, authztypes.ModuleName, ibctransfertypes.ModuleName, + feegranttypes.ModuleName, ) app.mm.RegisterInvariants(&app.CrisisKeeper) @@ -396,6 +406,7 @@ func NewSimApp( auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), + feegrant.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), @@ -419,8 +430,8 @@ func NewSimApp( app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) app.SetAnteHandler( - ante.NewAnteHandler( - app.AccountKeeper, app.BankKeeper, ante.DefaultSigVerificationGasConsumer, + feegrantante.NewAnteHandler( + app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, ante.DefaultSigVerificationGasConsumer, encodingConfig.TxConfig.SignModeHandler(), ), ) diff --git a/simapp/export.go b/simapp/export.go index 887308d30a94..8d09e333a2e1 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -157,7 +157,7 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] counter := int16(0) for ; iter.Valid(); iter.Next() { - addr := sdk.ValAddress(iter.Key()[1:]) + addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) validator, found := app.StakingKeeper.GetValidator(ctx, addr) if !found { panic("expected validator, not found") diff --git a/simapp/params/weights.go b/simapp/params/weights.go index 0ba377b009b1..a7ea85ef7c1d 100644 --- a/simapp/params/weights.go +++ b/simapp/params/weights.go @@ -20,4 +20,8 @@ const ( DefaultWeightCommunitySpendProposal int = 5 DefaultWeightTextProposal int = 5 DefaultWeightParamChangeProposal int = 5 + + // feegrant + DefaultWeightGrantFeeAllowance int = 100 + DefaultWeightRevokeFeeAllowance int = 100 ) diff --git a/simapp/sim_bench_test.go b/simapp/sim_bench_test.go index 7c22dcfe8a44..ba5c71c6f3fb 100644 --- a/simapp/sim_bench_test.go +++ b/simapp/sim_bench_test.go @@ -14,6 +14,7 @@ import ( // Profile with: // /usr/local/go/bin/go test -benchmem -run=^$ github.com/cosmos/cosmos-sdk/simapp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out func BenchmarkFullAppSimulation(b *testing.B) { + b.ReportAllocs() config, db, dir, logger, _, err := SetupSimulation("goleveldb-app-sim", "Simulation") if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) @@ -57,6 +58,7 @@ func BenchmarkFullAppSimulation(b *testing.B) { } func BenchmarkInvariants(b *testing.B) { + b.ReportAllocs() config, db, dir, logger, _, err := SetupSimulation("leveldb-app-invariant-bench", "Simulation") if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) diff --git a/snapshots/helpers_test.go b/snapshots/helpers_test.go index 5dbdd317536a..751ac212d352 100644 --- a/snapshots/helpers_test.go +++ b/snapshots/helpers_test.go @@ -6,6 +6,7 @@ import ( "errors" "io" "io/ioutil" + "os" "testing" "time" @@ -100,7 +101,10 @@ func (m *mockSnapshotter) Snapshot(height uint64, format uint32) (<-chan io.Read // setupBusyManager creates a manager with an empty store that is busy creating a snapshot at height 1. // The snapshot will complete when the returned closer is called. func setupBusyManager(t *testing.T) *snapshots.Manager { - tempdir := t.TempDir() + tempdir, err := ioutil.TempDir("", "") + require.NoError(t, err) + t.Cleanup(func() { _ = os.RemoveAll(tempdir) }) + store, err := snapshots.NewStore(db.NewMemDB(), tempdir) require.NoError(t, err) hung := newHungSnapshotter() diff --git a/snapshots/store.go b/snapshots/store.go index e0bcbe6bd570..77ff58e22ff6 100644 --- a/snapshots/store.go +++ b/snapshots/store.go @@ -91,7 +91,7 @@ func (s *Store) Get(height uint64, format uint32) (*types.Snapshot, error) { // Get fetches the latest snapshot from the database, if any. func (s *Store) GetLatest() (*types.Snapshot, error) { - iter, err := s.db.ReverseIterator(encodeKey(0, 0), encodeKey(math.MaxUint64, math.MaxUint32)) + iter, err := s.db.ReverseIterator(encodeKey(0, 0), encodeKey(uint64(math.MaxUint64), math.MaxUint32)) if err != nil { return nil, sdkerrors.Wrap(err, "failed to find latest snapshot") } @@ -111,7 +111,7 @@ func (s *Store) GetLatest() (*types.Snapshot, error) { // List lists snapshots, in reverse order (newest first). func (s *Store) List() ([]*types.Snapshot, error) { - iter, err := s.db.ReverseIterator(encodeKey(0, 0), encodeKey(math.MaxUint64, math.MaxUint32)) + iter, err := s.db.ReverseIterator(encodeKey(0, 0), encodeKey(uint64(math.MaxUint64), math.MaxUint32)) if err != nil { return nil, sdkerrors.Wrap(err, "failed to list snapshots") } @@ -181,7 +181,7 @@ func (s *Store) loadChunkFile(height uint64, format uint32, chunk uint32) (io.Re // Prune removes old snapshots. The given number of most recent heights (regardless of format) are retained. func (s *Store) Prune(retain uint32) (uint64, error) { - iter, err := s.db.ReverseIterator(encodeKey(0, 0), encodeKey(math.MaxUint64, math.MaxUint32)) + iter, err := s.db.ReverseIterator(encodeKey(0, 0), encodeKey(uint64(math.MaxUint64), math.MaxUint32)) if err != nil { return 0, sdkerrors.Wrap(err, "failed to prune snapshots") } diff --git a/snapshots/store_test.go b/snapshots/store_test.go index 1a04a393c1ed..325fd3410bea 100644 --- a/snapshots/store_test.go +++ b/snapshots/store_test.go @@ -5,6 +5,7 @@ import ( "errors" "io" "io/ioutil" + "os" "path/filepath" "testing" "time" @@ -19,7 +20,10 @@ import ( ) func setupStore(t *testing.T) *snapshots.Store { - tempdir := t.TempDir() + tempdir, err := ioutil.TempDir("", "") + require.NoError(t, err) + t.Cleanup(func() { _ = os.RemoveAll(tempdir) }) + store, err := snapshots.NewStore(db.NewMemDB(), tempdir) require.NoError(t, err) diff --git a/store/cache/benchmark_test.go b/store/cache/benchmark_test.go index cf8206272c41..10b5da2bfb0b 100644 --- a/store/cache/benchmark_test.go +++ b/store/cache/benchmark_test.go @@ -22,6 +22,7 @@ func populate(mgr *CommitKVStoreCacheManager) { } func BenchmarkReset(b *testing.B) { + b.ReportAllocs() mgr := freshMgr() b.ResetTimer() diff --git a/store/cachekv/store_bench_test.go b/store/cachekv/store_bench_test.go index 4902819834d8..2957fe6a6503 100644 --- a/store/cachekv/store_bench_test.go +++ b/store/cachekv/store_bench_test.go @@ -12,6 +12,7 @@ import ( ) func benchmarkCacheKVStoreIterator(numKVs int, b *testing.B) { + b.ReportAllocs() mem := dbadapter.Store{DB: dbm.NewMemDB()} cstore := cachekv.NewStore(mem) keys := make([]string, numKVs) diff --git a/store/cachekv/store_test.go b/store/cachekv/store_test.go index e3b33341b8c4..0404f33f2a28 100644 --- a/store/cachekv/store_test.go +++ b/store/cachekv/store_test.go @@ -516,6 +516,7 @@ func (krc *keyRangeCounter) key() int { func bz(s string) []byte { return []byte(s) } func BenchmarkCacheKVStoreGetNoKeyFound(b *testing.B) { + b.ReportAllocs() st := newCacheKVStore() b.ResetTimer() // assumes b.N < 2**24 @@ -525,6 +526,7 @@ func BenchmarkCacheKVStoreGetNoKeyFound(b *testing.B) { } func BenchmarkCacheKVStoreGetKeyFound(b *testing.B) { + b.ReportAllocs() st := newCacheKVStore() for i := 0; i < b.N; i++ { arr := []byte{byte((i & 0xFF0000) >> 16), byte((i & 0xFF00) >> 8), byte(i & 0xFF)} diff --git a/store/iavl/store_test.go b/store/iavl/store_test.go index 790830038ba9..cfda5efacf37 100644 --- a/store/iavl/store_test.go +++ b/store/iavl/store_test.go @@ -556,6 +556,7 @@ func TestIAVLStoreQuery(t *testing.T) { } func BenchmarkIAVLIteratorNext(b *testing.B) { + b.ReportAllocs() db := dbm.NewMemDB() treeSize := 1000 tree, err := iavl.NewMutableTree(db, cacheSize) diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index 03fa1b561fdb..1ca43eae9d4e 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -711,9 +711,9 @@ func (rs *Store) Restore( if height == 0 { return sdkerrors.Wrap(sdkerrors.ErrLogic, "cannot restore snapshot at height 0") } - if height > math.MaxInt64 { + if height > uint64(math.MaxInt64) { return sdkerrors.Wrapf(snapshottypes.ErrInvalidMetadata, - "snapshot height %v cannot exceed %v", height, math.MaxInt64) + "snapshot height %v cannot exceed %v", height, int64(math.MaxInt64)) } // Signal readiness. Must be done before the readers below are set up, since the zlib diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index e4654f410d0d..eafc0d6bb817 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -689,6 +689,7 @@ func BenchmarkMultistoreSnapshotRestore1M(b *testing.B) { } func benchmarkMultistoreSnapshot(b *testing.B, stores uint8, storeKeys uint64) { + b.ReportAllocs() b.StopTimer() source := newMultiStoreWithGeneratedData(dbm.NewMemDB(), stores, storeKeys) version := source.LastCommitID().Version @@ -716,6 +717,7 @@ func benchmarkMultistoreSnapshot(b *testing.B, stores uint8, storeKeys uint64) { } func benchmarkMultistoreSnapshotRestore(b *testing.B, stores uint8, storeKeys uint64) { + b.ReportAllocs() b.StopTimer() source := newMultiStoreWithGeneratedData(dbm.NewMemDB(), stores, storeKeys) version := uint64(source.LastCommitID().Version) diff --git a/types/address.go b/types/address.go index ba9e5b303b6a..eabff6fa97ee 100644 --- a/types/address.go +++ b/types/address.go @@ -12,7 +12,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec/legacy" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/bech32" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) const ( @@ -28,8 +30,6 @@ const ( // config.SetFullFundraiserPath(yourFullFundraiserPath) // config.Seal() - // AddrLen defines a valid address length - AddrLen = 20 // Bech32MainPrefix defines the main SDK Bech32 prefix of an account's address Bech32MainPrefix = "cosmos" @@ -110,9 +110,15 @@ func VerifyAddressFormat(bz []byte) error { if verifier != nil { return verifier(bz) } - if len(bz) != AddrLen { - return fmt.Errorf("incorrect address length (expected: %d, actual: %d)", AddrLen, len(bz)) + + if len(bz) == 0 { + return sdkerrors.Wrap(sdkerrors.ErrUnknownAddress, "addresses cannot be empty") + } + + if len(bz) > address.MaxAddrLen { + return sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "address max length is %d, got %d", address.MaxAddrLen, len(bz)) } + return nil } diff --git a/types/address/store_key.go b/types/address/store_key.go new file mode 100644 index 000000000000..948491972936 --- /dev/null +++ b/types/address/store_key.go @@ -0,0 +1,33 @@ +package address + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// MaxAddrLen is the maximum allowed length (in bytes) for an address. +const MaxAddrLen = 255 + +// LengthPrefix prefixes the address bytes with its length, this is used +// for example for variable-length components in store keys. +func LengthPrefix(bz []byte) ([]byte, error) { + bzLen := len(bz) + if bzLen == 0 { + return bz, nil + } + + if bzLen > MaxAddrLen { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "address length should be max %d bytes, got %d", MaxAddrLen, bzLen) + } + + return append([]byte{byte(bzLen)}, bz...), nil +} + +// MustLengthPrefix is LengthPrefix with panic on error. +func MustLengthPrefix(bz []byte) []byte { + res, err := LengthPrefix(bz) + if err != nil { + panic(err) + } + + return res +} diff --git a/types/address/store_key_test.go b/types/address/store_key_test.go new file mode 100644 index 000000000000..3bb00bd022b0 --- /dev/null +++ b/types/address/store_key_test.go @@ -0,0 +1,38 @@ +package address_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/types/address" +) + +func TestLengthPrefixedAddressStoreKey(t *testing.T) { + addr10byte := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} + addr20byte := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19} + addr256byte := make([]byte, 256) + + tests := []struct { + name string + addr []byte + expStoreKey []byte + expErr bool + }{ + {"10-byte address", addr10byte, append([]byte{byte(10)}, addr10byte...), false}, + {"20-byte address", addr20byte, append([]byte{byte(20)}, addr20byte...), false}, + {"256-byte address (too long)", addr256byte, nil, true}, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + storeKey, err := address.LengthPrefix(tt.addr) + if tt.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.expStoreKey, storeKey) + } + }) + } +} diff --git a/types/address_bench_test.go b/types/address_bench_test.go index 59222dacf9b7..88a7e537a0d2 100644 --- a/types/address_bench_test.go +++ b/types/address_bench_test.go @@ -12,6 +12,7 @@ import ( ) func BenchmarkBech32ifyPubKey(b *testing.B) { + b.ReportAllocs() pkBz := make([]byte, ed25519.PubKeySize) pk := &ed25519.PubKey{Key: pkBz} rng := rand.New(rand.NewSource(time.Now().Unix())) @@ -29,6 +30,7 @@ func BenchmarkBech32ifyPubKey(b *testing.B) { } func BenchmarkGetPubKeyFromBech32(b *testing.B) { + b.ReportAllocs() pkBz := make([]byte, ed25519.PubKeySize) pk := &ed25519.PubKey{Key: pkBz} rng := rand.New(rand.NewSource(time.Now().Unix())) diff --git a/types/address_test.go b/types/address_test.go index 5796c891acb0..b9bc0c3c5308 100644 --- a/types/address_test.go +++ b/types/address_test.go @@ -347,15 +347,18 @@ func (s *addressTestSuite) TestVerifyAddressFormat() { addr5 := make([]byte, 5) addr20 := make([]byte, 20) addr32 := make([]byte, 32) + addr256 := make([]byte, 256) err := types.VerifyAddressFormat(addr0) - s.Require().EqualError(err, "incorrect address length 0") + s.Require().EqualError(err, "addresses cannot be empty: unknown address") err = types.VerifyAddressFormat(addr5) - s.Require().EqualError(err, "incorrect address length 5") + s.Require().NoError(err) err = types.VerifyAddressFormat(addr20) - s.Require().Nil(err) + s.Require().NoError(err) err = types.VerifyAddressFormat(addr32) - s.Require().EqualError(err, "incorrect address length 32") + s.Require().NoError(err) + err = types.VerifyAddressFormat(addr256) + s.Require().EqualError(err, "address max length is 255, got 256: unknown address") } func (s *addressTestSuite) TestCustomAddressVerifier() { @@ -364,34 +367,39 @@ func (s *addressTestSuite) TestCustomAddressVerifier() { accBech := types.AccAddress(addr).String() valBech := types.ValAddress(addr).String() consBech := types.ConsAddress(addr).String() - // Verifiy that the default logic rejects this 10 byte address + // Verify that the default logic doesn't reject this 10 byte address + // The default verifier is nil, we're only checking address length is + // between 1-255 bytes. err := types.VerifyAddressFormat(addr) - s.Require().NotNil(err) + s.Require().Nil(err) _, err = types.AccAddressFromBech32(accBech) - s.Require().NotNil(err) + s.Require().Nil(err) _, err = types.ValAddressFromBech32(valBech) - s.Require().NotNil(err) + s.Require().Nil(err) _, err = types.ConsAddressFromBech32(consBech) - s.Require().NotNil(err) + s.Require().Nil(err) - // Set a custom address verifier that accepts 10 or 20 byte addresses + // Set a custom address verifier only accepts 20 byte addresses types.GetConfig().SetAddressVerifier(func(bz []byte) error { n := len(bz) - if n == 10 || n == types.AddrLen { + if n == 20 { return nil } return fmt.Errorf("incorrect address length %d", n) }) - // Verifiy that the custom logic accepts this 10 byte address + // Verifiy that the custom logic rejects this 10 byte address err = types.VerifyAddressFormat(addr) - s.Require().Nil(err) + s.Require().NotNil(err) _, err = types.AccAddressFromBech32(accBech) - s.Require().Nil(err) + s.Require().NotNil(err) _, err = types.ValAddressFromBech32(valBech) - s.Require().Nil(err) + s.Require().NotNil(err) _, err = types.ConsAddressFromBech32(consBech) - s.Require().Nil(err) + s.Require().NotNil(err) + + // Reinitialize the global config to default address verifier (nil) + types.GetConfig().SetAddressVerifier(nil) } func (s *addressTestSuite) TestBech32ifyAddressBytes() { diff --git a/types/coin_benchmark_test.go b/types/coin_benchmark_test.go index fc73afe87aaa..c6e040112115 100644 --- a/types/coin_benchmark_test.go +++ b/types/coin_benchmark_test.go @@ -6,10 +6,11 @@ import ( ) func coinName(suffix int) string { - return fmt.Sprintf("COINZ_%d", suffix) + return fmt.Sprintf("coinz%d", suffix) } func BenchmarkCoinsAdditionIntersect(b *testing.B) { + b.ReportAllocs() benchmarkingFunc := func(numCoinsA int, numCoinsB int) func(b *testing.B) { return func(b *testing.B) { coinsA := Coins(make([]Coin, numCoinsA)) @@ -39,6 +40,7 @@ func BenchmarkCoinsAdditionIntersect(b *testing.B) { } func BenchmarkCoinsAdditionNoIntersect(b *testing.B) { + b.ReportAllocs() benchmarkingFunc := func(numCoinsA int, numCoinsB int) func(b *testing.B) { return func(b *testing.B) { coinsA := Coins(make([]Coin, numCoinsA)) diff --git a/types/decimal_test.go b/types/decimal_test.go index ffd09afc2707..8e62275a0eba 100644 --- a/types/decimal_test.go +++ b/types/decimal_test.go @@ -487,6 +487,7 @@ func (s *decimalTestSuite) TestOperationOrders() { } func BenchmarkMarshalTo(b *testing.B) { + b.ReportAllocs() bis := []struct { in sdk.Dec want []byte diff --git a/types/query/filtered_pagination_test.go b/types/query/filtered_pagination_test.go index dbd2057da473..2622f7b8e7c8 100644 --- a/types/query/filtered_pagination_test.go +++ b/types/query/filtered_pagination_test.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/query" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -111,7 +112,7 @@ func ExampleFilteredPaginate() { pageReq := &query.PageRequest{Key: nil, Limit: 1, CountTotal: true} store := ctx.KVStore(app.GetKey(authtypes.StoreKey)) balancesStore := prefix.NewStore(store, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr1.Bytes()) + accountStore := prefix.NewStore(balancesStore, address.MustLengthPrefix(addr1)) var balResult sdk.Coins pageRes, err := query.FilteredPaginate(accountStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) { @@ -143,7 +144,7 @@ func ExampleFilteredPaginate() { func execFilterPaginate(store sdk.KVStore, pageReq *query.PageRequest, appCodec codec.Marshaler) (balances sdk.Coins, res *query.PageResponse, err error) { balancesStore := prefix.NewStore(store, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr1.Bytes()) + accountStore := prefix.NewStore(balancesStore, address.MustLengthPrefix(addr1)) var balResult sdk.Coins res, err = query.FilteredPaginate(accountStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) { diff --git a/types/query/pagination_test.go b/types/query/pagination_test.go index f0e1377a1e91..18853e97cc69 100644 --- a/types/query/pagination_test.go +++ b/types/query/pagination_test.go @@ -17,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/store" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/query" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -193,7 +194,7 @@ func ExamplePaginate() { balResult := sdk.NewCoins() authStore := ctx.KVStore(app.GetKey(authtypes.StoreKey)) balancesStore := prefix.NewStore(authStore, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr1.Bytes()) + accountStore := prefix.NewStore(balancesStore, address.MustLengthPrefix(addr1)) pageRes, err := query.Paginate(accountStore, request.Pagination, func(key []byte, value []byte) error { var tempRes sdk.Coin err := app.AppCodec().UnmarshalBinaryBare(value, &tempRes) diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 2590858b4c20..a236e900fbe5 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "strings" @@ -58,7 +57,7 @@ $ query auth params } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) + res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) if err != nil { return err } @@ -90,7 +89,7 @@ func GetAccountCmd() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Account(context.Background(), &types.QueryAccountRequest{Address: key.String()}) + res, err := queryClient.Account(cmd.Context(), &types.QueryAccountRequest{Address: key.String()}) if err != nil { return err } diff --git a/x/auth/keeper/keeper_bench_test.go b/x/auth/keeper/keeper_bench_test.go index a217eddacae3..1a18dff84557 100644 --- a/x/auth/keeper/keeper_bench_test.go +++ b/x/auth/keeper/keeper_bench_test.go @@ -7,6 +7,7 @@ import ( ) func BenchmarkAccountMapperGetAccountFound(b *testing.B) { + b.ReportAllocs() app, ctx := createTestApp(false) // assumes b.N < 2**24 diff --git a/x/auth/legacy/legacytx/stdtx_builder.go b/x/auth/legacy/legacytx/stdtx_builder.go index 153c4b2bbbc1..ae0e97a3f34c 100644 --- a/x/auth/legacy/legacytx/stdtx_builder.go +++ b/x/auth/legacy/legacytx/stdtx_builder.go @@ -84,6 +84,9 @@ func (s *StdTxBuilder) SetTimeoutHeight(height uint64) { s.TimeoutHeight = height } +// SetFeeGranter does nothing for stdtx +func (s *StdTxBuilder) SetFeeGranter(_ sdk.AccAddress) {} + // StdTxConfig is a context.TxConfig for StdTx type StdTxConfig struct { Cdc *codec.LegacyAmino diff --git a/x/authz/types/keys.go b/x/authz/types/keys.go index 3be659c5aeb8..7ee571b27f74 100644 --- a/x/authz/types/keys.go +++ b/x/authz/types/keys.go @@ -2,6 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -21,7 +22,7 @@ const ( // Keys for authz store // Items are stored with the following key: values // -// - 0x01: Grant +// - 0x01: Grant var ( // Keys for store prefixes @@ -30,12 +31,22 @@ var ( // GetAuthorizationStoreKey - return authorization store key func GetAuthorizationStoreKey(grantee sdk.AccAddress, granter sdk.AccAddress, msgType string) []byte { - return append(append(append(GrantKey, granter.Bytes()...), grantee.Bytes()...), []byte(msgType)...) + return append(append(append( + GrantKey, + address.MustLengthPrefix(granter)...), + address.MustLengthPrefix(grantee)...), + []byte(msgType)..., + ) } // ExtractAddressesFromGrantKey - split granter & grantee address from the authorization key func ExtractAddressesFromGrantKey(key []byte) (granterAddr, granteeAddr sdk.AccAddress) { - granterAddr = sdk.AccAddress(key[1 : sdk.AddrLen+1]) - granteeAddr = sdk.AccAddress(key[sdk.AddrLen+1 : sdk.AddrLen*2+1]) + // key if of format: + // 0x01 + granterAddrLen := key[1] // remove prefix key + granterAddr = sdk.AccAddress(key[2 : 2+granterAddrLen]) + granteeAddrLen := int(key[2+granterAddrLen]) + granteeAddr = sdk.AccAddress(key[3+granterAddrLen : 3+granterAddrLen+byte(granteeAddrLen)]) + return granterAddr, granteeAddr } diff --git a/x/bank/bench_test.go b/x/bank/bench_test.go index f1affb9d99b8..0648b3b62725 100644 --- a/x/bank/bench_test.go +++ b/x/bank/bench_test.go @@ -18,6 +18,7 @@ import ( var moduleAccAddr = authtypes.NewModuleAddress(stakingtypes.BondedPoolName) func BenchmarkOneBankSendTxPerBlock(b *testing.B) { + b.ReportAllocs() // Add an account at genesis acc := authtypes.BaseAccount{ Address: addr1.String(), diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index fbb9ba43825d..a192c8deba1b 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -74,11 +74,10 @@ Example: if err != nil { return err } - + ctx := cmd.Context() if denom == "" { params := types.NewQueryAllBalancesRequest(addr, pageReq) - - res, err := queryClient.AllBalances(cmd.Context(), params) + res, err := queryClient.AllBalances(ctx, params) if err != nil { return err } @@ -86,7 +85,7 @@ Example: } params := types.NewQueryBalanceRequest(addr, denom) - res, err := queryClient.Balance(cmd.Context(), params) + res, err := queryClient.Balance(ctx, params) if err != nil { return err } @@ -183,9 +182,9 @@ To query for the total supply of a specific coin denomination use: } queryClient := types.NewQueryClient(clientCtx) - + ctx := cmd.Context() if denom == "" { - res, err := queryClient.TotalSupply(cmd.Context(), &types.QueryTotalSupplyRequest{}) + res, err := queryClient.TotalSupply(ctx, &types.QueryTotalSupplyRequest{}) if err != nil { return err } @@ -193,7 +192,7 @@ To query for the total supply of a specific coin denomination use: return clientCtx.PrintProto(res) } - res, err := queryClient.SupplyOf(cmd.Context(), &types.QuerySupplyOfRequest{Denom: denom}) + res, err := queryClient.SupplyOf(ctx, &types.QuerySupplyOfRequest{Denom: denom}) if err != nil { return err } diff --git a/x/bank/client/testutil/cli_helpers.go b/x/bank/client/testutil/cli_helpers.go index 0f1b848cb755..e36f3744a6b9 100644 --- a/x/bank/client/testutil/cli_helpers.go +++ b/x/bank/client/testutil/cli_helpers.go @@ -1,7 +1,6 @@ package testutil import ( - "context" "fmt" "github.com/spf13/cobra" @@ -59,7 +58,7 @@ ignored as it is implied from [from_key_or_address].`, msg := types.NewMsgSend(clientCtx.GetFromAddress(), toAddr, coins) svcMsgClientConn := &msgservice.ServiceMsgClientConn{} bankMsgClient := types.NewMsgClient(svcMsgClientConn) - _, err = bankMsgClient.Send(context.Background(), msg) + _, err = bankMsgClient.Send(cmd.Context(), msg) if err != nil { return err } diff --git a/x/bank/keeper/grpc_query.go b/x/bank/keeper/grpc_query.go index ae00d1b8734a..b8f69ef1275b 100644 --- a/x/bank/keeper/grpc_query.go +++ b/x/bank/keeper/grpc_query.go @@ -57,9 +57,7 @@ func (k BaseKeeper) AllBalances(ctx context.Context, req *types.QueryAllBalances sdkCtx := sdk.UnwrapSDKContext(ctx) balances := sdk.NewCoins() - store := sdkCtx.KVStore(k.storeKey) - balancesStore := prefix.NewStore(store, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr.Bytes()) + accountStore := k.getAccountStore(sdkCtx, addr) pageRes, err := query.Paginate(accountStore, req.Pagination, func(_, value []byte) error { var result sdk.Coin diff --git a/x/bank/keeper/send.go b/x/bank/keeper/send.go index c1000b7d3025..694c43211e07 100644 --- a/x/bank/keeper/send.go +++ b/x/bank/keeper/send.go @@ -2,7 +2,6 @@ package keeper import ( "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/prefix" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -233,9 +232,7 @@ func (k BaseSendKeeper) ClearBalances(ctx sdk.Context, addr sdk.AccAddress) { return false }) - store := ctx.KVStore(k.storeKey) - balancesStore := prefix.NewStore(store, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr.Bytes()) + accountStore := k.getAccountStore(ctx, addr) for _, key := range keys { accountStore.Delete(key) @@ -264,9 +261,7 @@ func (k BaseSendKeeper) SetBalance(ctx sdk.Context, addr sdk.AccAddress, balance return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, balance.String()) } - store := ctx.KVStore(k.storeKey) - balancesStore := prefix.NewStore(store, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr.Bytes()) + accountStore := k.getAccountStore(ctx, addr) bz := k.cdc.MustMarshalBinaryBare(&balance) accountStore.Set([]byte(balance.Denom), bz) diff --git a/x/bank/keeper/view.go b/x/bank/keeper/view.go index d4bcabad2b62..1b50fb81d3aa 100644 --- a/x/bank/keeper/view.go +++ b/x/bank/keeper/view.go @@ -97,9 +97,7 @@ func (k BaseViewKeeper) GetAccountsBalances(ctx sdk.Context) []types.Balance { // GetBalance returns the balance of a specific denomination for a given account // by address. func (k BaseViewKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin { - store := ctx.KVStore(k.storeKey) - balancesStore := prefix.NewStore(store, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr.Bytes()) + accountStore := k.getAccountStore(ctx, addr) bz := accountStore.Get([]byte(denom)) if bz == nil { @@ -116,9 +114,7 @@ func (k BaseViewKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom s // provides the token balance to a callback. If true is returned from the // callback, iteration is halted. func (k BaseViewKeeper) IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(sdk.Coin) bool) { - store := ctx.KVStore(k.storeKey) - balancesStore := prefix.NewStore(store, types.BalancesPrefix) - accountStore := prefix.NewStore(balancesStore, addr.Bytes()) + accountStore := k.getAccountStore(ctx, addr) iterator := accountStore.Iterator(nil, nil) defer iterator.Close() @@ -214,3 +210,10 @@ func (k BaseViewKeeper) ValidateBalance(ctx sdk.Context, addr sdk.AccAddress) er return nil } + +// getAccountStore gets the account store of the given address. +func (k BaseViewKeeper) getAccountStore(ctx sdk.Context, addr sdk.AccAddress) prefix.Store { + store := ctx.KVStore(k.storeKey) + + return prefix.NewStore(store, types.CreateAccountBalancesPrefix(addr)) +} diff --git a/x/bank/types/key.go b/x/bank/types/key.go index ec8619d00185..858fd2480ac9 100644 --- a/x/bank/types/key.go +++ b/x/bank/types/key.go @@ -1,9 +1,8 @@ package types import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -22,7 +21,9 @@ const ( // KVStore keys var ( - BalancesPrefix = []byte("balances") + // BalancesPrefix is the for the account balances store. We use a byte + // (instead of say `[]]byte("balances")` to save some disk space). + BalancesPrefix = []byte{0x02} SupplyKey = []byte{0x00} DenomMetadataPrefix = []byte{0x1} ) @@ -37,10 +38,13 @@ func DenomMetadataKey(denom string) []byte { // store. The key must not contain the perfix BalancesPrefix as the prefix store // iterator discards the actual prefix. func AddressFromBalancesStore(key []byte) sdk.AccAddress { - addr := key[:sdk.AddrLen] - if len(addr) != sdk.AddrLen { - panic(fmt.Sprintf("unexpected account address key length; got: %d, expected: %d", len(addr), sdk.AddrLen)) - } + addrLen := key[0] + addr := key[1 : addrLen+1] return sdk.AccAddress(addr) } + +// CreateAccountBalancesPrefix creates the prefix for an account's balances. +func CreateAccountBalancesPrefix(addr []byte) []byte { + return append(BalancesPrefix, address.MustLengthPrefix(addr)...) +} diff --git a/x/bank/types/key_test.go b/x/bank/types/key_test.go index f3b5717fbecb..206ef8335c91 100644 --- a/x/bank/types/key_test.go +++ b/x/bank/types/key_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -19,8 +20,10 @@ func cloneAppend(bz []byte, tail []byte) (res []byte) { func TestAddressFromBalancesStore(t *testing.T) { addr, err := sdk.AccAddressFromBech32("cosmos1n88uc38xhjgxzw9nwre4ep2c8ga4fjxcar6mn7") require.NoError(t, err) + addrLen := len(addr) + require.Equal(t, 20, addrLen) - key := cloneAppend(addr.Bytes(), []byte("stake")) + key := cloneAppend(address.MustLengthPrefix(addr), []byte("stake")) res := types.AddressFromBalancesStore(key) require.Equal(t, res, addr) } diff --git a/x/bank/types/metadata.go b/x/bank/types/metadata.go index 5106964e994e..ce7794053d93 100644 --- a/x/bank/types/metadata.go +++ b/x/bank/types/metadata.go @@ -1,13 +1,19 @@ package types import ( + "errors" "fmt" "strings" sdk "github.com/cosmos/cosmos-sdk/types" ) -// Validate performs a basic validation of the coin metadata fields +// Validate performs a basic validation of the coin metadata fields. It checks: +// - Base and Display denominations are valid coin denominations +// - Base and Display denominations are present in the DenomUnit slice +// - Base denomination has exponent 0 +// - Denomination units are sorted in ascending order +// - Denomination units not duplicated func (m Metadata) Validate() error { if err := sdk.ValidateDenom(m.Base); err != nil { return fmt.Errorf("invalid metadata base denom: %w", err) @@ -17,12 +23,37 @@ func (m Metadata) Validate() error { return fmt.Errorf("invalid metadata display denom: %w", err) } + var ( + hasDisplay bool + currentExponent uint32 // check that the exponents are increasing + ) + seenUnits := make(map[string]bool) - for _, denomUnit := range m.DenomUnits { + + for i, denomUnit := range m.DenomUnits { + // The first denomination unit MUST be the base + if i == 0 { + // validate denomination and exponent + if denomUnit.Denom != m.Base { + return fmt.Errorf("metadata's first denomination unit must be the one with base denom '%s'", m.Base) + } + if denomUnit.Exponent != 0 { + return fmt.Errorf("the exponent for base denomination unit %s must be 0", m.Base) + } + } else if currentExponent >= denomUnit.Exponent { + return errors.New("denom units should be sorted asc by exponent") + } + + currentExponent = denomUnit.Exponent + if seenUnits[denomUnit.Denom] { return fmt.Errorf("duplicate denomination unit %s", denomUnit.Denom) } + if denomUnit.Denom == m.Display { + hasDisplay = true + } + if err := denomUnit.Validate(); err != nil { return err } @@ -30,6 +61,10 @@ func (m Metadata) Validate() error { seenUnits[denomUnit.Denom] = true } + if !hasDisplay { + return fmt.Errorf("metadata must contain a denomination unit with display denom '%s'", m.Display) + } + return nil } diff --git a/x/bank/types/metadata_test.go b/x/bank/types/metadata_test.go index 29f4d220f95f..64241e6098e0 100644 --- a/x/bank/types/metadata_test.go +++ b/x/bank/types/metadata_test.go @@ -51,7 +51,7 @@ func TestMetadataValidate(t *testing.T) { Description: "The native staking token of the Cosmos Hub.", DenomUnits: []*types.DenomUnit{ {"uatom", uint32(0), []string{"microatom"}}, - {"uatom", uint32(0), []string{"microatom"}}, + {"uatom", uint32(1), []string{"microatom"}}, }, Base: "uatom", Display: "atom", @@ -94,6 +94,59 @@ func TestMetadataValidate(t *testing.T) { }, true, }, + { + "no base denom unit", + types.Metadata{ + Description: "The native staking token of the Cosmos Hub.", + DenomUnits: []*types.DenomUnit{ + {"matom", uint32(3), []string{"milliatom"}}, + {"atom", uint32(6), nil}, + }, + Base: "uatom", + Display: "atom", + }, + true, + }, + { + "base denom exponent not zero", + types.Metadata{ + Description: "The native staking token of the Cosmos Hub.", + DenomUnits: []*types.DenomUnit{ + {"uatom", uint32(1), []string{"microatom"}}, + {"matom", uint32(3), []string{"milliatom"}}, + {"atom", uint32(6), nil}, + }, + Base: "uatom", + Display: "atom", + }, + true, + }, + { + "no display denom unit", + types.Metadata{ + Description: "The native staking token of the Cosmos Hub.", + DenomUnits: []*types.DenomUnit{ + {"uatom", uint32(0), []string{"microatom"}}, + }, + Base: "uatom", + Display: "atom", + }, + true, + }, + { + "denom units not sorted", + types.Metadata{ + Description: "The native staking token of the Cosmos Hub.", + DenomUnits: []*types.DenomUnit{ + {"uatom", uint32(0), []string{"microatom"}}, + {"atom", uint32(6), nil}, + {"matom", uint32(3), []string{"milliatom"}}, + }, + Base: "uatom", + Display: "atom", + }, + true, + }, } for _, tc := range testCases { diff --git a/x/bank/types/msgs_test.go b/x/bank/types/msgs_test.go index 96132150ad4f..334d72c13243 100644 --- a/x/bank/types/msgs_test.go +++ b/x/bank/types/msgs_test.go @@ -23,7 +23,7 @@ func TestMsgSendValidation(t *testing.T) { addr1 := sdk.AccAddress([]byte("from________________")) addr2 := sdk.AccAddress([]byte("to__________________")) addrEmpty := sdk.AccAddress([]byte("")) - addrTooLong := sdk.AccAddress([]byte("Accidentally used 33 bytes pubkey")) + addrLong := sdk.AccAddress([]byte("Purposefully long address")) atom123 := sdk.NewCoins(sdk.NewInt64Coin("atom", 123)) atom0 := sdk.NewCoins(sdk.NewInt64Coin("atom", 0)) @@ -36,12 +36,12 @@ func TestMsgSendValidation(t *testing.T) { }{ {"", NewMsgSend(addr1, addr2, atom123)}, // valid send {"", NewMsgSend(addr1, addr2, atom123eth123)}, // valid send with multiple coins + {"", NewMsgSend(addrLong, addr2, atom123)}, // valid send with long addr sender + {"", NewMsgSend(addr1, addrLong, atom123)}, // valid send with long addr recipient {": invalid coins", NewMsgSend(addr1, addr2, atom0)}, // non positive coin {"123atom,0eth: invalid coins", NewMsgSend(addr1, addr2, atom123eth0)}, // non positive coin in multicoins {"Invalid sender address (empty address string is not allowed): invalid address", NewMsgSend(addrEmpty, addr2, atom123)}, - {"Invalid sender address (incorrect address length (expected: 20, actual: 33)): invalid address", NewMsgSend(addrTooLong, addr2, atom123)}, {"Invalid recipient address (empty address string is not allowed): invalid address", NewMsgSend(addr1, addrEmpty, atom123)}, - {"Invalid recipient address (incorrect address length (expected: 20, actual: 33)): invalid address", NewMsgSend(addr1, addrTooLong, atom123)}, } for _, tc := range cases { @@ -91,7 +91,7 @@ func TestInputValidation(t *testing.T) { addr1 := sdk.AccAddress([]byte("_______alice________")) addr2 := sdk.AccAddress([]byte("________bob_________")) addrEmpty := sdk.AccAddress([]byte("")) - addrTooLong := sdk.AccAddress([]byte("Accidentally used 33 bytes pubkey")) + addrLong := sdk.AccAddress([]byte("Purposefully long address")) someCoins := sdk.NewCoins(sdk.NewInt64Coin("atom", 123)) multiCoins := sdk.NewCoins(sdk.NewInt64Coin("atom", 123), sdk.NewInt64Coin("eth", 20)) @@ -109,9 +109,9 @@ func TestInputValidation(t *testing.T) { {"", NewInput(addr1, someCoins)}, {"", NewInput(addr2, someCoins)}, {"", NewInput(addr2, multiCoins)}, + {"", NewInput(addrLong, someCoins)}, {"empty address string is not allowed", NewInput(addrEmpty, someCoins)}, - {"incorrect address length (expected: 20, actual: 33)", NewInput(addrTooLong, someCoins)}, {": invalid coins", NewInput(addr1, emptyCoins)}, // invalid coins {": invalid coins", NewInput(addr1, emptyCoins2)}, // invalid coins {"10eth,0atom: invalid coins", NewInput(addr1, someEmptyCoins)}, // invalid coins @@ -132,7 +132,7 @@ func TestOutputValidation(t *testing.T) { addr1 := sdk.AccAddress([]byte("_______alice________")) addr2 := sdk.AccAddress([]byte("________bob_________")) addrEmpty := sdk.AccAddress([]byte("")) - addrTooLong := sdk.AccAddress([]byte("Accidentally used 33 bytes pubkey")) + addrLong := sdk.AccAddress([]byte("Purposefully long address")) someCoins := sdk.NewCoins(sdk.NewInt64Coin("atom", 123)) multiCoins := sdk.NewCoins(sdk.NewInt64Coin("atom", 123), sdk.NewInt64Coin("eth", 20)) @@ -150,9 +150,9 @@ func TestOutputValidation(t *testing.T) { {"", NewOutput(addr1, someCoins)}, {"", NewOutput(addr2, someCoins)}, {"", NewOutput(addr2, multiCoins)}, + {"", NewOutput(addrLong, someCoins)}, {"Invalid output address (empty address string is not allowed): invalid address", NewOutput(addrEmpty, someCoins)}, - {"Invalid output address (incorrect address length (expected: 20, actual: 33)): invalid address", NewOutput(addrTooLong, someCoins)}, {": invalid coins", NewOutput(addr1, emptyCoins)}, // invalid coins {": invalid coins", NewOutput(addr1, emptyCoins2)}, // invalid coins {"10eth,0atom: invalid coins", NewOutput(addr1, someEmptyCoins)}, // invalid coins @@ -251,8 +251,6 @@ func TestMsgMultiSendGetSigners(t *testing.T) { require.Equal(t, "[696E707574313131313131313131313131313131 696E707574323232323232323232323232323232 696E707574333333333333333333333333333333]", fmt.Sprintf("%v", res)) } -/* -// what to do w/ this test? func TestMsgSendSigners(t *testing.T) { signers := []sdk.AccAddress{ {1, 2, 3}, @@ -265,8 +263,7 @@ func TestMsgSendSigners(t *testing.T) { for i, signer := range signers { inputs[i] = NewInput(signer, someCoins) } - tx := NewMsgSend(inputs, nil) + tx := NewMsgMultiSend(inputs, nil) - require.Equal(t, signers, tx.Signers()) + require.Equal(t, signers, tx.GetSigners()) } -*/ diff --git a/x/distribution/client/cli/query.go b/x/distribution/client/cli/query.go index 3b6032ce7b99..aa087f5f8b27 100644 --- a/x/distribution/client/cli/query.go +++ b/x/distribution/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "strconv" "strings" @@ -50,7 +49,7 @@ func GetCmdQueryParams() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) + res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) if err != nil { return err } @@ -94,7 +93,7 @@ $ %s query distribution validator-outstanding-rewards %s1lwjmdnks33xwnmfayc64ycp } res, err := queryClient.ValidatorOutstandingRewards( - context.Background(), + cmd.Context(), &types.QueryValidatorOutstandingRewardsRequest{ValidatorAddress: validatorAddr.String()}, ) if err != nil { @@ -139,7 +138,7 @@ $ %s query distribution commission %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj } res, err := queryClient.ValidatorCommission( - context.Background(), + cmd.Context(), &types.QueryValidatorCommissionRequest{ValidatorAddress: validatorAddr.String()}, ) if err != nil { @@ -199,7 +198,7 @@ $ %s query distribution slashes %svaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj } res, err := queryClient.ValidatorSlashes( - context.Background(), + cmd.Context(), &types.QueryValidatorSlashesRequest{ ValidatorAddress: validatorAddr.String(), StartingHeight: startHeight, @@ -252,6 +251,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh } // query for rewards from a particular delegation + ctx := cmd.Context() if len(args) == 2 { validatorAddr, err := sdk.ValAddressFromBech32(args[1]) if err != nil { @@ -259,7 +259,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh } res, err := queryClient.DelegationRewards( - context.Background(), + ctx, &types.QueryDelegationRewardsRequest{DelegatorAddress: delegatorAddr.String(), ValidatorAddress: validatorAddr.String()}, ) if err != nil { @@ -270,7 +270,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh } res, err := queryClient.DelegationTotalRewards( - context.Background(), + ctx, &types.QueryDelegationTotalRewardsRequest{DelegatorAddress: delegatorAddr.String()}, ) if err != nil { @@ -307,7 +307,7 @@ $ %s query distribution community-pool } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.CommunityPool(context.Background(), &types.QueryCommunityPoolRequest{}) + res, err := queryClient.CommunityPool(cmd.Context(), &types.QueryCommunityPoolRequest{}) if err != nil { return err } diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index d62bcd21fa07..dcf5a3b057ad 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "strings" @@ -155,7 +154,7 @@ $ %s tx distribution withdraw-all-rewards --from mykey } queryClient := types.NewQueryClient(clientCtx) - delValsRes, err := queryClient.DelegatorValidators(context.Background(), &types.QueryDelegatorValidatorsRequest{DelegatorAddress: delAddr.String()}) + delValsRes, err := queryClient.DelegatorValidators(cmd.Context(), &types.QueryDelegatorValidatorsRequest{DelegatorAddress: delAddr.String()}) if err != nil { return err } diff --git a/x/distribution/types/keys.go b/x/distribution/types/keys.go index 12fe9b17b9ff..4f0f37f82303 100644 --- a/x/distribution/types/keys.go +++ b/x/distribution/types/keys.go @@ -4,6 +4,7 @@ import ( "encoding/binary" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -27,19 +28,19 @@ const ( // // - 0x01: sdk.ConsAddress // -// - 0x02: ValidatorOutstandingRewards +// - 0x02: ValidatorOutstandingRewards // -// - 0x03: sdk.AccAddress +// - 0x03: sdk.AccAddress // -// - 0x04: DelegatorStartingInfo +// - 0x04: DelegatorStartingInfo // -// - 0x05: ValidatorHistoricalRewards +// - 0x05: ValidatorHistoricalRewards // -// - 0x06: ValidatorCurrentRewards +// - 0x06: ValidatorCurrentRewards // -// - 0x07: ValidatorCurrentRewards +// - 0x07: ValidatorCurrentRewards // -// - 0x08: ValidatorSlashEvent +// - 0x08: ValidatorSlashEvent var ( FeePoolKey = []byte{0x00} // key for global distribution state ProposerKey = []byte{0x01} // key for the proposer operator address @@ -53,47 +54,56 @@ var ( ValidatorSlashEventPrefix = []byte{0x08} // key for validator slash fraction ) -// gets an address from a validator's outstanding rewards key +// GetValidatorOutstandingRewardsAddress creates an address from a validator's outstanding rewards key. func GetValidatorOutstandingRewardsAddress(key []byte) (valAddr sdk.ValAddress) { - addr := key[1:] - if len(addr) != sdk.AddrLen { + // key is in the format: + // 0x02 + + // Remove prefix and address length. + addr := key[2:] + if len(addr) != int(key[1]) { panic("unexpected key length") } + return sdk.ValAddress(addr) } -// gets an address from a delegator's withdraw info key +// GetDelegatorWithdrawInfoAddress creates an address from a delegator's withdraw info key. func GetDelegatorWithdrawInfoAddress(key []byte) (delAddr sdk.AccAddress) { - addr := key[1:] - if len(addr) != sdk.AddrLen { + // key is in the format: + // 0x03 + + // Remove prefix and address length. + addr := key[2:] + if len(addr) != int(key[1]) { panic("unexpected key length") } + return sdk.AccAddress(addr) } -// gets the addresses from a delegator starting info key +// GetDelegatorStartingInfoAddresses creates the addresses from a delegator starting info key. func GetDelegatorStartingInfoAddresses(key []byte) (valAddr sdk.ValAddress, delAddr sdk.AccAddress) { - addr := key[1 : 1+sdk.AddrLen] - if len(addr) != sdk.AddrLen { + // key is in the format: + // 0x04 + valAddrLen := int(key[1]) + valAddr = sdk.ValAddress(key[2 : 2+valAddrLen]) + delAddrLen := int(key[2+valAddrLen]) + delAddr = sdk.AccAddress(key[3+valAddrLen:]) + if len(delAddr.Bytes()) != delAddrLen { panic("unexpected key length") } - valAddr = sdk.ValAddress(addr) - addr = key[1+sdk.AddrLen:] - if len(addr) != sdk.AddrLen { - panic("unexpected key length") - } - delAddr = sdk.AccAddress(addr) + return } -// gets the address & period from a validator's historical rewards key +// GetValidatorHistoricalRewardsAddressPeriod creates the address & period from a validator's historical rewards key. func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddress, period uint64) { - addr := key[1 : 1+sdk.AddrLen] - if len(addr) != sdk.AddrLen { - panic("unexpected key length") - } - valAddr = sdk.ValAddress(addr) - b := key[1+sdk.AddrLen:] + // key is in the format: + // 0x05 + valAddrLen := int(key[1]) + valAddr = sdk.ValAddress(key[2 : 2+valAddrLen]) + b := key[2+valAddrLen:] if len(b) != 8 { panic("unexpected key length") } @@ -101,93 +111,104 @@ func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddr return } -// gets the address from a validator's current rewards key +// GetValidatorCurrentRewardsAddress creates the address from a validator's current rewards key. func GetValidatorCurrentRewardsAddress(key []byte) (valAddr sdk.ValAddress) { - addr := key[1:] - if len(addr) != sdk.AddrLen { + // key is in the format: + // 0x06: ValidatorCurrentRewards + + // Remove prefix and address length. + addr := key[2:] + if len(addr) != int(key[1]) { panic("unexpected key length") } + return sdk.ValAddress(addr) } -// gets the address from a validator's accumulated commission key +// GetValidatorAccumulatedCommissionAddress creates the address from a validator's accumulated commission key. func GetValidatorAccumulatedCommissionAddress(key []byte) (valAddr sdk.ValAddress) { - addr := key[1:] - if len(addr) != sdk.AddrLen { + // key is in the format: + // 0x07: ValidatorCurrentRewards + + // Remove prefix and address length. + addr := key[2:] + if len(addr) != int(key[1]) { panic("unexpected key length") } + return sdk.ValAddress(addr) } -// gets the height from a validator's slash event key +// GetValidatorSlashEventAddressHeight creates the height from a validator's slash event key. func GetValidatorSlashEventAddressHeight(key []byte) (valAddr sdk.ValAddress, height uint64) { - addr := key[1 : 1+sdk.AddrLen] - if len(addr) != sdk.AddrLen { - panic("unexpected key length") - } - valAddr = sdk.ValAddress(addr) - startB := 1 + sdk.AddrLen + // key is in the format: + // 0x08: ValidatorSlashEvent + valAddrLen := int(key[1]) + valAddr = key[2 : 2+valAddrLen] + startB := 2 + valAddrLen b := key[startB : startB+8] // the next 8 bytes represent the height height = binary.BigEndian.Uint64(b) return } -// gets the outstanding rewards key for a validator +// GetValidatorOutstandingRewardsKey creates the outstanding rewards key for a validator. func GetValidatorOutstandingRewardsKey(valAddr sdk.ValAddress) []byte { - return append(ValidatorOutstandingRewardsPrefix, valAddr.Bytes()...) + return append(ValidatorOutstandingRewardsPrefix, address.MustLengthPrefix(valAddr.Bytes())...) } -// gets the key for a delegator's withdraw addr +// GetDelegatorWithdrawAddrKey creates the key for a delegator's withdraw addr. func GetDelegatorWithdrawAddrKey(delAddr sdk.AccAddress) []byte { - return append(DelegatorWithdrawAddrPrefix, delAddr.Bytes()...) + return append(DelegatorWithdrawAddrPrefix, address.MustLengthPrefix(delAddr.Bytes())...) } -// gets the key for a delegator's starting info +// GetDelegatorStartingInfoKey creates the key for a delegator's starting info. func GetDelegatorStartingInfoKey(v sdk.ValAddress, d sdk.AccAddress) []byte { - return append(append(DelegatorStartingInfoPrefix, v.Bytes()...), d.Bytes()...) + return append(append(DelegatorStartingInfoPrefix, address.MustLengthPrefix(v.Bytes())...), address.MustLengthPrefix(d.Bytes())...) } -// gets the prefix key for a validator's historical rewards +// GetValidatorHistoricalRewardsPrefix creates the prefix key for a validator's historical rewards. func GetValidatorHistoricalRewardsPrefix(v sdk.ValAddress) []byte { - return append(ValidatorHistoricalRewardsPrefix, v.Bytes()...) + return append(ValidatorHistoricalRewardsPrefix, address.MustLengthPrefix(v.Bytes())...) } -// gets the key for a validator's historical rewards +// GetValidatorHistoricalRewardsKey creates the key for a validator's historical rewards. func GetValidatorHistoricalRewardsKey(v sdk.ValAddress, k uint64) []byte { b := make([]byte, 8) binary.LittleEndian.PutUint64(b, k) - return append(append(ValidatorHistoricalRewardsPrefix, v.Bytes()...), b...) + return append(append(ValidatorHistoricalRewardsPrefix, address.MustLengthPrefix(v.Bytes())...), b...) } -// gets the key for a validator's current rewards +// GetValidatorCurrentRewardsKey creates the key for a validator's current rewards. func GetValidatorCurrentRewardsKey(v sdk.ValAddress) []byte { - return append(ValidatorCurrentRewardsPrefix, v.Bytes()...) + return append(ValidatorCurrentRewardsPrefix, address.MustLengthPrefix(v.Bytes())...) } -// gets the key for a validator's current commission +// GetValidatorAccumulatedCommissionKey creates the key for a validator's current commission. func GetValidatorAccumulatedCommissionKey(v sdk.ValAddress) []byte { - return append(ValidatorAccumulatedCommissionPrefix, v.Bytes()...) + return append(ValidatorAccumulatedCommissionPrefix, address.MustLengthPrefix(v.Bytes())...) } -// gets the prefix key for a validator's slash fractions +// GetValidatorSlashEventPrefix creates the prefix key for a validator's slash fractions. func GetValidatorSlashEventPrefix(v sdk.ValAddress) []byte { - return append(ValidatorSlashEventPrefix, v.Bytes()...) + return append(ValidatorSlashEventPrefix, address.MustLengthPrefix(v.Bytes())...) } -// gets the prefix key for a validator's slash fraction (ValidatorSlashEventPrefix + height) +// GetValidatorSlashEventKeyPrefix creates the prefix key for a validator's slash fraction (ValidatorSlashEventPrefix + height). func GetValidatorSlashEventKeyPrefix(v sdk.ValAddress, height uint64) []byte { heightBz := make([]byte, 8) binary.BigEndian.PutUint64(heightBz, height) + return append( ValidatorSlashEventPrefix, - append(v.Bytes(), heightBz...)..., + append(address.MustLengthPrefix(v.Bytes()), heightBz...)..., ) } -// gets the key for a validator's slash fraction +// GetValidatorSlashEventKey creates the key for a validator's slash fraction. func GetValidatorSlashEventKey(v sdk.ValAddress, height, period uint64) []byte { periodBz := make([]byte, 8) binary.BigEndian.PutUint64(periodBz, period) prefix := GetValidatorSlashEventKeyPrefix(v, height) + return append(prefix, periodBz...) } diff --git a/x/evidence/types/evidence.go b/x/evidence/types/evidence.go index 95705cc5b937..fca6126ec36f 100644 --- a/x/evidence/types/evidence.go +++ b/x/evidence/types/evidence.go @@ -88,7 +88,8 @@ func (e Equivocation) GetTotalPower() int64 { return 0 } // FromABCIEvidence converts a Tendermint concrete Evidence type to // SDK Evidence using Equivocation as the concrete type. func FromABCIEvidence(e abci.Evidence) exported.Evidence { - consAddr, err := sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixConsAddr, e.Validator.Address) + bech32PrefixConsAddr := sdk.GetConfig().GetBech32ConsensusAddrPrefix() + consAddr, err := sdk.Bech32ifyAddressBytes(bech32PrefixConsAddr, e.Validator.Address) if err != nil { panic(err) } diff --git a/x/evidence/types/evidence_test.go b/x/evidence/types/evidence_test.go index 07b9352f574d..c78f0b059cc9 100644 --- a/x/evidence/types/evidence_test.go +++ b/x/evidence/types/evidence_test.go @@ -5,6 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/evidence/types" @@ -57,3 +58,22 @@ func TestEquivocationValidateBasic(t *testing.T) { }) } } + +func TestEvidenceAddressConversion(t *testing.T) { + sdk.GetConfig().SetBech32PrefixForConsensusNode("testcnclcons", "testcnclconspub") + tmEvidence := abci.Evidence{ + Type: abci.EvidenceType_DUPLICATE_VOTE, + Validator: abci.Validator{ + Address: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + Power: 100, + }, + Height: 1, + Time: time.Now(), + TotalVotingPower: 100, + } + evidence := types.FromABCIEvidence(tmEvidence).(*types.Equivocation) + consAddr := evidence.GetConsensusAddress() + // Check the address is the same after conversion + require.Equal(t, tmEvidence.Validator.Address, consAddr.Bytes()) + sdk.GetConfig().SetBech32PrefixForConsensusNode(sdk.Bech32PrefixConsAddr, sdk.Bech32PrefixConsPub) +} diff --git a/x/feegrant/ante/ante.go b/x/feegrant/ante/ante.go new file mode 100644 index 000000000000..483868c23e16 --- /dev/null +++ b/x/feegrant/ante/ante.go @@ -0,0 +1,35 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/signing" + feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// NewAnteHandler returns an AnteHandler that checks and increments sequence +// numbers, checks signatures & account numbers, and deducts fees from the +// fee_payer or from fee_granter (if valid grant exist). +func NewAnteHandler( + ak authkeeper.AccountKeeper, bankKeeper feegranttypes.BankKeeper, feeGrantKeeper feegrantkeeper.Keeper, + sigGasConsumer authante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler, +) sdk.AnteHandler { + + return sdk.ChainAnteDecorators( + authante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first + authante.NewRejectExtensionOptionsDecorator(), + authante.NewMempoolFeeDecorator(), + authante.NewValidateBasicDecorator(), + authante.TxTimeoutHeightDecorator{}, + authante.NewValidateMemoDecorator(ak), + authante.NewConsumeGasForTxSizeDecorator(ak), + NewDeductGrantedFeeDecorator(ak, bankKeeper, feeGrantKeeper), + authante.NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators + authante.NewValidateSigCountDecorator(ak), + authante.NewSigGasConsumeDecorator(ak, sigGasConsumer), + authante.NewSigVerificationDecorator(ak, signModeHandler), + authante.NewIncrementSequenceDecorator(ak), // innermost AnteDecorator + ) +} diff --git a/x/feegrant/ante/fee.go b/x/feegrant/ante/fee.go new file mode 100644 index 000000000000..52cbda7210eb --- /dev/null +++ b/x/feegrant/ante/fee.go @@ -0,0 +1,82 @@ +package ante + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// DeductGrantedFeeDecorator deducts fees from fee_payer or fee_granter (if exists a valid fee allowance) of the tx +// If the fee_payer or fee_granter does not have the funds to pay for the fees, return with InsufficientFunds error +// Call next AnteHandler if fees successfully deducted +// CONTRACT: Tx must implement GrantedFeeTx interface to use DeductGrantedFeeDecorator +type DeductGrantedFeeDecorator struct { + ak types.AccountKeeper + k keeper.Keeper + bk types.BankKeeper +} + +func NewDeductGrantedFeeDecorator(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) DeductGrantedFeeDecorator { + return DeductGrantedFeeDecorator{ + ak: ak, + k: k, + bk: bk, + } +} + +// AnteHandle performs a decorated ante-handler responsible for deducting transaction +// fees. Fees will be deducted from the account designated by the FeePayer on a +// transaction by default. However, if the fee payer differs from the transaction +// signer, the handler will check if a fee grant has been authorized. If the +// transaction's signer does not exist, it will be created. +func (d DeductGrantedFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + feeTx, ok := tx.(sdk.FeeTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a GrantedFeeTx") + } + + // sanity check from DeductFeeDecorator + if addr := d.ak.GetModuleAddress(authtypes.FeeCollectorName); addr == nil { + panic(fmt.Sprintf("%s module account has not been set", authtypes.FeeCollectorName)) + } + + fee := feeTx.GetFee() + feePayer := feeTx.FeePayer() + feeGranter := feeTx.FeeGranter() + + deductFeesFrom := feePayer + + // ensure the grant is allowed, if we request a different fee payer + if feeGranter != nil && !feeGranter.Equals(feePayer) { + err := d.k.UseGrantedFees(ctx, feeGranter, feePayer, fee) + if err != nil { + return ctx, sdkerrors.Wrapf(err, "%s not allowed to pay fees from %s", feeGranter, feePayer) + } + + deductFeesFrom = feeGranter + } + + // now, either way, we know that we are authorized to deduct the fees from the deductFeesFrom account + deductFeesFromAcc := d.ak.GetAccount(ctx, deductFeesFrom) + if deductFeesFromAcc == nil { + return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "fee payer address: %s does not exist", deductFeesFrom) + } + + // move on if there is no fee to deduct + if fee.IsZero() { + return next(ctx, tx, simulate) + } + + // deduct fee if non-zero + err = authante.DeductFees(d.bk, ctx, deductFeesFromAcc, fee) + if err != nil { + return ctx, err + } + + return next(ctx, tx, simulate) +} diff --git a/x/feegrant/ante/fee_test.go b/x/feegrant/ante/fee_test.go new file mode 100644 index 000000000000..293f448d73f8 --- /dev/null +++ b/x/feegrant/ante/fee_test.go @@ -0,0 +1,287 @@ +package ante_test + +import ( + "math/rand" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/stretchr/testify/suite" + "github.com/tendermint/tendermint/crypto" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/simapp/helpers" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/ante" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// AnteTestSuite is a test suite to be used with ante handler tests. +type AnteTestSuite struct { + suite.Suite + + app *simapp.SimApp + anteHandler sdk.AnteHandler + ctx sdk.Context + clientCtx client.Context + txBuilder client.TxBuilder +} + +// SetupTest setups a new test, with new app, context, and anteHandler. +func (suite *AnteTestSuite) SetupTest(isCheckTx bool) { + suite.app, suite.ctx = createTestApp(isCheckTx) + suite.ctx = suite.ctx.WithBlockHeight(1) + + // Set up TxConfig. + encodingConfig := simapp.MakeTestEncodingConfig() + // We're using TestMsg encoding in some tests, so register it here. + encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) + testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry) + + suite.clientCtx = client.Context{}. + WithTxConfig(encodingConfig.TxConfig) + + suite.anteHandler = ante.NewAnteHandler(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.FeeGrantKeeper, authante.DefaultSigVerificationGasConsumer, encodingConfig.TxConfig.SignModeHandler()) +} + +func (suite *AnteTestSuite) TestDeductFeesNoDelegation() { + suite.SetupTest(true) + // setup + app, ctx := suite.app, suite.ctx + + protoTxCfg := tx.NewTxConfig(codec.NewProtoCodec(app.InterfaceRegistry()), tx.DefaultSignModes) + + // this just tests our handler + dfd := ante.NewDeductGrantedFeeDecorator(app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper) + ourAnteHandler := sdk.ChainAnteDecorators(dfd) + + // this tests the whole stack + anteHandlerStack := suite.anteHandler + + // keys and addresses + priv1, _, addr1 := testdata.KeyTestPubAddr() + priv2, _, addr2 := testdata.KeyTestPubAddr() + priv3, _, addr3 := testdata.KeyTestPubAddr() + priv4, _, addr4 := testdata.KeyTestPubAddr() + priv5, _, addr5 := testdata.KeyTestPubAddr() + + // Set addr1 with insufficient funds + acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) + app.AccountKeeper.SetAccount(ctx, acc1) + app.BankKeeper.SetBalances(ctx, addr1, []sdk.Coin{sdk.NewCoin("atom", sdk.NewInt(10))}) + + // Set addr2 with more funds + acc2 := app.AccountKeeper.NewAccountWithAddress(ctx, addr2) + app.AccountKeeper.SetAccount(ctx, acc2) + app.BankKeeper.SetBalances(ctx, addr2, []sdk.Coin{sdk.NewCoin("atom", sdk.NewInt(99999))}) + + // grant fee allowance from `addr2` to `addr3` (plenty to pay) + err := app.FeeGrantKeeper.GrantFeeAllowance(ctx, addr2, addr3, &types.BasicFeeAllowance{ + SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 500)), + }) + suite.Require().NoError(err) + + // grant low fee allowance (20atom), to check the tx requesting more than allowed. + err = app.FeeGrantKeeper.GrantFeeAllowance(ctx, addr2, addr4, &types.BasicFeeAllowance{ + SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 20)), + }) + suite.Require().NoError(err) + + cases := map[string]struct { + signerKey cryptotypes.PrivKey + signer sdk.AccAddress + feeAccount sdk.AccAddress + feeAccountKey cryptotypes.PrivKey + handler sdk.AnteHandler + fee int64 + valid bool + }{ + "paying with low funds (only ours)": { + signerKey: priv1, + signer: addr1, + fee: 50, + handler: ourAnteHandler, + valid: false, + }, + "paying with good funds (only ours)": { + signerKey: priv2, + signer: addr2, + fee: 50, + handler: ourAnteHandler, + valid: true, + }, + "paying with no account (only ours)": { + signerKey: priv3, + signer: addr3, + fee: 1, + handler: ourAnteHandler, + valid: false, + }, + "no fee with real account (only ours)": { + signerKey: priv1, + signer: addr1, + fee: 0, + handler: ourAnteHandler, + valid: true, + }, + "no fee with no account (only ours)": { + signerKey: priv5, + signer: addr5, + fee: 0, + handler: ourAnteHandler, + valid: false, + }, + "valid fee grant without account (only ours)": { + signerKey: priv3, + signer: addr3, + feeAccount: addr2, + fee: 50, + handler: ourAnteHandler, + valid: true, + }, + "no fee grant (only ours)": { + signerKey: priv3, + signer: addr3, + feeAccount: addr1, + fee: 2, + handler: ourAnteHandler, + valid: false, + }, + "allowance smaller than requested fee (only ours)": { + signerKey: priv4, + signer: addr4, + feeAccount: addr2, + fee: 50, + handler: ourAnteHandler, + valid: false, + }, + "granter cannot cover allowed fee grant (only ours)": { + signerKey: priv4, + signer: addr4, + feeAccount: addr1, + fee: 50, + handler: ourAnteHandler, + valid: false, + }, + } + + for name, stc := range cases { + tc := stc // to make scopelint happy + suite.T().Run(name, func(t *testing.T) { + fee := sdk.NewCoins(sdk.NewInt64Coin("atom", tc.fee)) + msgs := []sdk.Msg{testdata.NewTestMsg(tc.signer)} + + acc := app.AccountKeeper.GetAccount(ctx, tc.signer) + privs, accNums, seqs := []cryptotypes.PrivKey{tc.signerKey}, []uint64{0}, []uint64{0} + if acc != nil { + accNums, seqs = []uint64{acc.GetAccountNumber()}, []uint64{acc.GetSequence()} + } + + tx, err := genTxWithFeeGranter(protoTxCfg, msgs, fee, helpers.DefaultGenTxGas, ctx.ChainID(), accNums, seqs, tc.feeAccount, privs...) + suite.Require().NoError(err) + _, err = ourAnteHandler(ctx, tx, false) + if tc.valid { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + + _, err = anteHandlerStack(ctx, tx, false) + if tc.valid { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} + +// returns context and app with params set on account keeper +func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { + app := simapp.Setup(isCheckTx) + ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{}) + app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) + + return app, ctx +} + +// don't consume any gas +func SigGasNoConsumer(meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params authtypes.Params) error { + return nil +} + +func genTxWithFeeGranter(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, + accSeqs []uint64, feeGranter sdk.AccAddress, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { + sigs := make([]signing.SignatureV2, len(priv)) + + // create a random length memo + r := rand.New(rand.NewSource(time.Now().UnixNano())) + + memo := simulation.RandStringOfLength(r, simulation.RandIntBetween(r, 0, 100)) + + signMode := gen.SignModeHandler().DefaultMode() + + // 1st round: set SignatureV2 with empty signatures, to set correct + // signer infos. + for i, p := range priv { + sigs[i] = signing.SignatureV2{ + PubKey: p.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: signMode, + }, + Sequence: accSeqs[i], + } + } + + tx := gen.NewTxBuilder() + err := tx.SetMsgs(msgs...) + if err != nil { + return nil, err + } + err = tx.SetSignatures(sigs...) + if err != nil { + return nil, err + } + tx.SetMemo(memo) + tx.SetFeeAmount(feeAmt) + tx.SetGasLimit(gas) + tx.SetFeeGranter(feeGranter) + + // 2nd round: once all signer infos are set, every signer can sign. + for i, p := range priv { + signerData := authsign.SignerData{ + ChainID: chainID, + AccountNumber: accNums[i], + Sequence: accSeqs[i], + } + signBytes, err := gen.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx()) + if err != nil { + panic(err) + } + sig, err := p.Sign(signBytes) + if err != nil { + panic(err) + } + sigs[i].Data.(*signing.SingleSignatureData).Signature = sig + err = tx.SetSignatures(sigs...) + if err != nil { + panic(err) + } + } + + return tx.GetTx(), nil +} + +func TestAnteTestSuite(t *testing.T) { + suite.Run(t, new(AnteTestSuite)) +} diff --git a/x/feegrant/client/cli/cli_test.go b/x/feegrant/client/cli/cli_test.go new file mode 100644 index 000000000000..224e7282a80a --- /dev/null +++ b/x/feegrant/client/cli/cli_test.go @@ -0,0 +1,621 @@ +// +build norace + +package cli_test + +import ( + "fmt" + "testing" + + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/client/cli" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + govtestutil "github.com/cosmos/cosmos-sdk/x/gov/client/testutil" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/gogo/protobuf/proto" + "github.com/stretchr/testify/suite" + tmcli "github.com/tendermint/tendermint/libs/cli" +) + +type IntegrationTestSuite struct { + suite.Suite + + cfg network.Config + network *network.Network + addedGranter sdk.AccAddress + addedGrantee sdk.AccAddress + addedGrant types.FeeAllowanceGrant +} + +func (s *IntegrationTestSuite) SetupSuite() { + s.T().Log("setting up integration test suite") + + if testing.Short() { + s.T().Skip("skipping test in unit-tests mode.") + } + + cfg := network.DefaultConfig() + cfg.NumValidators = 2 + + s.cfg = cfg + s.network = network.New(s.T(), cfg) + + _, err := s.network.WaitForHeight(1) + s.Require().NoError(err) + + val := s.network.Validators[0] + granter := val.Address + grantee := s.network.Validators[1].Address + + clientCtx := val.ClientCtx + commonFlags := []string{ + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + fee := sdk.NewCoin("stake", sdk.NewInt(100)) + duration := 365 * 24 * 60 * 60 + + args := append( + []string{ + granter.String(), + grantee.String(), + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, fee.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + fmt.Sprintf("--%s=%v", cli.FlagExpiration, duration), + }, + commonFlags..., + ) + + cmd := cli.NewCmdFeeGrant() + + _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) + s.Require().NoError(err) + _, err = s.network.WaitForHeight(1) + s.Require().NoError(err) + + s.addedGranter = granter + s.addedGrantee = grantee + + grant, err := types.NewFeeAllowanceGrant(granter, grantee, &types.BasicFeeAllowance{ + SpendLimit: sdk.NewCoins(fee), + }) + s.Require().NoError(err) + + s.addedGrant = grant +} + +func (s *IntegrationTestSuite) TearDownSuite() { + s.T().Log("tearing down integration test suite") + s.network.Cleanup() +} + +func (s *IntegrationTestSuite) TestCmdGetFeeGrant() { + val := s.network.Validators[0] + granter := val.Address + grantee := s.addedGrantee + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErrMsg string + expectErr bool + respType *types.FeeAllowanceGrant + resp *types.FeeAllowanceGrant + }{ + { + "wrong granter", + []string{ + "wrong_granter", + grantee.String(), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + "decoding bech32 failed", + true, nil, nil, + }, + { + "wrong grantee", + []string{ + granter.String(), + "wrong_grantee", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + "decoding bech32 failed", + true, nil, nil, + }, + { + "non existed grant", + []string{ + "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", + grantee.String(), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + "no fee allowance found", + true, nil, nil, + }, + { + "valid req", + []string{ + granter.String(), + grantee.String(), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + "", + false, + &types.FeeAllowanceGrant{}, + &s.addedGrant, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryFeeGrant() + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expectErrMsg) + } else { + s.Require().NoError(err) + s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + s.Require().Equal(tc.respType.Grantee, tc.respType.Grantee) + s.Require().Equal(tc.respType.Granter, tc.respType.Granter) + s.Require().Equal( + tc.respType.GetFeeGrant().(*types.BasicFeeAllowance).SpendLimit, + tc.resp.GetFeeGrant().(*types.BasicFeeAllowance).SpendLimit, + ) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCmdGetFeeGrants() { + val := s.network.Validators[0] + grantee := s.addedGrantee + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + resp *types.QueryFeeAllowancesResponse + expectLength int + }{ + { + "wrong grantee", + []string{ + "wrong_grantee", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, nil, 0, + }, + { + "non existed grantee", + []string{ + "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, &types.QueryFeeAllowancesResponse{}, 0, + }, + { + "valid req", + []string{ + grantee.String(), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, &types.QueryFeeAllowancesResponse{}, 1, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryFeeGrants() + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), tc.resp), out.String()) + s.Require().Len(tc.resp.FeeAllowances, tc.expectLength) + } + }) + } +} + +func (s *IntegrationTestSuite) TestNewCmdFeeGrant() { + val := s.network.Validators[0] + granter := val.Address + alreadyExistedGrantee := s.addedGrantee + clientCtx := val.ClientCtx + + commonFlags := []string{ + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + testCases := []struct { + name string + args []string + expectErr bool + respType proto.Message + expectedCode uint32 + }{ + { + "wrong granter address", + append( + []string{ + "wrong_granter", + "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + true, nil, 0, + }, + { + "wrong grantee address", + append( + []string{ + granter.String(), + "wrong_grantee", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + true, nil, 0, + }, + { + "valid basic fee grant", + append( + []string{ + granter.String(), + "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + { + "valid basic fee grant without spend limit", + append( + []string{ + granter.String(), + "cosmos17h5lzptx3ghvsuhk7wx4c4hnl7rsswxjer97em", + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + { + "valid basic fee grant without expiration", + append( + []string{ + granter.String(), + "cosmos16dlc38dcqt0uralyd8hksxyrny6kaeqfjvjwp5", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + { + "valid basic fee grant without spend-limit and expiration", + append( + []string{ + granter.String(), + "cosmos1ku40qup9vwag4wtf8cls9mkszxfthaklxkp3c8", + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + { + "try to add existed grant", + append( + []string{ + granter.String(), + alreadyExistedGrantee.String(), + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 18, + }, + { + "invalid number of args(periodic fee grant)", + append( + []string{ + granter.String(), + "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, 10*60*60), + }, + commonFlags..., + ), + true, nil, 0, + }, + { + "period mentioned and period limit omitted, invalid periodic grant", + append( + []string{ + granter.String(), + "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%d", cli.FlagPeriod, 10*60*60), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, 60*60), + }, + commonFlags..., + ), + true, nil, 0, + }, + { + "period cannot be greater than the actual expiration(periodic fee grant)", + append( + []string{ + granter.String(), + "cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%d", cli.FlagPeriod, 10*60*60), + fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, 60*60), + }, + commonFlags..., + ), + true, nil, 0, + }, + { + "valid periodic fee grant", + append( + []string{ + granter.String(), + "cosmos1w55kgcf3ltaqdy4ww49nge3klxmrdavrr6frmp", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%d", cli.FlagPeriod, 60*60), + fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, 10*60*60), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + { + "valid periodic fee grant without spend-limit", + append( + []string{ + granter.String(), + "cosmos1vevyks8pthkscvgazc97qyfjt40m6g9xe85ry8", + fmt.Sprintf("--%s=%d", cli.FlagPeriod, 60*60), + fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + fmt.Sprintf("--%s=%d", cli.FlagExpiration, 10*60*60), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + { + "valid periodic fee grant without expiration", + append( + []string{ + granter.String(), + "cosmos14cm33pvnrv2497tyt8sp9yavhmw83nwej3m0e8", + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, "100stake"), + fmt.Sprintf("--%s=%d", cli.FlagPeriod, 60*60), + fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + { + "valid periodic fee grant without spend-limit and expiration", + append( + []string{ + granter.String(), + "cosmos12nyk4pcf4arshznkpz882e4l4ts0lt0ap8ce54", + fmt.Sprintf("--%s=%d", cli.FlagPeriod, 60*60), + fmt.Sprintf("--%s=%s", cli.FlagPeriodLimit, "10stake"), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, &sdk.TxResponse{}, 0, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewCmdFeeGrant() + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestNewCmdRevokeFeegrant() { + val := s.network.Validators[0] + granter := s.addedGranter + grantee := s.addedGrantee + clientCtx := val.ClientCtx + + commonFlags := []string{ + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + testCases := []struct { + name string + args []string + expectErr bool + respType proto.Message + expectedCode uint32 + }{ + { + "invalid grantee", + append( + []string{ + "wrong_granter", + grantee.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + true, + nil, + 0, + }, + { + "invalid grantee", + append( + []string{ + granter.String(), + "wrong_grantee", + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + true, + nil, + 0, + }, + { + "Non existed grant", + append( + []string{ + granter.String(), + "cosmos1aeuqja06474dfrj7uqsvukm6rael982kk89mqr", + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, + &sdk.TxResponse{}, + 4, + }, + { + "Valid revoke", + append( + []string{ + granter.String(), + grantee.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + }, + commonFlags..., + ), + false, + &sdk.TxResponse{}, + 0, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewCmdRevokeFeegrant() + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestTxWithFeeGrant() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + granter := val.Address + + // creating an account manually (This account won't be exist in state) + info, _, err := val.ClientCtx.Keyring.NewMnemonic("grantee", keyring.English, sdk.FullFundraiserPath, hd.Secp256k1) + s.Require().NoError(err) + grantee := sdk.AccAddress(info.GetPubKey().Address()) + + commonFlags := []string{ + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + fee := sdk.NewCoin("stake", sdk.NewInt(100)) + duration := 365 * 24 * 60 * 60 + + args := append( + []string{ + granter.String(), + grantee.String(), + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, fee.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, granter), + fmt.Sprintf("--%s=%v", cli.FlagExpiration, duration), + }, + commonFlags..., + ) + + cmd := cli.NewCmdFeeGrant() + + _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) + s.Require().NoError(err) + _, err = s.network.WaitForHeight(1) + s.Require().NoError(err) + + // granted fee allowance for an account which is not in state and creating + // any tx with it by using --fee-account shouldn't fail + out, err := govtestutil.MsgSubmitProposal(val.ClientCtx, grantee.String(), + "Text Proposal", "No desc", govtypes.ProposalTypeText, + fmt.Sprintf("--%s=%s", flags.FlagFeeAccount, granter.String()), + ) + + s.Require().NoError(err) + var resp sdk.TxResponse + s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &resp), out.String()) + s.Require().Equal(uint32(0), resp.Code) +} + +func TestIntegrationTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} diff --git a/x/feegrant/client/cli/query.go b/x/feegrant/client/cli/query.go new file mode 100644 index 000000000000..c3a488ab5536 --- /dev/null +++ b/x/feegrant/client/cli/query.go @@ -0,0 +1,129 @@ +package cli + +import ( + "fmt" + "strings" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/version" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/spf13/cobra" +) + +// GetQueryCmd returns the cli query commands for this module +func GetQueryCmd() *cobra.Command { + feegrantQueryCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Querying commands for the feegrant module", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + feegrantQueryCmd.AddCommand( + GetCmdQueryFeeGrant(), + GetCmdQueryFeeGrants(), + ) + + return feegrantQueryCmd +} + +// GetCmdQueryFeeGrant returns cmd to query for a grant between granter and grantee. +func GetCmdQueryFeeGrant() *cobra.Command { + cmd := &cobra.Command{ + Use: "grant [granter] [grantee]", + Args: cobra.ExactArgs(2), + Short: "Query details of a single grant", + Long: strings.TrimSpace( + fmt.Sprintf(`Query details for a grant. +You can find the fee-grant of a granter and grantee. + +Example: +$ %s query feegrant grant [granter] [grantee] +`, version.AppName), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + granterAddr, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + granteeAddr, err := sdk.AccAddressFromBech32(args[1]) + if err != nil { + return err + } + + res, err := queryClient.FeeAllowance( + cmd.Context(), + &types.QueryFeeAllowanceRequest{ + Granter: granterAddr.String(), + Grantee: granteeAddr.String(), + }, + ) + + if err != nil { + return err + } + + return clientCtx.PrintProto(res.FeeAllowance) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryFeeGrants returns cmd to query for all grants for a grantee. +func GetCmdQueryFeeGrants() *cobra.Command { + cmd := &cobra.Command{ + Use: "grants [grantee]", + Args: cobra.ExactArgs(1), + Short: "Query all grants of a grantee", + Long: strings.TrimSpace( + fmt.Sprintf(`Queries all the grants for a grantee address. + +Example: +$ %s query feegrant grants [grantee] +`, version.AppName), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + granteeAddr, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + res, err := queryClient.FeeAllowances( + cmd.Context(), + &types.QueryFeeAllowancesRequest{ + Grantee: granteeAddr.String(), + Pagination: pageReq, + }, + ) + + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "grants") + + return cmd +} diff --git a/x/feegrant/client/cli/tx.go b/x/feegrant/client/cli/tx.go new file mode 100644 index 000000000000..a28ddb976cc1 --- /dev/null +++ b/x/feegrant/client/cli/tx.go @@ -0,0 +1,211 @@ +package cli + +import ( + "fmt" + "strings" + "time" + + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/cosmos/cosmos-sdk/version" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// flag for feegrant module +const ( + FlagExpiration = "expiration" + FlagPeriod = "period" + FlagPeriodLimit = "period-limit" + FlagSpendLimit = "spend-limit" +) + +// GetTxCmd returns the transaction commands for this module +func GetTxCmd() *cobra.Command { + feegrantTxCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Feegrant transactions subcommands", + Long: "Grant and revoke fee allowance for a grantee by a granter", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + feegrantTxCmd.AddCommand( + NewCmdFeeGrant(), + NewCmdRevokeFeegrant(), + ) + + return feegrantTxCmd +} + +// NewCmdFeeGrant returns a CLI command handler for creating a MsgGrantFeeAllowance transaction. +func NewCmdFeeGrant() *cobra.Command { + cmd := &cobra.Command{ + Use: "grant [granter] [grantee]", + Short: "Grant Fee allowance to an address", + Long: strings.TrimSpace( + fmt.Sprintf( + `Grant authorization to pay fees from your address. Note, the'--from' flag is + ignored as it is implied from [granter]. + +Examples: +%s tx %s grant cosmos1skjw... cosmos1skjw... --spend-limit 100stake --expiration 36000 or +%s tx %s grant cosmos1skjw... cosmos1skjw... --spend-limit 100stake --period 3600 --period-limit 10stake --expiration 36000 + `, version.AppName, types.ModuleName, version.AppName, types.ModuleName, + ), + ), + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + _, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + cmd.Flags().Set(flags.FlagFrom, args[0]) + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + grantee, err := sdk.AccAddressFromBech32(args[1]) + if err != nil { + return err + } + + granter := clientCtx.GetFromAddress() + sl, err := cmd.Flags().GetString(FlagSpendLimit) + if err != nil { + return err + } + + // if `FlagSpendLimit` isn't set, limit will be nil + limit, err := sdk.ParseCoinsNormalized(sl) + if err != nil { + return err + } + + exp, err := cmd.Flags().GetInt64(FlagExpiration) + if err != nil { + return err + } + + basic := types.BasicFeeAllowance{ + SpendLimit: limit, + } + + if exp != 0 { + expDuration := time.Duration(exp) * time.Second + basic.Expiration = types.ExpiresAtTime(time.Now().Add(expDuration)) + } + + var grant types.FeeAllowanceI + grant = &basic + + periodClock, err := cmd.Flags().GetInt64(FlagPeriod) + if err != nil { + return err + } + + periodLimitVal, err := cmd.Flags().GetString(FlagPeriodLimit) + if err != nil { + return err + } + + // Check any of period or periodLimit flags set, If set consider it as periodic fee allowance. + if periodClock > 0 || periodLimitVal != "" { + periodLimit, err := sdk.ParseCoinsNormalized(periodLimitVal) + if err != nil { + return err + } + + if periodClock > 0 && periodLimit != nil { + if exp > 0 && periodClock > exp { + return fmt.Errorf("period(%d) cannot be greater than the expiration(%d)", periodClock, exp) + } + + periodic := types.PeriodicFeeAllowance{ + Basic: basic, + Period: types.ClockDuration(time.Duration(periodClock) * time.Second), + PeriodReset: types.ExpiresAtTime(time.Now().Add(time.Duration(periodClock) * time.Second)), + PeriodSpendLimit: periodLimit, + PeriodCanSpend: periodLimit, + } + + grant = &periodic + + } else { + return fmt.Errorf("invalid number of args %d", len(args)) + } + } + + msg, err := types.NewMsgGrantFeeAllowance(grant, granter, grantee) + if err != nil { + return err + } + + svcMsgClientConn := &msgservice.ServiceMsgClientConn{} + feeGrantMsgClient := types.NewMsgClient(svcMsgClientConn) + _, err = feeGrantMsgClient.GrantFeeAllowance(cmd.Context(), msg) + if err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), svcMsgClientConn.GetMsgs()...) + }, + } + + flags.AddTxFlagsToCmd(cmd) + cmd.Flags().Int64(FlagExpiration, 0, "The second unit of time duration which the grant is active for the user") + cmd.Flags().String(FlagSpendLimit, "", "Spend limit specifies the max limit can be used, if not mentioned there is no limit") + cmd.Flags().Int64(FlagPeriod, 0, "period specifies the time duration in which period_spend_limit coins can be spent before that allowance is reset") + cmd.Flags().String(FlagPeriodLimit, "", "// period limit specifies the maximum number of coins that can be spent in the period") + + return cmd +} + +// NewCmdRevokeFeegrant returns a CLI command handler for creating a MsgRevokeFeeAllowance transaction. +func NewCmdRevokeFeegrant() *cobra.Command { + cmd := &cobra.Command{ + Use: "revoke [granter_address] [grantee_address]", + Short: "revoke fee-grant", + Long: strings.TrimSpace( + fmt.Sprintf(`revoke fee grant from a granter to a grantee. Note, the'--from' flag is + ignored as it is implied from [granter_address]. + +Example: + $ %s tx %s revoke cosmos1skj.. cosmos1skj.. + `, version.AppName, types.ModuleName), + ), + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + cmd.Flags().Set(flags.FlagFrom, args[0]) + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + grantee, err := sdk.AccAddressFromBech32(args[1]) + if err != nil { + return err + } + + msg := types.NewMsgRevokeFeeAllowance(clientCtx.GetFromAddress(), grantee) + svcMsgClientConn := &msgservice.ServiceMsgClientConn{} + feeGrantMsgClient := types.NewMsgClient(svcMsgClientConn) + _, err = feeGrantMsgClient.RevokeFeeAllowance(cmd.Context(), &msg) + if err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), svcMsgClientConn.GetMsgs()...) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} diff --git a/x/feegrant/client/rest/grpc_query_test.go b/x/feegrant/client/rest/grpc_query_test.go new file mode 100644 index 000000000000..10d77a1e4c1f --- /dev/null +++ b/x/feegrant/client/rest/grpc_query_test.go @@ -0,0 +1,209 @@ +package rest_test + +import ( + "fmt" + "testing" + + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/rest" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" + "github.com/cosmos/cosmos-sdk/x/feegrant/client/cli" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/suite" +) + +type IntegrationTestSuite struct { + suite.Suite + cfg network.Config + network *network.Network + grantee sdk.AccAddress +} + +func (s *IntegrationTestSuite) SetupSuite() { + s.T().Log("setting up integration test suite") + + cfg := network.DefaultConfig() + + cfg.NumValidators = 1 + s.cfg = cfg + s.network = network.New(s.T(), cfg) + + val := s.network.Validators[0] + // Create new account in the keyring. + info, _, err := val.ClientCtx.Keyring.NewMnemonic("grantee", keyring.English, sdk.FullFundraiserPath, hd.Secp256k1) + s.Require().NoError(err) + newAddr := sdk.AccAddress(info.GetPubKey().Address()) + + // Send some funds to the new account. + _, err = banktestutil.MsgSendExec( + val.ClientCtx, + val.Address, + newAddr, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(200))), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + ) + s.Require().NoError(err) + + s.grantee = newAddr + _, err = s.network.WaitForHeight(1) + s.Require().NoError(err) +} + +func (s *IntegrationTestSuite) TearDownSuite() { + s.T().Log("tearing down integration test suite") + s.network.Cleanup() +} + +func (s *IntegrationTestSuite) TestQueryFeeAllowance() { + val := s.network.Validators[0] + baseURL := val.APIAddress + testCases := []struct { + name string + url string + expectErr bool + errorMsg string + preRun func() + postRun func(_ types.QueryFeeAllowanceResponse) + }{ + { + "fail: invalid granter", + fmt.Sprintf("%s/cosmos/feegrant/v1beta1/fee_allowance/%s/%s", baseURL, "invalid_granter", s.grantee.String()), + true, + "decoding bech32 failed: invalid index of 1: invalid request", + func() {}, + func(types.QueryFeeAllowanceResponse) {}, + }, + { + "fail: invalid grantee", + fmt.Sprintf("%s/cosmos/feegrant/v1beta1/fee_allowance/%s/%s", baseURL, val.Address.String(), "invalid_grantee"), + true, + "decoding bech32 failed: invalid index of 1: invalid request", + func() {}, + func(types.QueryFeeAllowanceResponse) {}, + }, + { + "fail: no grants", + fmt.Sprintf("%s/cosmos/feegrant/v1beta1/fee_allowance/%s/%s", baseURL, val.Address.String(), s.grantee.String()), + true, + "no fee allowance found", + func() {}, + func(types.QueryFeeAllowanceResponse) {}, + }, + { + "valid query: expect single grant", + fmt.Sprintf("%s/cosmos/feegrant/v1beta1/fee_allowance/%s/%s", baseURL, val.Address.String(), s.grantee.String()), + false, + "", + func() { + execFeeAllowance(val, s) + }, + func(allowance types.QueryFeeAllowanceResponse) { + s.Require().Equal(allowance.FeeAllowance.Granter, val.Address.String()) + s.Require().Equal(allowance.FeeAllowance.Grantee, s.grantee.String()) + }, + }, + } + for _, tc := range testCases { + s.Run(tc.name, func() { + tc.preRun() + resp, _ := rest.GetRequest(tc.url) + if tc.expectErr { + s.Require().Contains(string(resp), tc.errorMsg) + } else { + var allowance types.QueryFeeAllowanceResponse + err := val.ClientCtx.JSONMarshaler.UnmarshalJSON(resp, &allowance) + s.Require().NoError(err) + tc.postRun(allowance) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryGranteeAllowances() { + val := s.network.Validators[0] + baseURL := val.APIAddress + testCases := []struct { + name string + url string + expectErr bool + errorMsg string + preRun func() + postRun func(_ types.QueryFeeAllowancesResponse) + }{ + { + "fail: invalid grantee", + fmt.Sprintf("%s/cosmos/feegrant/v1beta1/fee_allowances/%s", baseURL, "invalid_grantee"), + true, + "decoding bech32 failed: invalid index of 1: invalid request", + func() {}, + func(types.QueryFeeAllowancesResponse) {}, + }, + { + "success: no grants", + fmt.Sprintf("%s/cosmos/feegrant/v1beta1/fee_allowances/%s?pagination.offset=1", baseURL, s.grantee.String()), + false, + "", + func() {}, + func(allowances types.QueryFeeAllowancesResponse) { + s.Require().Equal(len(allowances.FeeAllowances), 0) + }, + }, + { + "valid query: expect single grant", + fmt.Sprintf("%s/cosmos/feegrant/v1beta1/fee_allowances/%s", baseURL, s.grantee.String()), + false, + "", + func() { + execFeeAllowance(val, s) + }, + func(allowances types.QueryFeeAllowancesResponse) { + s.Require().Equal(len(allowances.FeeAllowances), 1) + s.Require().Equal(allowances.FeeAllowances[0].Granter, val.Address.String()) + s.Require().Equal(allowances.FeeAllowances[0].Grantee, s.grantee.String()) + }, + }, + } + for _, tc := range testCases { + s.Run(tc.name, func() { + tc.preRun() + resp, _ := rest.GetRequest(tc.url) + if tc.expectErr { + s.Require().Contains(string(resp), tc.errorMsg) + } else { + var allowance types.QueryFeeAllowancesResponse + err := val.ClientCtx.JSONMarshaler.UnmarshalJSON(resp, &allowance) + s.Require().NoError(err) + tc.postRun(allowance) + } + }) + } +} + +func execFeeAllowance(val *network.Validator, s *IntegrationTestSuite) { + fee := sdk.NewCoin("steak", sdk.NewInt(100)) + duration := 365 * 24 * 60 * 60 + args := []string{ + val.Address.String(), + s.grantee.String(), + fmt.Sprintf("--%s=%s", cli.FlagSpendLimit, fee.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%v", cli.FlagExpiration, duration), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + cmd := cli.NewCmdFeeGrant() + _, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) + s.Require().NoError(err) +} + +func TestIntegrationTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} diff --git a/x/feegrant/doc.go b/x/feegrant/doc.go new file mode 100644 index 000000000000..4f190e3140c7 --- /dev/null +++ b/x/feegrant/doc.go @@ -0,0 +1,29 @@ +/* +Package feegrant provides functionality for authorizing the payment of transaction +fees from one account (key) to another account (key). + +Effectively, this allows for a user to pay fees using the balance of an account +different from their own. Example use cases would be allowing a key on a device to +pay for fees using a master wallet, or a third party service allowing users to +pay for transactions without ever really holding their own tokens. This package +provides ways for specifying fee allowances such that authorizing fee payment to +another account can be done with clear and safe restrictions. + +A user would authorize granting fee payment to another user using +MsgDelegateFeeAllowance and revoke that delegation using MsgRevokeFeeAllowance. +In both cases, Granter is the one who is authorizing fee payment and Grantee is +the one who is receiving the fee payment authorization. So grantee would correspond +to the one who is signing a transaction and the granter would be the address that +pays the fees. + +The fee allowance that a grantee receives is specified by an implementation of +the FeeAllowance interface. Two FeeAllowance implementations are provided in +this package: BasicFeeAllowance and PeriodicFeeAllowance. + +In order to integrate this into an application, we must use the DeductGrantedFeeDecorator +ante handler from this package instead of the default DeductFeeDecorator from x/auth. + +To allow handling txs from empty accounts (with fees paid from an existing account), +we have to re-order the decorators as well. +*/ +package feegrant diff --git a/x/feegrant/genesis.go b/x/feegrant/genesis.go new file mode 100644 index 000000000000..f65cfdb57825 --- /dev/null +++ b/x/feegrant/genesis.go @@ -0,0 +1,61 @@ +package feegrant + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// GenesisState contains a set of fee allowances, persisted from the store +type GenesisState []types.FeeAllowanceGrant + +// ValidateBasic ensures all grants in the genesis state are valid +func (g GenesisState) ValidateBasic() error { + for _, f := range g { + err := f.GetFeeGrant().ValidateBasic() + if err != nil { + return err + } + } + return nil +} + +// InitGenesis will initialize the keeper from a *previously validated* GenesisState +func InitGenesis(ctx sdk.Context, k keeper.Keeper, data *types.GenesisState) { + for _, f := range data.FeeAllowances { + granter, err := sdk.AccAddressFromBech32(f.Granter) + if err != nil { + panic(err) + } + grantee, err := sdk.AccAddressFromBech32(f.Grantee) + if err != nil { + panic(err) + } + + err = k.GrantFeeAllowance(ctx, granter, grantee, f.GetFeeGrant()) + if err != nil { + panic(err) + } + } +} + +// ExportGenesis will dump the contents of the keeper into a serializable GenesisState +// +// All expiration heights will be thrown off if we dump state and start at a new +// chain at height 0. Thus, we allow the Allowances to "prepare themselves" +// for export, like if they have expiry at 5000 and current is 4000, they export with +// expiry of 1000. Every FeeAllowance has a method `PrepareForExport` that allows +// them to perform any changes needed prior to export. +func ExportGenesis(ctx sdk.Context, k keeper.Keeper) (*types.GenesisState, error) { + time, height := ctx.BlockTime(), ctx.BlockHeight() + var grants []types.FeeAllowanceGrant + + err := k.IterateAllFeeAllowances(ctx, func(grant types.FeeAllowanceGrant) bool { + grants = append(grants, grant.PrepareForExport(time, height)) + return false + }) + + return &types.GenesisState{ + FeeAllowances: grants, + }, err +} diff --git a/x/feegrant/genesis_test.go b/x/feegrant/genesis_test.go new file mode 100644 index 000000000000..d086daac077f --- /dev/null +++ b/x/feegrant/genesis_test.go @@ -0,0 +1,56 @@ +package feegrant_test + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + feegrant "github.com/cosmos/cosmos-sdk/x/feegrant" + "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +) + +type GenesisTestSuite struct { + suite.Suite + ctx sdk.Context + keeper keeper.Keeper +} + +func (suite *GenesisTestSuite) SetupTest() { + checkTx := false + app := simapp.Setup(checkTx) + suite.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{Height: 1}) + suite.keeper = app.FeeGrantKeeper +} + +var ( + granteePub = secp256k1.GenPrivKey().PubKey() + granterPub = secp256k1.GenPrivKey().PubKey() + granteeAddr = sdk.AccAddress(granteePub.Address()) + granterAddr = sdk.AccAddress(granterPub.Address()) +) + +func (suite *GenesisTestSuite) TestImportExportGenesis() { + coins := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1_000))) + now := suite.ctx.BlockHeader().Time + + allowance := &types.BasicFeeAllowance{SpendLimit: coins, Expiration: types.ExpiresAtTime(now.AddDate(1, 0, 0))} + err := suite.keeper.GrantFeeAllowance(suite.ctx, granterAddr, granteeAddr, allowance) + suite.Require().NoError(err) + + genesis, err := feegrant.ExportGenesis(suite.ctx, suite.keeper) + suite.Require().NoError(err) + // Clear keeper + suite.keeper.RevokeFeeAllowance(suite.ctx, granterAddr, granteeAddr) + feegrant.InitGenesis(suite.ctx, suite.keeper, genesis) + newGenesis, err := feegrant.ExportGenesis(suite.ctx, suite.keeper) + suite.Require().NoError(err) + suite.Require().Equal(genesis, newGenesis) +} + +func TestGenesisTestSuite(t *testing.T) { + suite.Run(t, new(GenesisTestSuite)) +} diff --git a/x/feegrant/keeper/grpc_query.go b/x/feegrant/keeper/grpc_query.go new file mode 100644 index 000000000000..0fce084f90ba --- /dev/null +++ b/x/feegrant/keeper/grpc_query.go @@ -0,0 +1,94 @@ +package keeper + +import ( + "context" + + "github.com/gogo/protobuf/proto" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +var _ types.QueryServer = Keeper{} + +// FeeAllowance returns fee granted to the grantee by the granter. +func (q Keeper) FeeAllowance(c context.Context, req *types.QueryFeeAllowanceRequest) (*types.QueryFeeAllowanceResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + granterAddr, err := sdk.AccAddressFromBech32(req.Granter) + if err != nil { + return nil, err + } + + granteeAddr, err := sdk.AccAddressFromBech32(req.Grantee) + if err != nil { + return nil, err + } + + ctx := sdk.UnwrapSDKContext(c) + + feeAllowance := q.GetFeeAllowance(ctx, granterAddr, granteeAddr) + if feeAllowance == nil { + return nil, status.Errorf(codes.NotFound, "no fee allowance found") + } + + msg, ok := feeAllowance.(proto.Message) + if !ok { + return nil, status.Errorf(codes.Internal, "can't proto marshal %T", msg) + } + + feeAllowanceAny, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + + return &types.QueryFeeAllowanceResponse{ + FeeAllowance: &types.FeeAllowanceGrant{ + Granter: granterAddr.String(), + Grantee: granteeAddr.String(), + Allowance: feeAllowanceAny, + }, + }, nil +} + +func (q Keeper) FeeAllowances(c context.Context, req *types.QueryFeeAllowancesRequest) (*types.QueryFeeAllowancesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + granteeAddr, err := sdk.AccAddressFromBech32(req.Grantee) + if err != nil { + return nil, err + } + + ctx := sdk.UnwrapSDKContext(c) + + var grants []*types.FeeAllowanceGrant + + store := ctx.KVStore(q.storeKey) + grantsStore := prefix.NewStore(store, types.FeeAllowancePrefixByGrantee(granteeAddr)) + + pageRes, err := query.Paginate(grantsStore, req.Pagination, func(key []byte, value []byte) error { + var grant types.FeeAllowanceGrant + + if err := q.cdc.UnmarshalBinaryBare(value, &grant); err != nil { + return err + } + + grants = append(grants, &grant) + return nil + }) + + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryFeeAllowancesResponse{FeeAllowances: grants, Pagination: pageRes}, nil +} diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go new file mode 100644 index 000000000000..e6606bf0ca55 --- /dev/null +++ b/x/feegrant/keeper/keeper.go @@ -0,0 +1,190 @@ +package keeper + +import ( + "fmt" + + "github.com/tendermint/tendermint/libs/log" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// Keeper manages state of all fee grants, as well as calculating approval. +// It must have a codec with all available allowances registered. +type Keeper struct { + cdc codec.BinaryMarshaler + storeKey sdk.StoreKey + authKeeper types.AccountKeeper +} + +// NewKeeper creates a fee grant Keeper +func NewKeeper(cdc codec.BinaryMarshaler, storeKey sdk.StoreKey, ak types.AccountKeeper) Keeper { + return Keeper{ + cdc: cdc, + storeKey: storeKey, + authKeeper: ak, + } +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) +} + +// GrantFeeAllowance creates a new grant +func (k Keeper) GrantFeeAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress, feeAllowance types.FeeAllowanceI) error { + + // create the account if it is not in account state + granteeAcc := k.authKeeper.GetAccount(ctx, grantee) + if granteeAcc == nil { + granteeAcc = k.authKeeper.NewAccountWithAddress(ctx, grantee) + k.authKeeper.SetAccount(ctx, granteeAcc) + } + + store := ctx.KVStore(k.storeKey) + key := types.FeeAllowanceKey(granter, grantee) + grant, err := types.NewFeeAllowanceGrant(granter, grantee, feeAllowance) + if err != nil { + return err + } + + bz, err := k.cdc.MarshalBinaryBare(&grant) + if err != nil { + return err + } + + store.Set(key, bz) + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeSetFeeGrant, + sdk.NewAttribute(types.AttributeKeyGranter, grant.Granter), + sdk.NewAttribute(types.AttributeKeyGrantee, grant.Grantee), + ), + ) + + return nil +} + +// RevokeFeeAllowance removes an existing grant +func (k Keeper) RevokeFeeAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress) error { + store := ctx.KVStore(k.storeKey) + key := types.FeeAllowanceKey(granter, grantee) + _, found := k.GetFeeGrant(ctx, granter, grantee) + if !found { + return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "fee-grant not found") + } + + store.Delete(key) + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeRevokeFeeGrant, + sdk.NewAttribute(types.AttributeKeyGranter, granter.String()), + sdk.NewAttribute(types.AttributeKeyGrantee, grantee.String()), + ), + ) + return nil +} + +// GetFeeAllowance returns the allowance between the granter and grantee. +// If there is none, it returns nil, nil. +// Returns an error on parsing issues +func (k Keeper) GetFeeAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress) types.FeeAllowanceI { + grant, found := k.GetFeeGrant(ctx, granter, grantee) + if !found { + return nil + } + + return grant.GetFeeGrant() +} + +// GetFeeGrant returns entire grant between both accounts +func (k Keeper) GetFeeGrant(ctx sdk.Context, granter sdk.AccAddress, grantee sdk.AccAddress) (types.FeeAllowanceGrant, bool) { + store := ctx.KVStore(k.storeKey) + key := types.FeeAllowanceKey(granter, grantee) + bz := store.Get(key) + if len(bz) == 0 { + return types.FeeAllowanceGrant{}, false + } + + var feegrant types.FeeAllowanceGrant + k.cdc.MustUnmarshalBinaryBare(bz, &feegrant) + + return feegrant, true +} + +// IterateAllGranteeFeeAllowances iterates over all the grants from anyone to the given grantee. +// Callback to get all data, returns true to stop, false to keep reading +func (k Keeper) IterateAllGranteeFeeAllowances(ctx sdk.Context, grantee sdk.AccAddress, cb func(types.FeeAllowanceGrant) bool) error { + store := ctx.KVStore(k.storeKey) + prefix := types.FeeAllowancePrefixByGrantee(grantee) + iter := sdk.KVStorePrefixIterator(store, prefix) + defer iter.Close() + + stop := false + for ; iter.Valid() && !stop; iter.Next() { + bz := iter.Value() + + var feeGrant types.FeeAllowanceGrant + k.cdc.MustUnmarshalBinaryBare(bz, &feeGrant) + + stop = cb(feeGrant) + } + + return nil +} + +// IterateAllFeeAllowances iterates over all the grants in the store. +// Callback to get all data, returns true to stop, false to keep reading +// Calling this without pagination is very expensive and only designed for export genesis +func (k Keeper) IterateAllFeeAllowances(ctx sdk.Context, cb func(types.FeeAllowanceGrant) bool) error { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, types.FeeAllowanceKeyPrefix) + defer iter.Close() + + stop := false + for ; iter.Valid() && !stop; iter.Next() { + bz := iter.Value() + var feeGrant types.FeeAllowanceGrant + k.cdc.MustUnmarshalBinaryBare(bz, &feeGrant) + + stop = cb(feeGrant) + } + + return nil +} + +// UseGrantedFees will try to pay the given fee from the granter's account as requested by the grantee +func (k Keeper) UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins) error { + grant, found := k.GetFeeGrant(ctx, granter, grantee) + if !found || grant.GetFeeGrant() == nil { + return sdkerrors.Wrapf(types.ErrNoAllowance, "grant missing") + } + + remove, err := grant.GetFeeGrant().Accept(fee, ctx.BlockTime(), ctx.BlockHeight()) + if err == nil { + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeUseFeeGrant, + sdk.NewAttribute(types.AttributeKeyGranter, granter.String()), + sdk.NewAttribute(types.AttributeKeyGrantee, grantee.String()), + ), + ) + } + + if remove { + k.RevokeFeeAllowance(ctx, granter, grantee) + // note this returns nil if err == nil + return sdkerrors.Wrap(err, "removed grant") + } + + if err != nil { + return sdkerrors.Wrap(err, "invalid grant") + } + + // if we accepted, store the updated state of the allowance + return k.GrantFeeAllowance(ctx, granter, grantee, grant.GetFeeGrant()) +} diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go new file mode 100644 index 000000000000..c14e141d31f0 --- /dev/null +++ b/x/feegrant/keeper/keeper_test.go @@ -0,0 +1,257 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +type KeeperTestSuite struct { + suite.Suite + + app *simapp.SimApp + ctx sdk.Context + addrs []sdk.AccAddress +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} + +func (suite *KeeperTestSuite) SetupTest() { + app := simapp.Setup(false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + + suite.app = app + suite.ctx = ctx + suite.addrs = simapp.AddTestAddrsIncremental(app, ctx, 4, sdk.NewInt(30000000)) +} + +func (suite *KeeperTestSuite) TestKeeperCrud() { + ctx := suite.ctx + k := suite.app.FeeGrantKeeper + + // some helpers + atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) + eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) + basic := &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(334455), + } + + basic2 := &types.BasicFeeAllowance{ + SpendLimit: eth, + Expiration: types.ExpiresAtHeight(172436), + } + + // let's set up some initial state here + err := k.GrantFeeAllowance(ctx, suite.addrs[0], suite.addrs[1], basic) + suite.Require().NoError(err) + + err = k.GrantFeeAllowance(ctx, suite.addrs[0], suite.addrs[2], basic2) + suite.Require().NoError(err) + + err = k.GrantFeeAllowance(ctx, suite.addrs[1], suite.addrs[2], basic) + suite.Require().NoError(err) + + err = k.GrantFeeAllowance(ctx, suite.addrs[1], suite.addrs[3], basic) + suite.Require().NoError(err) + + err = k.GrantFeeAllowance(ctx, suite.addrs[3], suite.addrs[0], basic2) + suite.Require().NoError(err) + + // remove some, overwrite other + k.RevokeFeeAllowance(ctx, suite.addrs[0], suite.addrs[1]) + k.RevokeFeeAllowance(ctx, suite.addrs[0], suite.addrs[2]) + + err = k.GrantFeeAllowance(ctx, suite.addrs[0], suite.addrs[2], basic) + suite.Require().NoError(err) + + err = k.GrantFeeAllowance(ctx, suite.addrs[1], suite.addrs[2], basic2) + suite.Require().NoError(err) + + // end state: + // addr -> addr3 (basic) + // addr2 -> addr3 (basic2), addr4(basic) + // addr4 -> addr (basic2) + + // then lots of queries + cases := map[string]struct { + grantee sdk.AccAddress + granter sdk.AccAddress + allowance types.FeeAllowanceI + }{ + "addr revoked": { + granter: suite.addrs[0], + grantee: suite.addrs[1], + }, + "addr revoked and added": { + granter: suite.addrs[0], + grantee: suite.addrs[2], + allowance: basic, + }, + "addr never there": { + granter: suite.addrs[0], + grantee: suite.addrs[3], + }, + "addr modified": { + granter: suite.addrs[1], + grantee: suite.addrs[2], + allowance: basic2, + }, + } + + for name, tc := range cases { + tc := tc + suite.Run(name, func() { + allow := k.GetFeeAllowance(ctx, tc.granter, tc.grantee) + if tc.allowance == nil { + suite.Nil(allow) + return + } + suite.NotNil(allow) + suite.Equal(tc.allowance, allow) + }) + } + + grant1, err := types.NewFeeAllowanceGrant(suite.addrs[3], suite.addrs[0], basic2) + suite.NoError(err) + + grant2, err := types.NewFeeAllowanceGrant(suite.addrs[1], suite.addrs[2], basic2) + suite.NoError(err) + + grant3, err := types.NewFeeAllowanceGrant(suite.addrs[0], suite.addrs[2], basic) + suite.NoError(err) + + allCases := map[string]struct { + grantee sdk.AccAddress + grants []types.FeeAllowanceGrant + }{ + "addr2 has none": { + grantee: suite.addrs[1], + }, + "addr has one": { + grantee: suite.addrs[0], + grants: []types.FeeAllowanceGrant{ + grant1, + }, + }, + "addr3 has two": { + grantee: suite.addrs[2], + grants: []types.FeeAllowanceGrant{ + grant3, + grant2, + }, + }, + } + + for name, tc := range allCases { + tc := tc + suite.Run(name, func() { + var grants []types.FeeAllowanceGrant + err := k.IterateAllGranteeFeeAllowances(ctx, tc.grantee, func(grant types.FeeAllowanceGrant) bool { + grants = append(grants, grant) + return false + }) + suite.NoError(err) + suite.Equal(tc.grants, grants) + }) + } +} + +func (suite *KeeperTestSuite) TestUseGrantedFee() { + ctx := suite.ctx + k := suite.app.FeeGrantKeeper + + // some helpers + atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) + eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 123)) + future := &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(5678), + } + + expired := &types.BasicFeeAllowance{ + SpendLimit: eth, + Expiration: types.ExpiresAtHeight(55), + } + + // for testing limits of the contract + hugeAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 9999)) + _ = hugeAtom + smallAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 1)) + _ = smallAtom + futureAfterSmall := &types.BasicFeeAllowance{ + SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 554)), + Expiration: types.ExpiresAtHeight(5678), + } + + // then lots of queries + cases := map[string]struct { + grantee sdk.AccAddress + granter sdk.AccAddress + fee sdk.Coins + allowed bool + final types.FeeAllowanceI + }{ + "use entire pot": { + granter: suite.addrs[0], + grantee: suite.addrs[1], + fee: atom, + allowed: true, + final: nil, + }, + "expired and removed": { + granter: suite.addrs[0], + grantee: suite.addrs[2], + fee: eth, + allowed: false, + final: nil, + }, + "too high": { + granter: suite.addrs[0], + grantee: suite.addrs[1], + fee: hugeAtom, + allowed: false, + final: future, + }, + "use a little": { + granter: suite.addrs[0], + grantee: suite.addrs[1], + fee: smallAtom, + allowed: true, + final: futureAfterSmall, + }, + } + + for name, tc := range cases { + tc := tc + suite.Run(name, func() { + // let's set up some initial state here + // addr -> addr2 (future) + // addr -> addr3 (expired) + + err := k.GrantFeeAllowance(ctx, suite.addrs[0], suite.addrs[1], future) + suite.Require().NoError(err) + + err = k.GrantFeeAllowance(ctx, suite.addrs[0], suite.addrs[3], expired) + suite.Require().NoError(err) + + err = k.UseGrantedFees(ctx, tc.granter, tc.grantee, tc.fee) + if tc.allowed { + suite.NoError(err) + } else { + suite.Error(err) + } + + loaded := k.GetFeeAllowance(ctx, tc.granter, tc.grantee) + + suite.Equal(tc.final, loaded) + }) + } +} diff --git a/x/feegrant/keeper/msg_server.go b/x/feegrant/keeper/msg_server.go new file mode 100644 index 000000000000..3cd96e79ba88 --- /dev/null +++ b/x/feegrant/keeper/msg_server.go @@ -0,0 +1,72 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the feegrant MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(k Keeper) types.MsgServer { + return &msgServer{ + Keeper: k, + } +} + +var _ types.MsgServer = msgServer{} + +func (k msgServer) GrantFeeAllowance(goCtx context.Context, msg *types.MsgGrantFeeAllowance) (*types.MsgGrantFeeAllowanceResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + grantee, err := sdk.AccAddressFromBech32(msg.Grantee) + if err != nil { + return nil, err + } + + granter, err := sdk.AccAddressFromBech32(msg.Granter) + if err != nil { + return nil, err + } + + // Checking for duplicate entry + f := k.Keeper.GetFeeAllowance(ctx, granter, grantee) + if f != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "fee allowance already exists") + } + + err = k.Keeper.GrantFeeAllowance(ctx, granter, grantee, msg.GetFeeAllowanceI()) + if err != nil { + return nil, err + } + + return &types.MsgGrantFeeAllowanceResponse{}, nil +} + +func (k msgServer) RevokeFeeAllowance(goCtx context.Context, msg *types.MsgRevokeFeeAllowance) (*types.MsgRevokeFeeAllowanceResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + grantee, err := sdk.AccAddressFromBech32(msg.Grantee) + if err != nil { + return nil, err + } + + granter, err := sdk.AccAddressFromBech32(msg.Granter) + if err != nil { + return nil, err + } + + err = k.Keeper.RevokeFeeAllowance(ctx, granter, grantee) + if err != nil { + return nil, err + } + + return &types.MsgRevokeFeeAllowanceResponse{}, nil +} diff --git a/x/feegrant/module.go b/x/feegrant/module.go new file mode 100644 index 000000000000..5f4ba807d895 --- /dev/null +++ b/x/feegrant/module.go @@ -0,0 +1,210 @@ +package feegrant + +import ( + "context" + "encoding/json" + "math/rand" + + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + + abci "github.com/tendermint/tendermint/abci/types" + + sdkclient "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/client/cli" + "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +var ( + _ module.AppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleSimulation = AppModule{} +) + +// ---------------------------------------------------------------------------- +// AppModuleBasic +// ---------------------------------------------------------------------------- + +// AppModuleBasic defines the basic application module used by the feegrant module. +type AppModuleBasic struct { + cdc codec.Marshaler +} + +// Name returns the feegrant module's name. +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +// RegisterServices registers a gRPC query service to respond to the +// module-specific gRPC queries. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), am.keeper) +} + +// RegisterLegacyAminoCodec registers the feegrant module's types for the given codec. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { +} + +// RegisterInterfaces registers the feegrant module's interface types +func (AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + +// LegacyQuerierHandler returns the feegrant module sdk.Querier. +func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { + return nil +} + +// DefaultGenesis returns default genesis state as raw bytes for the feegrant +// module. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesisState()) +} + +// ValidateGenesis performs genesis state validation for the feegrant module. +func (a AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config sdkclient.TxEncodingConfig, bz json.RawMessage) error { + var data types.GenesisState + if err := cdc.UnmarshalJSON(bz, &data); err != nil { + sdkerrors.Wrapf(err, "failed to unmarshal %s genesis state", types.ModuleName) + } + + return types.ValidateGenesis(data) +} + +// RegisterRESTRoutes registers the REST routes for the feegrant module. +func (AppModuleBasic) RegisterRESTRoutes(ctx sdkclient.Context, rtr *mux.Router) {} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the feegrant module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { + types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) +} + +// GetTxCmd returns the root tx command for the feegrant module. +func (AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.GetTxCmd() +} + +// GetQueryCmd returns no root query command for the feegrant module. +func (AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd() +} + +// ---------------------------------------------------------------------------- +// AppModule +// ---------------------------------------------------------------------------- + +// AppModule implements an application module for the feegrant module. +type AppModule struct { + AppModuleBasic + keeper keeper.Keeper + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + registry cdctypes.InterfaceRegistry +} + +// NewAppModule creates a new AppModule object +func NewAppModule(cdc codec.Marshaler, ak types.AccountKeeper, bk types.BankKeeper, keeper keeper.Keeper, registry cdctypes.InterfaceRegistry) AppModule { + return AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + accountKeeper: ak, + bankKeeper: bk, + registry: registry, + } +} + +// Name returns the feegrant module's name. +func (AppModule) Name() string { + return types.ModuleName +} + +// RegisterInvariants registers the feegrant module invariants. +func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} + +// Route returns the message routing key for the feegrant module. +func (am AppModule) Route() sdk.Route { + return sdk.NewRoute(types.RouterKey, nil) +} + +// NewHandler returns an sdk.Handler for the feegrant module. +func (am AppModule) NewHandler() sdk.Handler { + return nil +} + +// QuerierRoute returns the feegrant module's querier route name. +func (AppModule) QuerierRoute() string { + return "" +} + +// InitGenesis performs genesis initialization for the feegrant module. It returns +// no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, bz json.RawMessage) []abci.ValidatorUpdate { + var gs types.GenesisState + cdc.MustUnmarshalJSON(bz, &gs) + + InitGenesis(ctx, am.keeper, &gs) + return []abci.ValidatorUpdate{} +} + +// ExportGenesis returns the exported genesis state as raw bytes for the feegrant +// module. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { + gs, err := ExportGenesis(ctx, am.keeper) + if err != nil { + panic(err) + } + + return cdc.MustMarshalJSON(gs) +} + +// BeginBlock returns the begin blocker for the feegrant module. +func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} + +// EndBlock returns the end blocker for the feegrant module. It returns no validator +// updates. +func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { + return []abci.ValidatorUpdate{} +} + +//____________________________________________________________________________ + +// AppModuleSimulation functions + +// GenerateGenesisState creates a randomized GenState of the feegrant module. +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + simulation.RandomizedGenState(simState) +} + +// ProposalContents returns all the feegrant content functions used to +// simulate governance proposals. +func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { + return nil +} + +// RandomizedParams creates randomized feegrant param changes for the simulator. +func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { + return nil +} + +// RegisterStoreDecoder registers a decoder for feegrant module's types +func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { + sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) +} + +// WeightedOperations returns all the feegrant module operations with their respective weights. +func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + protoCdc := codec.NewProtoCodec(am.registry) + return simulation.WeightedOperations( + simState.AppParams, simState.Cdc, am.accountKeeper, am.bankKeeper, am.keeper, protoCdc, + ) +} diff --git a/x/feegrant/simulation/decoder.go b/x/feegrant/simulation/decoder.go new file mode 100644 index 000000000000..46e35594fdf8 --- /dev/null +++ b/x/feegrant/simulation/decoder.go @@ -0,0 +1,26 @@ +package simulation + +import ( + "bytes" + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/types/kv" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// NewDecodeStore returns a decoder function closure that unmarshals the KVPair's +// Value to the corresponding feegrant type. +func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { + return func(kvA, kvB kv.Pair) string { + switch { + case bytes.Equal(kvA.Key[:1], types.FeeAllowanceKeyPrefix): + var grantA, grantB types.FeeAllowanceGrant + cdc.MustUnmarshalBinaryBare(kvA.Value, &grantA) + cdc.MustUnmarshalBinaryBare(kvB.Value, &grantB) + return fmt.Sprintf("%v\n%v", grantA, grantB) + default: + panic(fmt.Sprintf("invalid feegrant key %X", kvA.Key)) + } + } +} diff --git a/x/feegrant/simulation/decoder_test.go b/x/feegrant/simulation/decoder_test.go new file mode 100644 index 000000000000..0087e5eba117 --- /dev/null +++ b/x/feegrant/simulation/decoder_test.go @@ -0,0 +1,62 @@ +package simulation_test + +import ( + "fmt" + "testing" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/kv" + "github.com/cosmos/cosmos-sdk/x/feegrant/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/require" +) + +var ( + granterPk = ed25519.GenPrivKey().PubKey() + granterAddr = sdk.AccAddress(granterPk.Address()) + granteePk = ed25519.GenPrivKey().PubKey() + granteeAddr = sdk.AccAddress(granterPk.Address()) +) + +func TestDecodeStore(t *testing.T) { + cdc := simapp.MakeTestEncodingConfig().Marshaler + dec := simulation.NewDecodeStore(cdc) + + grant, err := types.NewFeeAllowanceGrant(granterAddr, granteeAddr, &types.BasicFeeAllowance{ + SpendLimit: sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(100))), + }) + + require.NoError(t, err) + + grantBz, err := cdc.MarshalBinaryBare(&grant) + require.NoError(t, err) + + kvPairs := kv.Pairs{ + Pairs: []kv.Pair{ + {Key: []byte(types.FeeAllowanceKeyPrefix), Value: grantBz}, + {Key: []byte{0x99}, Value: []byte{0x99}}, + }, + } + + tests := []struct { + name string + expectedLog string + }{ + {"Grant", fmt.Sprintf("%v\n%v", grant, grant)}, + {"other", ""}, + } + + for i, tt := range tests { + i, tt := i, tt + t.Run(tt.name, func(t *testing.T) { + switch i { + case len(tests) - 1: + require.Panics(t, func() { dec(kvPairs.Pairs[i], kvPairs.Pairs[i]) }, tt.name) + default: + require.Equal(t, tt.expectedLog, dec(kvPairs.Pairs[i], kvPairs.Pairs[i]), tt.name) + } + }) + } +} diff --git a/x/feegrant/simulation/genesis.go b/x/feegrant/simulation/genesis.go new file mode 100644 index 000000000000..f9f4c7e12748 --- /dev/null +++ b/x/feegrant/simulation/genesis.go @@ -0,0 +1,38 @@ +package simulation + +import ( + "encoding/json" + "fmt" + "math/rand" + + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +// Simulation parameter constants +const feegrant = "feegrant" + +// GenFeeGrants returns an empty slice of evidences. +func GenFeeGrants(_ *rand.Rand, _ []simtypes.Account) []types.FeeAllowanceGrant { + return []types.FeeAllowanceGrant{} +} + +// RandomizedGenState generates a random GenesisState for feegrant +func RandomizedGenState(simState *module.SimulationState) { + var feegrants []types.FeeAllowanceGrant + + simState.AppParams.GetOrGenerate( + simState.Cdc, feegrant, &feegrants, simState.Rand, + func(r *rand.Rand) { feegrants = GenFeeGrants(r, simState.Accounts) }, + ) + feegrantGenesis := types.NewGenesisState(feegrants) + + bz, err := json.MarshalIndent(&feegrantGenesis, "", " ") + if err != nil { + panic(err) + } + + fmt.Printf("Selected randomly generated %s parameters:\n%s\n", types.ModuleName, bz) + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(feegrantGenesis) +} diff --git a/x/feegrant/simulation/genesis_test.go b/x/feegrant/simulation/genesis_test.go new file mode 100644 index 000000000000..4f3ae74b56be --- /dev/null +++ b/x/feegrant/simulation/genesis_test.go @@ -0,0 +1,39 @@ +package simulation_test + +import ( + "encoding/json" + "math/rand" + "testing" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/require" +) + +func TestRandomizedGenState(t *testing.T) { + interfaceRegistry := codectypes.NewInterfaceRegistry() + cdc := codec.NewProtoCodec(interfaceRegistry) + + s := rand.NewSource(1) + r := rand.New(s) + + simState := module.SimulationState{ + AppParams: make(simtypes.AppParams), + Cdc: cdc, + Rand: r, + NumBonded: 3, + Accounts: simtypes.RandomAccounts(r, 3), + InitialStake: 1000, + GenState: make(map[string]json.RawMessage), + } + + simulation.RandomizedGenState(&simState) + var feegrantGenesis types.GenesisState + simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &feegrantGenesis) + + require.Len(t, feegrantGenesis.FeeAllowances, 0) +} diff --git a/x/feegrant/simulation/operations.go b/x/feegrant/simulation/operations.go new file mode 100644 index 000000000000..54821873b6b6 --- /dev/null +++ b/x/feegrant/simulation/operations.go @@ -0,0 +1,200 @@ +package simulation + +import ( + "context" + "math/rand" + "time" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/simapp/helpers" + simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/cosmos/cosmos-sdk/x/simulation" +) + +// Simulation operation weights constants +const ( + OpWeightMsgGrantFeeAllowance = "op_weight_msg_grant_fee_allowance" + OpWeightMsgRevokeFeeAllowance = "op_weight_msg_grant_revoke_allowance" + TypeMsgGrantFeeAllowance = "/cosmos.feegrant.v1beta1.Msg/GrantFeeAllowance" + TypeMsgRevokeFeeAllowance = "/cosmos.feegrant.v1beta1.Msg/RevokeFeeAllowance" +) + +func WeightedOperations( + appParams simtypes.AppParams, cdc codec.JSONMarshaler, + ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, + protoCdc *codec.ProtoCodec, +) simulation.WeightedOperations { + + var ( + weightMsgGrantFeeAllowance int + weightMsgRevokeFeeAllowance int + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgGrantFeeAllowance, &weightMsgGrantFeeAllowance, nil, + func(_ *rand.Rand) { + weightMsgGrantFeeAllowance = simappparams.DefaultWeightGrantFeeAllowance + }, + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgRevokeFeeAllowance, &weightMsgRevokeFeeAllowance, nil, + func(_ *rand.Rand) { + weightMsgRevokeFeeAllowance = simappparams.DefaultWeightRevokeFeeAllowance + }, + ) + + return simulation.WeightedOperations{ + simulation.NewWeightedOperation( + weightMsgGrantFeeAllowance, + SimulateMsgGrantFeeAllowance(ak, bk, k, protoCdc), + ), + simulation.NewWeightedOperation( + weightMsgRevokeFeeAllowance, + SimulateMsgRevokeFeeAllowance(ak, bk, k, protoCdc), + ), + } +} + +// SimulateMsgGrantFeeAllowance generates MsgGrantFeeAllowance with random values. +func SimulateMsgGrantFeeAllowance(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, protoCdc *codec.ProtoCodec) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + granter, _ := simtypes.RandomAcc(r, accs) + grantee, _ := simtypes.RandomAcc(r, accs) + if grantee.Address.String() == granter.Address.String() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantFeeAllowance, "grantee and granter cannot be same"), nil, nil + } + + f := k.GetFeeAllowance(ctx, granter.Address, grantee.Address) + if f != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantFeeAllowance, "fee allowance exists"), nil, nil + } + + account := ak.GetAccount(ctx, granter.Address) + + spendableCoins := bk.SpendableCoins(ctx, account.GetAddress()) + fees, err := simtypes.RandomFees(r, ctx, spendableCoins) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantFeeAllowance, err.Error()), nil, err + } + + spendableCoins = spendableCoins.Sub(fees) + if spendableCoins.Empty() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantFeeAllowance, "unable to grant empty coins as SpendLimit"), nil, nil + } + + msg, err := types.NewMsgGrantFeeAllowance(&types.BasicFeeAllowance{ + SpendLimit: spendableCoins, + Expiration: types.ExpiresAtTime(ctx.BlockTime().Add(30 * time.Hour)), + }, granter.Address, grantee.Address) + + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantFeeAllowance, err.Error()), nil, err + } + txGen := simappparams.MakeTestEncodingConfig().TxConfig + svcMsgClientConn := &msgservice.ServiceMsgClientConn{} + feegrantMsgClient := types.NewMsgClient(svcMsgClientConn) + _, err = feegrantMsgClient.GrantFeeAllowance(context.Background(), msg) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantFeeAllowance, err.Error()), nil, err + } + tx, err := helpers.GenTx( + txGen, + svcMsgClientConn.GetMsgs(), + fees, + helpers.DefaultGenTxGas, + chainID, + []uint64{account.GetAccountNumber()}, + []uint64{account.GetSequence()}, + granter.PrivKey, + ) + + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgGrantFeeAllowance, "unable to generate mock tx"), nil, err + } + + _, _, err = app.Deliver(txGen.TxEncoder(), tx) + + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, svcMsgClientConn.GetMsgs()[0].Type(), "unable to deliver tx"), nil, err + } + return simtypes.NewOperationMsg(svcMsgClientConn.GetMsgs()[0], true, "", protoCdc), nil, err + } +} + +// SimulateMsgRevokeFeeAllowance generates a MsgRevokeFeeAllowance with random values. +func SimulateMsgRevokeFeeAllowance(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, protoCdc *codec.ProtoCodec) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + + hasGrant := false + var granterAddr sdk.AccAddress + var granteeAddr sdk.AccAddress + k.IterateAllFeeAllowances(ctx, func(grant types.FeeAllowanceGrant) bool { + + granter, err := sdk.AccAddressFromBech32(grant.Granter) + if err != nil { + panic(err) + } + grantee, err := sdk.AccAddressFromBech32(grant.Grantee) + if err != nil { + panic(err) + } + granterAddr = granter + granteeAddr = grantee + hasGrant = true + return true + }) + + if !hasGrant { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgRevokeFeeAllowance, "no grants"), nil, nil + } + granter, ok := simtypes.FindAccount(accs, granterAddr) + + if !ok { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgRevokeFeeAllowance, "Account not found"), nil, nil + } + + account := ak.GetAccount(ctx, granter.Address) + spendableCoins := bk.SpendableCoins(ctx, account.GetAddress()) + fees, err := simtypes.RandomFees(r, ctx, spendableCoins) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgRevokeFeeAllowance, err.Error()), nil, err + } + + msg := types.NewMsgRevokeFeeAllowance(granterAddr, granteeAddr) + + txGen := simappparams.MakeTestEncodingConfig().TxConfig + svcMsgClientConn := &msgservice.ServiceMsgClientConn{} + feegrantMsgClient := types.NewMsgClient(svcMsgClientConn) + _, err = feegrantMsgClient.RevokeFeeAllowance(context.Background(), &msg) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantFeeAllowance, err.Error()), nil, err + } + + tx, err := helpers.GenTx( + txGen, + svcMsgClientConn.GetMsgs(), + fees, + helpers.DefaultGenTxGas, + chainID, + []uint64{account.GetAccountNumber()}, + []uint64{account.GetSequence()}, + granter.PrivKey, + ) + + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgRevokeFeeAllowance, err.Error()), nil, err + } + + _, _, err = app.Deliver(txGen.TxEncoder(), tx) + return simtypes.NewOperationMsg(svcMsgClientConn.GetMsgs()[0], true, "", protoCdc), nil, err + } +} diff --git a/x/feegrant/simulation/operations_test.go b/x/feegrant/simulation/operations_test.go new file mode 100644 index 000000000000..d72e0c2e01e0 --- /dev/null +++ b/x/feegrant/simulation/operations_test.go @@ -0,0 +1,173 @@ +package simulation_test + +import ( + "math/rand" + "testing" + "time" + + "github.com/stretchr/testify/suite" + + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/simapp" + simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/simulation" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" +) + +type SimTestSuite struct { + suite.Suite + + ctx sdk.Context + app *simapp.SimApp + protoCdc *codec.ProtoCodec +} + +func (suite *SimTestSuite) SetupTest() { + checkTx := false + app := simapp.Setup(checkTx) + suite.app = app + suite.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{}) + suite.protoCdc = codec.NewProtoCodec(suite.app.InterfaceRegistry()) + +} + +func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { + app, ctx := suite.app, suite.ctx + accounts := simtypes.RandomAccounts(r, n) + require := suite.Require() + + initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200) + initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) + + // add coins to the accounts + for _, account := range accounts { + acc := app.AccountKeeper.NewAccountWithAddress(ctx, account.Address) + app.AccountKeeper.SetAccount(ctx, acc) + err := app.BankKeeper.SetBalances(ctx, account.Address, initCoins) + require.NoError(err) + } + + return accounts +} + +func (suite *SimTestSuite) TestWeightedOperations() { + app, ctx := suite.app, suite.ctx + require := suite.Require() + + ctx.WithChainID("test-chain") + + cdc := app.AppCodec() + appParams := make(simtypes.AppParams) + + weightesOps := simulation.WeightedOperations( + appParams, cdc, app.AccountKeeper, + app.BankKeeper, app.FeeGrantKeeper, + suite.protoCdc, + ) + + s := rand.NewSource(1) + r := rand.New(s) + accs := suite.getTestingAccounts(r, 3) + + expected := []struct { + weight int + opMsgRoute string + opMsgName string + }{ + { + simappparams.DefaultWeightGrantFeeAllowance, + types.ModuleName, + simulation.TypeMsgGrantFeeAllowance, + }, + { + simappparams.DefaultWeightRevokeFeeAllowance, + types.ModuleName, + simulation.TypeMsgRevokeFeeAllowance, + }, + } + + for i, w := range weightesOps { + operationMsg, _, _ := w.Op()(r, app.BaseApp, ctx, accs, ctx.ChainID()) + // the following checks are very much dependent from the ordering of the output given + // by WeightedOperations. if the ordering in WeightedOperations changes some tests + // will fail + require.Equal(expected[i].weight, w.Weight(), "weight should be the same") + require.Equal(expected[i].opMsgRoute, operationMsg.Route, "route should be the same") + require.Equal(expected[i].opMsgName, operationMsg.Name, "operation Msg name should be the same") + } +} + +func (suite *SimTestSuite) TestSimulateMsgGrantFeeAllowance() { + app, ctx := suite.app, suite.ctx + require := suite.Require() + + s := rand.NewSource(1) + r := rand.New(s) + accounts := suite.getTestingAccounts(r, 3) + + // begin a new block + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) + + // execute operation + op := simulation.SimulateMsgGrantFeeAllowance(app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, suite.protoCdc) + operationMsg, futureOperations, err := op(r, app.BaseApp, ctx, accounts, "") + require.NoError(err) + + var msg types.MsgGrantFeeAllowance + suite.app.AppCodec().UnmarshalJSON(operationMsg.Msg, &msg) + + require.True(operationMsg.OK) + require.Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Granter) + require.Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Grantee) + require.Len(futureOperations, 0) +} + +func (suite *SimTestSuite) TestSimulateMsgRevokeFeeAllowance() { + app, ctx := suite.app, suite.ctx + require := suite.Require() + + s := rand.NewSource(1) + r := rand.New(s) + accounts := suite.getTestingAccounts(r, 3) + + // begin a new block + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + + feeAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200000) + feeCoins := sdk.NewCoins(sdk.NewCoin("foo", feeAmt)) + + granter, grantee := accounts[0], accounts[1] + + err := app.FeeGrantKeeper.GrantFeeAllowance( + ctx, + granter.Address, + grantee.Address, + &types.BasicFeeAllowance{ + SpendLimit: feeCoins, + Expiration: types.ExpiresAtTime(ctx.BlockTime().Add(30 * time.Hour)), + }, + ) + require.NoError(err) + + // execute operation + op := simulation.SimulateMsgRevokeFeeAllowance(app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, suite.protoCdc) + operationMsg, futureOperations, err := op(r, app.BaseApp, ctx, accounts, "") + require.NoError(err) + + var msg types.MsgRevokeFeeAllowance + suite.app.AppCodec().UnmarshalJSON(operationMsg.Msg, &msg) + + require.True(operationMsg.OK) + require.Equal(granter.Address.String(), msg.Granter) + require.Equal(grantee.Address.String(), msg.Grantee) + require.Len(futureOperations, 0) +} + +func TestSimTestSuite(t *testing.T) { + suite.Run(t, new(SimTestSuite)) +} diff --git a/x/feegrant/types/basic_fee.go b/x/feegrant/types/basic_fee.go new file mode 100644 index 000000000000..6d970680510f --- /dev/null +++ b/x/feegrant/types/basic_fee.go @@ -0,0 +1,61 @@ +package types + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ FeeAllowanceI = (*BasicFeeAllowance)(nil) + +// Accept can use fee payment requested as well as timestamp/height of the current block +// to determine whether or not to process this. This is checked in +// Keeper.UseGrantedFees and the return values should match how it is handled there. +// +// If it returns an error, the fee payment is rejected, otherwise it is accepted. +// The FeeAllowance implementation is expected to update it's internal state +// and will be saved again after an acceptance. +// +// If remove is true (regardless of the error), the FeeAllowance will be deleted from storage +// (eg. when it is used up). (See call to RevokeFeeAllowance in Keeper.UseGrantedFees) +func (a *BasicFeeAllowance) Accept(fee sdk.Coins, blockTime time.Time, blockHeight int64) (bool, error) { + if a.Expiration.IsExpired(&blockTime, blockHeight) { + return true, sdkerrors.Wrap(ErrFeeLimitExpired, "basic allowance") + } + + if a.SpendLimit != nil { + left, invalid := a.SpendLimit.SafeSub(fee) + if invalid { + return false, sdkerrors.Wrap(ErrFeeLimitExceeded, "basic allowance") + } + + a.SpendLimit = left + return left.IsZero(), nil + } + + return false, nil +} + +// PrepareForExport will adjust the expiration based on export time. In particular, +// it will subtract the dumpHeight from any height-based expiration to ensure that +// the elapsed number of blocks this allowance is valid for is fixed. +func (a *BasicFeeAllowance) PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceI { + return &BasicFeeAllowance{ + SpendLimit: a.SpendLimit, + Expiration: a.Expiration.PrepareForExport(dumpTime, dumpHeight), + } +} + +// ValidateBasic implements FeeAllowance and enforces basic sanity checks +func (a BasicFeeAllowance) ValidateBasic() error { + if a.SpendLimit != nil { + if !a.SpendLimit.IsValid() { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "send amount is invalid: %s", a.SpendLimit) + } + if !a.SpendLimit.IsAllPositive() { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "spend limit must be positive") + } + } + return a.Expiration.ValidateBasic() +} diff --git a/x/feegrant/types/basic_fee_test.go b/x/feegrant/types/basic_fee_test.go new file mode 100644 index 000000000000..a5669e99ada4 --- /dev/null +++ b/x/feegrant/types/basic_fee_test.go @@ -0,0 +1,140 @@ +package types_test + +import ( + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestBasicFeeValidAllow(t *testing.T) { + eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 10)) + atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) + smallAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 43)) + bigAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 1000)) + leftAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 512)) + + cases := map[string]struct { + allow *types.BasicFeeAllowance + // all other checks are ignored if valid=false + fee sdk.Coins + blockTime time.Time + blockHeight int64 + valid bool + accept bool + remove bool + remains sdk.Coins + }{ + "empty": { + allow: &types.BasicFeeAllowance{}, + valid: true, + accept: true, + }, + "small fee without expire": { + allow: &types.BasicFeeAllowance{ + SpendLimit: atom, + }, + valid: true, + fee: smallAtom, + accept: true, + remove: false, + remains: leftAtom, + }, + "all fee without expire": { + allow: &types.BasicFeeAllowance{ + SpendLimit: smallAtom, + }, + valid: true, + fee: smallAtom, + accept: true, + remove: true, + }, + "wrong fee": { + allow: &types.BasicFeeAllowance{ + SpendLimit: smallAtom, + }, + valid: true, + fee: eth, + accept: false, + }, + "non-expired": { + allow: &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + valid: true, + fee: smallAtom, + blockHeight: 85, + accept: true, + remove: false, + remains: leftAtom, + }, + "expired": { + allow: &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + valid: true, + fee: smallAtom, + blockHeight: 121, + accept: false, + remove: true, + }, + "fee more than allowed": { + allow: &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + valid: true, + fee: bigAtom, + blockHeight: 85, + accept: false, + }, + "with out spend limit": { + allow: &types.BasicFeeAllowance{ + Expiration: types.ExpiresAtHeight(100), + }, + valid: true, + fee: bigAtom, + blockHeight: 85, + accept: true, + }, + "expired no spend limit": { + allow: &types.BasicFeeAllowance{ + Expiration: types.ExpiresAtHeight(100), + }, + valid: true, + fee: bigAtom, + blockHeight: 120, + accept: false, + }, + } + + for name, stc := range cases { + tc := stc // to make scopelint happy + t.Run(name, func(t *testing.T) { + err := tc.allow.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + // now try to deduct + remove, err := tc.allow.Accept(tc.fee, tc.blockTime, tc.blockHeight) + if !tc.accept { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, tc.remove, remove) + if !remove { + assert.Equal(t, tc.allow.SpendLimit, tc.remains) + } + }) + } +} diff --git a/x/feegrant/types/codec.go b/x/feegrant/types/codec.go new file mode 100644 index 000000000000..686187cd7510 --- /dev/null +++ b/x/feegrant/types/codec.go @@ -0,0 +1,24 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +// RegisterInterfaces registers the interfaces types with the interface registry +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.MsgRequest)(nil), + &MsgGrantFeeAllowance{}, + &MsgRevokeFeeAllowance{}, + ) + + registry.RegisterInterface( + "cosmos.feegrant.v1beta1.FeeAllowanceI", + (*FeeAllowanceI)(nil), + &BasicFeeAllowance{}, + &PeriodicFeeAllowance{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/feegrant/types/errors.go b/x/feegrant/types/errors.go new file mode 100644 index 000000000000..183f681ca5dc --- /dev/null +++ b/x/feegrant/types/errors.go @@ -0,0 +1,21 @@ +package types + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Codes for governance errors +const ( + DefaultCodespace = ModuleName +) + +var ( + // ErrFeeLimitExceeded error if there are not enough allowance to cover the fees + ErrFeeLimitExceeded = sdkerrors.Register(DefaultCodespace, 2, "fee limit exceeded") + // ErrFeeLimitExpired error if the allowance has expired + ErrFeeLimitExpired = sdkerrors.Register(DefaultCodespace, 3, "fee allowance expired") + // ErrInvalidDuration error if the Duration is invalid or doesn't match the expiration + ErrInvalidDuration = sdkerrors.Register(DefaultCodespace, 4, "invalid duration") + // ErrNoAllowance error if there is no allowance for that pair + ErrNoAllowance = sdkerrors.Register(DefaultCodespace, 5, "no allowance") +) diff --git a/x/feegrant/types/events.go b/x/feegrant/types/events.go new file mode 100644 index 000000000000..b82ccb7b1cd8 --- /dev/null +++ b/x/feegrant/types/events.go @@ -0,0 +1,13 @@ +package types + +// evidence module events +const ( + EventTypeUseFeeGrant = "use_feegrant" + EventTypeRevokeFeeGrant = "revoke_feegrant" + EventTypeSetFeeGrant = "set_feegrant" + + AttributeKeyGranter = "granter" + AttributeKeyGrantee = "grantee" + + AttributeValueCategory = ModuleName +) diff --git a/x/feegrant/types/expected_keepers.go b/x/feegrant/types/expected_keepers.go new file mode 100644 index 000000000000..40966b06d47f --- /dev/null +++ b/x/feegrant/types/expected_keepers.go @@ -0,0 +1,23 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + auth "github.com/cosmos/cosmos-sdk/x/auth/types" + // supply "github.com/cosmos/cosmos-sdk/x/supply/exported" +) + +// AccountKeeper defines the expected auth Account Keeper (noalias) +type AccountKeeper interface { + GetModuleAddress(moduleName string) sdk.AccAddress + GetModuleAccount(ctx sdk.Context, moduleName string) auth.ModuleAccountI + + NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) auth.AccountI + GetAccount(ctx sdk.Context, addr sdk.AccAddress) auth.AccountI + SetAccount(ctx sdk.Context, acc auth.AccountI) +} + +// BankKeeper defines the expected supply Keeper (noalias) +type BankKeeper interface { + SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error +} diff --git a/x/feegrant/types/expiration.go b/x/feegrant/types/expiration.go new file mode 100644 index 000000000000..4922b6d481d0 --- /dev/null +++ b/x/feegrant/types/expiration.go @@ -0,0 +1,138 @@ +package types + +import ( + "time" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// ExpiresAtTime creates an expiration at the given time +func ExpiresAtTime(t time.Time) ExpiresAt { + return ExpiresAt{ + Sum: &ExpiresAt_Time{ + Time: &t, + }, + } +} + +// ExpiresAtHeight creates an expiration at the given height +func ExpiresAtHeight(h int64) ExpiresAt { + return ExpiresAt{ + &ExpiresAt_Height{ + Height: h, + }, + } +} + +// ValidateBasic performs basic sanity checks. +// Note that empty expiration is allowed +func (e ExpiresAt) ValidateBasic() error { + if e.HasDefinedTime() && e.GetHeight() != 0 { + return sdkerrors.Wrap(ErrInvalidDuration, "both time and height are set") + } + if e.GetHeight() < 0 { + return sdkerrors.Wrap(ErrInvalidDuration, "negative height") + } + return nil +} + +// Undefined returns true for an uninitialized struct +func (e ExpiresAt) Undefined() bool { + return (e.GetTime() == nil || e.GetTime().Unix() <= 0) && e.GetHeight() == 0 +} + +// HasDefinedTime returns true if `ExpiresAt` has valid time +func (e ExpiresAt) HasDefinedTime() bool { + t := e.GetTime() + return t != nil && t.Unix() > 0 +} + +// FastForward produces a new Expiration with the time or height set to the +// new value, depending on what was set on the original expiration +func (e ExpiresAt) FastForward(t time.Time, h int64) ExpiresAt { + if e.HasDefinedTime() { + return ExpiresAtTime(t) + } + return ExpiresAtHeight(h) +} + +// IsExpired returns if the time or height is *equal to* or greater +// than the defined expiration point. Note that it is expired upon +// an exact match. +// +// Note a "zero" ExpiresAt is never expired +func (e ExpiresAt) IsExpired(t *time.Time, h int64) bool { + if e.HasDefinedTime() && t.After(*e.GetTime()) { + return true + } + + return e.GetHeight() != 0 && h >= e.GetHeight() +} + +// IsCompatible returns true iff the two use the same units. +// If false, they cannot be added. +func (e ExpiresAt) IsCompatible(d Duration) bool { + if e.HasDefinedTime() { + return d.GetDuration() != nil && d.GetDuration().Seconds() > float64(0) + } + return d.GetBlocks() > 0 +} + +// Step will increase the expiration point by one Duration +// It returns an error if the Duration is incompatible +func (e ExpiresAt) Step(d Duration) (ExpiresAt, error) { + if !e.IsCompatible(d) { + return ExpiresAt{}, sdkerrors.Wrap(ErrInvalidDuration, "expiration time and provided duration have different units") + } + if e.HasDefinedTime() { + return ExpiresAtTime(e.GetTime().Add(*d.GetDuration())), nil + } + return ExpiresAtHeight(e.GetHeight() + int64(d.GetBlocks())), nil +} + +// MustStep is like Step, but panics on error +func (e ExpiresAt) MustStep(d Duration) ExpiresAt { + res, err := e.Step(d) + if err != nil { + panic(err) + } + return res +} + +// PrepareForExport will deduct the dumpHeight from the expiration, so when this is +// reloaded after a hard fork, the actual number of allowed blocks is constant +func (e ExpiresAt) PrepareForExport(dumpTime time.Time, dumpHeight int64) ExpiresAt { + if e.GetHeight() != 0 { + return ExpiresAtHeight(e.GetHeight() - dumpHeight) + } + return ExpiresAt{} +} + +// ClockDuration creates an Duration by clock time +func ClockDuration(d time.Duration) Duration { + return Duration{Sum: &Duration_Duration{ + Duration: &d, + }} +} + +// BlockDuration creates an Duration by block height +func BlockDuration(h uint64) Duration { + return Duration{Sum: &Duration_Blocks{ + Blocks: h, + }} +} + +// ValidateBasic performs basic sanity checks +// Note that exactly one must be set and it must be positive +func (d Duration) ValidateBasic() error { + if d.GetBlocks() == 0 && d.GetDuration() == nil { + return sdkerrors.Wrap(ErrInvalidDuration, "neither time and height are set") + } + if d.GetBlocks() != 0 && d.GetDuration() != nil && d.GetDuration().Seconds() != float64(0) { + return sdkerrors.Wrap(ErrInvalidDuration, "both time and height are set") + } + if d.GetDuration() != nil && d.GetDuration().Seconds() < 0 { + return sdkerrors.Wrap(ErrInvalidDuration, "negative clock step") + } + return nil +} diff --git a/x/feegrant/types/expiration_test.go b/x/feegrant/types/expiration_test.go new file mode 100644 index 000000000000..60b1753bcbc1 --- /dev/null +++ b/x/feegrant/types/expiration_test.go @@ -0,0 +1,161 @@ +package types_test + +import ( + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestExpiresAt(t *testing.T) { + now := time.Now() + + cases := map[string]struct { + example types.ExpiresAt + valid bool + zero bool + before types.ExpiresAt + after types.ExpiresAt + }{ + "basic": { + example: types.ExpiresAtHeight(100), + valid: true, + before: types.ExpiresAtHeight(50), + after: types.ExpiresAtHeight(122), + }, + "zero": { + example: types.ExpiresAt{}, + zero: true, + valid: true, + before: types.ExpiresAtHeight(1), + }, + "match height": { + example: types.ExpiresAtHeight(1000), + valid: true, + before: types.ExpiresAtHeight(999), + after: types.ExpiresAtHeight(1000), + }, + "match time": { + example: types.ExpiresAtTime(now), + valid: true, + before: types.ExpiresAtTime(now.Add(-1 * time.Second)), + after: types.ExpiresAtTime(now.Add(1 * time.Second)), + }, + } + + for name, stc := range cases { + tc := stc // to make scopelint happy + t.Run(name, func(t *testing.T) { + err := tc.example.ValidateBasic() + assert.Equal(t, tc.zero, tc.example.Undefined()) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + if !tc.before.Undefined() { + assert.Equal(t, false, tc.example.IsExpired(tc.before.GetTime(), tc.before.GetHeight())) + } + if !tc.after.Undefined() { + assert.Equal(t, true, tc.example.IsExpired(tc.after.GetTime(), tc.after.GetHeight())) + } + }) + } +} + +func TestDurationValid(t *testing.T) { + now := time.Now() + + cases := map[string]struct { + period types.Duration + valid bool + compatible types.ExpiresAt + incompatible types.ExpiresAt + }{ + "basic height": { + period: types.BlockDuration(100), + valid: true, + compatible: types.ExpiresAtHeight(50), + incompatible: types.ExpiresAtTime(now), + }, + "basic time": { + period: types.ClockDuration(time.Hour), + valid: true, + compatible: types.ExpiresAtTime(now), + incompatible: types.ExpiresAtHeight(50), + }, + "zero": { + period: types.Duration{}, + valid: false, + }, + "negative clock": { + period: types.ClockDuration(-1 * time.Hour), + valid: false, + }, + } + + for name, stc := range cases { + tc := stc // to make scopelint happy + t.Run(name, func(t *testing.T) { + err := tc.period.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + assert.Equal(t, true, tc.compatible.IsCompatible(tc.period)) + assert.Equal(t, false, tc.incompatible.IsCompatible(tc.period)) + }) + } +} + +func TestDurationStep(t *testing.T) { + now := time.Now() + + cases := map[string]struct { + expires types.ExpiresAt + period types.Duration + valid bool + result types.ExpiresAt + }{ + "add height": { + expires: types.ExpiresAtHeight(789), + period: types.BlockDuration(100), + valid: true, + result: types.ExpiresAtHeight(889), + }, + "add time": { + expires: types.ExpiresAtTime(now), + period: types.ClockDuration(time.Hour), + valid: true, + result: types.ExpiresAtTime(now.Add(time.Hour)), + }, + "mismatch": { + expires: types.ExpiresAtHeight(789), + period: types.ClockDuration(time.Hour), + valid: false, + }, + } + + for name, stc := range cases { + tc := stc // to make scopelint happy + t.Run(name, func(t *testing.T) { + err := tc.period.ValidateBasic() + require.NoError(t, err) + err = tc.expires.ValidateBasic() + require.NoError(t, err) + + next, err := tc.expires.Step(tc.period) + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + require.Equal(t, tc.result, next) + }) + } +} diff --git a/x/feegrant/types/feegrant.pb.go b/x/feegrant/types/feegrant.pb.go new file mode 100644 index 000000000000..2897bcc392d6 --- /dev/null +++ b/x/feegrant/types/feegrant.pb.go @@ -0,0 +1,1701 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/feegrant/v1beta1/feegrant.proto + +package types + +import ( + fmt "fmt" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/golang/protobuf/ptypes/timestamp" + _ "github.com/regen-network/cosmos-proto" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// BasicFeeAllowance implements FeeAllowance with a one-time grant of tokens +// that optionally expires. The delegatee can use up to SpendLimit to cover fees. +type BasicFeeAllowance struct { + // spend_limit specifies the maximum amount of tokens that can be spent + // by this allowance and will be updated as tokens are spent. If it is + // empty, there is no spend limit and any amount of coins can be spent. + SpendLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"spend_limit"` + // expiration specifies an optional time when this allowance expires + Expiration ExpiresAt `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration"` +} + +func (m *BasicFeeAllowance) Reset() { *m = BasicFeeAllowance{} } +func (m *BasicFeeAllowance) String() string { return proto.CompactTextString(m) } +func (*BasicFeeAllowance) ProtoMessage() {} +func (*BasicFeeAllowance) Descriptor() ([]byte, []int) { + return fileDescriptor_7279582900c30aea, []int{0} +} +func (m *BasicFeeAllowance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BasicFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BasicFeeAllowance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BasicFeeAllowance) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasicFeeAllowance.Merge(m, src) +} +func (m *BasicFeeAllowance) XXX_Size() int { + return m.Size() +} +func (m *BasicFeeAllowance) XXX_DiscardUnknown() { + xxx_messageInfo_BasicFeeAllowance.DiscardUnknown(m) +} + +var xxx_messageInfo_BasicFeeAllowance proto.InternalMessageInfo + +func (m *BasicFeeAllowance) GetSpendLimit() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.SpendLimit + } + return nil +} + +func (m *BasicFeeAllowance) GetExpiration() ExpiresAt { + if m != nil { + return m.Expiration + } + return ExpiresAt{} +} + +// PeriodicFeeAllowance extends FeeAllowance to allow for both a maximum cap, +// as well as a limit per time period. +type PeriodicFeeAllowance struct { + // basic specifies a struct of `BasicFeeAllowance` + Basic BasicFeeAllowance `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic"` + // period specifies the time duration in which period_spend_limit coins can + // be spent before that allowance is reset + Period Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period"` + // period_spend_limit specifies the maximum number of coins that can be spent + // in the period + PeriodSpendLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=period_spend_limit,json=periodSpendLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"period_spend_limit"` + // period_can_spend is the number of coins left to be spent before the period_reset time + PeriodCanSpend github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=period_can_spend,json=periodCanSpend,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"period_can_spend"` + // period_reset is the time at which this period resets and a new one begins, + // it is calculated from the start time of the first transaction after the + // last period ended + PeriodReset ExpiresAt `protobuf:"bytes,5,opt,name=period_reset,json=periodReset,proto3" json:"period_reset"` +} + +func (m *PeriodicFeeAllowance) Reset() { *m = PeriodicFeeAllowance{} } +func (m *PeriodicFeeAllowance) String() string { return proto.CompactTextString(m) } +func (*PeriodicFeeAllowance) ProtoMessage() {} +func (*PeriodicFeeAllowance) Descriptor() ([]byte, []int) { + return fileDescriptor_7279582900c30aea, []int{1} +} +func (m *PeriodicFeeAllowance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PeriodicFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PeriodicFeeAllowance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PeriodicFeeAllowance) XXX_Merge(src proto.Message) { + xxx_messageInfo_PeriodicFeeAllowance.Merge(m, src) +} +func (m *PeriodicFeeAllowance) XXX_Size() int { + return m.Size() +} +func (m *PeriodicFeeAllowance) XXX_DiscardUnknown() { + xxx_messageInfo_PeriodicFeeAllowance.DiscardUnknown(m) +} + +var xxx_messageInfo_PeriodicFeeAllowance proto.InternalMessageInfo + +func (m *PeriodicFeeAllowance) GetBasic() BasicFeeAllowance { + if m != nil { + return m.Basic + } + return BasicFeeAllowance{} +} + +func (m *PeriodicFeeAllowance) GetPeriod() Duration { + if m != nil { + return m.Period + } + return Duration{} +} + +func (m *PeriodicFeeAllowance) GetPeriodSpendLimit() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.PeriodSpendLimit + } + return nil +} + +func (m *PeriodicFeeAllowance) GetPeriodCanSpend() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.PeriodCanSpend + } + return nil +} + +func (m *PeriodicFeeAllowance) GetPeriodReset() ExpiresAt { + if m != nil { + return m.PeriodReset + } + return ExpiresAt{} +} + +// Duration is a span of a clock time or number of blocks. +// This is designed to be added to an ExpiresAt struct. +type Duration struct { + // sum is the oneof that represents either duration or block + // + // Types that are valid to be assigned to Sum: + // *Duration_Duration + // *Duration_Blocks + Sum isDuration_Sum `protobuf_oneof:"sum"` +} + +func (m *Duration) Reset() { *m = Duration{} } +func (m *Duration) String() string { return proto.CompactTextString(m) } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { + return fileDescriptor_7279582900c30aea, []int{2} +} +func (m *Duration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Duration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Duration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Duration.Merge(m, src) +} +func (m *Duration) XXX_Size() int { + return m.Size() +} +func (m *Duration) XXX_DiscardUnknown() { + xxx_messageInfo_Duration.DiscardUnknown(m) +} + +var xxx_messageInfo_Duration proto.InternalMessageInfo + +type isDuration_Sum interface { + isDuration_Sum() + MarshalTo([]byte) (int, error) + Size() int +} + +type Duration_Duration struct { + Duration *time.Duration `protobuf:"bytes,1,opt,name=duration,proto3,oneof,stdduration" json:"duration,omitempty"` +} +type Duration_Blocks struct { + Blocks uint64 `protobuf:"varint,2,opt,name=blocks,proto3,oneof" json:"blocks,omitempty"` +} + +func (*Duration_Duration) isDuration_Sum() {} +func (*Duration_Blocks) isDuration_Sum() {} + +func (m *Duration) GetSum() isDuration_Sum { + if m != nil { + return m.Sum + } + return nil +} + +func (m *Duration) GetDuration() *time.Duration { + if x, ok := m.GetSum().(*Duration_Duration); ok { + return x.Duration + } + return nil +} + +func (m *Duration) GetBlocks() uint64 { + if x, ok := m.GetSum().(*Duration_Blocks); ok { + return x.Blocks + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Duration) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Duration_Duration)(nil), + (*Duration_Blocks)(nil), + } +} + +// ExpiresAt is a point in time where something expires. +// It may be *either* block time or block height +type ExpiresAt struct { + // sum is the oneof that represents either time or height + // + // Types that are valid to be assigned to Sum: + // *ExpiresAt_Time + // *ExpiresAt_Height + Sum isExpiresAt_Sum `protobuf_oneof:"sum"` +} + +func (m *ExpiresAt) Reset() { *m = ExpiresAt{} } +func (m *ExpiresAt) String() string { return proto.CompactTextString(m) } +func (*ExpiresAt) ProtoMessage() {} +func (*ExpiresAt) Descriptor() ([]byte, []int) { + return fileDescriptor_7279582900c30aea, []int{3} +} +func (m *ExpiresAt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpiresAt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExpiresAt.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExpiresAt) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpiresAt.Merge(m, src) +} +func (m *ExpiresAt) XXX_Size() int { + return m.Size() +} +func (m *ExpiresAt) XXX_DiscardUnknown() { + xxx_messageInfo_ExpiresAt.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpiresAt proto.InternalMessageInfo + +type isExpiresAt_Sum interface { + isExpiresAt_Sum() + MarshalTo([]byte) (int, error) + Size() int +} + +type ExpiresAt_Time struct { + Time *time.Time `protobuf:"bytes,1,opt,name=time,proto3,oneof,stdtime" json:"time,omitempty"` +} +type ExpiresAt_Height struct { + Height int64 `protobuf:"varint,2,opt,name=height,proto3,oneof" json:"height,omitempty"` +} + +func (*ExpiresAt_Time) isExpiresAt_Sum() {} +func (*ExpiresAt_Height) isExpiresAt_Sum() {} + +func (m *ExpiresAt) GetSum() isExpiresAt_Sum { + if m != nil { + return m.Sum + } + return nil +} + +func (m *ExpiresAt) GetTime() *time.Time { + if x, ok := m.GetSum().(*ExpiresAt_Time); ok { + return x.Time + } + return nil +} + +func (m *ExpiresAt) GetHeight() int64 { + if x, ok := m.GetSum().(*ExpiresAt_Height); ok { + return x.Height + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ExpiresAt) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ExpiresAt_Time)(nil), + (*ExpiresAt_Height)(nil), + } +} + +// FeeAllowanceGrant is stored in the KVStore to record a grant with full context +type FeeAllowanceGrant struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` + Allowance *types1.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` +} + +func (m *FeeAllowanceGrant) Reset() { *m = FeeAllowanceGrant{} } +func (m *FeeAllowanceGrant) String() string { return proto.CompactTextString(m) } +func (*FeeAllowanceGrant) ProtoMessage() {} +func (*FeeAllowanceGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_7279582900c30aea, []int{4} +} +func (m *FeeAllowanceGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeAllowanceGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeAllowanceGrant.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeAllowanceGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeAllowanceGrant.Merge(m, src) +} +func (m *FeeAllowanceGrant) XXX_Size() int { + return m.Size() +} +func (m *FeeAllowanceGrant) XXX_DiscardUnknown() { + xxx_messageInfo_FeeAllowanceGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeAllowanceGrant proto.InternalMessageInfo + +func (m *FeeAllowanceGrant) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *FeeAllowanceGrant) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *FeeAllowanceGrant) GetAllowance() *types1.Any { + if m != nil { + return m.Allowance + } + return nil +} + +func init() { + proto.RegisterType((*BasicFeeAllowance)(nil), "cosmos.feegrant.v1beta1.BasicFeeAllowance") + proto.RegisterType((*PeriodicFeeAllowance)(nil), "cosmos.feegrant.v1beta1.PeriodicFeeAllowance") + proto.RegisterType((*Duration)(nil), "cosmos.feegrant.v1beta1.Duration") + proto.RegisterType((*ExpiresAt)(nil), "cosmos.feegrant.v1beta1.ExpiresAt") + proto.RegisterType((*FeeAllowanceGrant)(nil), "cosmos.feegrant.v1beta1.FeeAllowanceGrant") +} + +func init() { + proto.RegisterFile("cosmos/feegrant/v1beta1/feegrant.proto", fileDescriptor_7279582900c30aea) +} + +var fileDescriptor_7279582900c30aea = []byte{ + // 599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6e, 0xd3, 0x40, + 0x14, 0xc6, 0x6d, 0x9c, 0x96, 0x76, 0x02, 0x88, 0x8c, 0x22, 0xe1, 0x64, 0xe1, 0x94, 0x2c, 0x50, + 0x84, 0x14, 0x9b, 0x16, 0x89, 0x05, 0x12, 0x42, 0x71, 0x69, 0x1b, 0x04, 0x0b, 0x64, 0x58, 0xb1, + 0x89, 0x6c, 0x67, 0xea, 0x0c, 0xb5, 0x3d, 0x96, 0x67, 0x02, 0xcd, 0x25, 0x50, 0x97, 0x9c, 0x81, + 0x35, 0x87, 0xa8, 0x58, 0x55, 0xac, 0x58, 0xb5, 0x28, 0x39, 0x01, 0x37, 0x40, 0xf3, 0xc7, 0x4e, + 0x94, 0x10, 0x24, 0xa4, 0xae, 0xe2, 0x99, 0x79, 0xef, 0xfb, 0xbd, 0xf7, 0xbd, 0x99, 0x80, 0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30, 0xe8, 0x38, 0x69, 0x0f, 0xc1, + 0x76, 0x59, 0x1e, 0x7c, 0x02, 0x2a, 0xfc, 0x01, 0x2a, 0x50, 0x73, 0x05, 0xf4, 0xae, 0x78, 0x9d, + 0x6e, 0xe5, 0x4c, 0x92, 0x44, 0x3c, 0xa7, 0x8c, 0x10, 0x8e, 0x46, 0x4c, 0x50, 0x0c, 0x4e, 0x91, + 0xeb, 0x82, 0xf2, 0x59, 0x07, 0xb5, 0xc5, 0x1e, 0x8f, 0xb8, 0x3f, 0xd0, 0x04, 0x37, 0x85, 0x51, + 0x28, 0x17, 0xc4, 0x6d, 0xaf, 0x58, 0xce, 0x4f, 0x90, 0x50, 0x2c, 0x4f, 0x10, 0x3c, 0x00, 0xdb, + 0x7e, 0xa1, 0x62, 0x1a, 0xa2, 0xce, 0xfa, 0x4a, 0x9d, 0xbd, 0x74, 0xe2, 0xd6, 0xbe, 0x2f, 0xfb, + 0xea, 0xcd, 0x33, 0xdd, 0xa3, 0xf3, 0xa9, 0xa5, 0x5f, 0x4c, 0x2d, 0xfd, 0xd7, 0xd4, 0xd2, 0xcf, + 0x66, 0x96, 0x76, 0x31, 0xb3, 0xb4, 0x9f, 0x33, 0x4b, 0x7b, 0xdf, 0xfd, 0xe7, 0xb5, 0x38, 0x9d, + 0xff, 0xaf, 0x8a, 0x1b, 0x12, 0x6c, 0x0a, 0xe8, 0xe3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x74, + 0x27, 0xe6, 0x00, 0x77, 0x05, 0x00, 0x00, +} + +func (m *BasicFeeAllowance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BasicFeeAllowance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasicFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Expiration.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.SpendLimit) > 0 { + for iNdEx := len(m.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpendLimit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PeriodicFeeAllowance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PeriodicFeeAllowance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PeriodicFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.PeriodReset.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.PeriodCanSpend) > 0 { + for iNdEx := len(m.PeriodCanSpend) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PeriodCanSpend[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.PeriodSpendLimit) > 0 { + for iNdEx := len(m.PeriodSpendLimit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PeriodSpendLimit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.Period.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Basic.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Duration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Duration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Duration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *Duration_Duration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Duration_Duration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Duration != nil { + n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintFeegrant(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *Duration_Blocks) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Duration_Blocks) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintFeegrant(dAtA, i, uint64(m.Blocks)) + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *ExpiresAt) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpiresAt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpiresAt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *ExpiresAt_Time) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpiresAt_Time) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Time != nil { + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Time):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintFeegrant(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *ExpiresAt_Height) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpiresAt_Height) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintFeegrant(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *FeeAllowanceGrant) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeeAllowanceGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeAllowanceGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Allowance != nil { + { + size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFeegrant(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintFeegrant(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0x12 + } + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintFeegrant(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFeegrant(dAtA []byte, offset int, v uint64) int { + offset -= sovFeegrant(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *BasicFeeAllowance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SpendLimit) > 0 { + for _, e := range m.SpendLimit { + l = e.Size() + n += 1 + l + sovFeegrant(uint64(l)) + } + } + l = m.Expiration.Size() + n += 1 + l + sovFeegrant(uint64(l)) + return n +} + +func (m *PeriodicFeeAllowance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Basic.Size() + n += 1 + l + sovFeegrant(uint64(l)) + l = m.Period.Size() + n += 1 + l + sovFeegrant(uint64(l)) + if len(m.PeriodSpendLimit) > 0 { + for _, e := range m.PeriodSpendLimit { + l = e.Size() + n += 1 + l + sovFeegrant(uint64(l)) + } + } + if len(m.PeriodCanSpend) > 0 { + for _, e := range m.PeriodCanSpend { + l = e.Size() + n += 1 + l + sovFeegrant(uint64(l)) + } + } + l = m.PeriodReset.Size() + n += 1 + l + sovFeegrant(uint64(l)) + return n +} + +func (m *Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sum != nil { + n += m.Sum.Size() + } + return n +} + +func (m *Duration_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovFeegrant(uint64(l)) + } + return n +} +func (m *Duration_Blocks) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovFeegrant(uint64(m.Blocks)) + return n +} +func (m *ExpiresAt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sum != nil { + n += m.Sum.Size() + } + return n +} + +func (m *ExpiresAt_Time) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Time != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Time) + n += 1 + l + sovFeegrant(uint64(l)) + } + return n +} +func (m *ExpiresAt_Height) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovFeegrant(uint64(m.Height)) + return n +} +func (m *FeeAllowanceGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovFeegrant(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovFeegrant(uint64(l)) + } + if m.Allowance != nil { + l = m.Allowance.Size() + n += 1 + l + sovFeegrant(uint64(l)) + } + return n +} + +func sovFeegrant(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFeegrant(x uint64) (n int) { + return sovFeegrant(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BasicFeeAllowance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BasicFeeAllowance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BasicFeeAllowance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpendLimit = append(m.SpendLimit, types.Coin{}) + if err := m.SpendLimit[len(m.SpendLimit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Expiration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFeegrant(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeegrant + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PeriodicFeeAllowance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PeriodicFeeAllowance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PeriodicFeeAllowance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Period.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodSpendLimit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeriodSpendLimit = append(m.PeriodSpendLimit, types.Coin{}) + if err := m.PeriodSpendLimit[len(m.PeriodSpendLimit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodCanSpend", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeriodCanSpend = append(m.PeriodCanSpend, types.Coin{}) + if err := m.PeriodCanSpend[len(m.PeriodCanSpend)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodReset", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PeriodReset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFeegrant(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeegrant + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Duration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Duration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Duration) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Duration_Duration{v} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Sum = &Duration_Blocks{v} + default: + iNdEx = preIndex + skippy, err := skipFeegrant(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeegrant + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpiresAt) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpiresAt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpiresAt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Time) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &ExpiresAt_Time{v} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Sum = &ExpiresAt_Height{v} + default: + iNdEx = preIndex + skippy, err := skipFeegrant(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeegrant + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeAllowanceGrant) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeAllowanceGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeAllowanceGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeegrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFeegrant + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFeegrant + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Allowance == nil { + m.Allowance = &types1.Any{} + } + if err := m.Allowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFeegrant(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeegrant + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFeegrant(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFeegrant + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFeegrant + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFeegrant + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFeegrant + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFeegrant + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFeegrant + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFeegrant = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFeegrant = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFeegrant = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feegrant/types/fees.go b/x/feegrant/types/fees.go new file mode 100644 index 000000000000..cc526628f5f9 --- /dev/null +++ b/x/feegrant/types/fees.go @@ -0,0 +1,32 @@ +package types + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// FeeAllowance implementations are tied to a given fee delegator and delegatee, +// and are used to enforce fee grant limits. +type FeeAllowanceI interface { + // Accept can use fee payment requested as well as timestamp/height of the current block + // to determine whether or not to process this. This is checked in + // Keeper.UseGrantedFees and the return values should match how it is handled there. + // + // If it returns an error, the fee payment is rejected, otherwise it is accepted. + // The FeeAllowance implementation is expected to update it's internal state + // and will be saved again after an acceptance. + // + // If remove is true (regardless of the error), the FeeAllowance will be deleted from storage + // (eg. when it is used up). (See call to RevokeFeeAllowance in Keeper.UseGrantedFees) + Accept(fee sdk.Coins, blockTime time.Time, blockHeight int64) (remove bool, err error) + + // If we export fee allowances the timing info will be quite off (eg. go from height 100000 to 0) + // This callback allows the fee-allowance to change it's state and return a copy that is adjusted + // given the time and height of the actual dump (may safely return self if no changes needed) + PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceI + + // ValidateBasic should evaluate this FeeAllowance for internal consistency. + // Don't allow negative amounts, or negative periods for example. + ValidateBasic() error +} diff --git a/x/feegrant/types/genesis.go b/x/feegrant/types/genesis.go new file mode 100644 index 000000000000..57ade9b43de2 --- /dev/null +++ b/x/feegrant/types/genesis.go @@ -0,0 +1,40 @@ +package types + +import "github.com/cosmos/cosmos-sdk/codec/types" + +var _ types.UnpackInterfacesMessage = GenesisState{} + +// NewGenesisState creates new GenesisState object +func NewGenesisState(entries []FeeAllowanceGrant) *GenesisState { + return &GenesisState{ + FeeAllowances: entries, + } +} + +// ValidateGenesis ensures all grants in the genesis state are valid +func ValidateGenesis(data GenesisState) error { + for _, f := range data.FeeAllowances { + err := f.GetFeeGrant().ValidateBasic() + if err != nil { + return err + } + } + return nil +} + +// DefaultGenesisState returns default state for feegrant module. +func DefaultGenesisState() *GenesisState { + return &GenesisState{} +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error { + for _, f := range data.FeeAllowances { + err := f.UnpackInterfaces(unpacker) + if err != nil { + return err + } + } + + return nil +} diff --git a/x/feegrant/types/genesis.pb.go b/x/feegrant/types/genesis.pb.go new file mode 100644 index 000000000000..499f57d626d6 --- /dev/null +++ b/x/feegrant/types/genesis.pb.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/feegrant/v1beta1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState contains a set of fee allowances, persisted from the store +type GenesisState struct { + FeeAllowances []FeeAllowanceGrant `protobuf:"bytes,1,rep,name=fee_allowances,json=feeAllowances,proto3" json:"fee_allowances"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_ac719d2d0954d1bf, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetFeeAllowances() []FeeAllowanceGrant { + if m != nil { + return m.FeeAllowances + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "cosmos.feegrant.v1beta1.GenesisState") +} + +func init() { + proto.RegisterFile("cosmos/feegrant/v1beta1/genesis.proto", fileDescriptor_ac719d2d0954d1bf) +} + +var fileDescriptor_ac719d2d0954d1bf = []byte{ + // 221 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x4f, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x12, 0x87, 0x28, 0xd3, 0x83, 0x29, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0xd4, 0x70, 0x99, 0x0a, 0xd7, 0x0f, 0x56, + 0xa7, 0x94, 0xce, 0xc5, 0xe3, 0x0e, 0xb1, 0x27, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x28, 0x9c, 0x8b, + 0x2f, 0x2d, 0x35, 0x35, 0x3e, 0x31, 0x27, 0x27, 0xbf, 0x3c, 0x31, 0x2f, 0x39, 0xb5, 0x58, 0x82, + 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x4b, 0x0f, 0x87, 0xfd, 0x7a, 0x6e, 0xa9, 0xa9, 0x8e, 0x30, + 0xd5, 0xee, 0x20, 0x19, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0x78, 0xd3, 0x90, 0x24, 0x8a, + 0x9d, 0xdc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, + 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x37, 0x3d, 0xb3, + 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xea, 0x6a, 0x08, 0xa5, 0x5b, 0x9c, 0x92, + 0xad, 0x5f, 0x81, 0xf0, 0x42, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0xe1, 0xc6, 0x80, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x53, 0x6e, 0xc5, 0x38, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeeAllowances) > 0 { + for iNdEx := len(m.FeeAllowances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FeeAllowances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FeeAllowances) > 0 { + for _, e := range m.FeeAllowances { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeAllowances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeAllowances = append(m.FeeAllowances, FeeAllowanceGrant{}) + if err := m.FeeAllowances[len(m.FeeAllowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feegrant/types/grant.go b/x/feegrant/types/grant.go new file mode 100644 index 000000000000..ca2c93d9efb2 --- /dev/null +++ b/x/feegrant/types/grant.go @@ -0,0 +1,92 @@ +package types + +import ( + "time" + + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + proto "github.com/gogo/protobuf/proto" +) + +var ( + _ types.UnpackInterfacesMessage = &FeeAllowanceGrant{} +) + +// NewFeeAllowanceGrant creates a new FeeAllowanceGrant. +//nolint:interfacer +func NewFeeAllowanceGrant(granter, grantee sdk.AccAddress, feeAllowance FeeAllowanceI) (FeeAllowanceGrant, error) { + msg, ok := feeAllowance.(proto.Message) + if !ok { + return FeeAllowanceGrant{}, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", feeAllowance) + } + + any, err := types.NewAnyWithValue(msg) + if err != nil { + return FeeAllowanceGrant{}, err + } + + return FeeAllowanceGrant{ + Granter: granter.String(), + Grantee: grantee.String(), + Allowance: any, + }, nil +} + +// ValidateBasic performs basic validation on +// FeeAllowanceGrant +func (a FeeAllowanceGrant) ValidateBasic() error { + if a.Granter == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing granter address") + } + if a.Grantee == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing grantee address") + } + if a.Grantee == a.Granter { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "cannot self-grant fee authorization") + } + + return a.GetFeeGrant().ValidateBasic() +} + +// GetFeeGrant unpacks allowance +func (a FeeAllowanceGrant) GetFeeGrant() FeeAllowanceI { + allowance, ok := a.Allowance.GetCachedValue().(FeeAllowanceI) + if !ok { + return nil + } + + return allowance +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (a FeeAllowanceGrant) UnpackInterfaces(unpacker types.AnyUnpacker) error { + var allowance FeeAllowanceI + return unpacker.UnpackAny(a.Allowance, &allowance) +} + +// PrepareForExport will make all needed changes to the allowance to prepare to be +// re-imported at height 0, and return a copy of this grant. +func (a FeeAllowanceGrant) PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceGrant { + feegrant := a.GetFeeGrant().PrepareForExport(dumpTime, dumpHeight) + if feegrant == nil { + return FeeAllowanceGrant{} + } + + granter, err := sdk.AccAddressFromBech32(a.Granter) + if err != nil { + return FeeAllowanceGrant{} + } + + grantee, err := sdk.AccAddressFromBech32(a.Grantee) + if err != nil { + return FeeAllowanceGrant{} + } + + grant, err := NewFeeAllowanceGrant(granter, grantee, feegrant) + if err != nil { + return FeeAllowanceGrant{} + } + + return grant +} diff --git a/x/feegrant/types/grant_test.go b/x/feegrant/types/grant_test.go new file mode 100644 index 000000000000..a4819b102cb2 --- /dev/null +++ b/x/feegrant/types/grant_test.go @@ -0,0 +1,99 @@ +package types_test + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestGrant(t *testing.T) { + app := simapp.Setup(false) + addr, err := sdk.AccAddressFromBech32("cosmos1qk93t4j0yyzgqgt6k5qf8deh8fq6smpn3ntu3x") + require.NoError(t, err) + addr2, err := sdk.AccAddressFromBech32("cosmos1p9qh4ldfd6n0qehujsal4k7g0e37kel90rc4ts") + require.NoError(t, err) + atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) + + goodGrant, err := types.NewFeeAllowanceGrant(addr2, addr, &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }) + require.NoError(t, err) + + noGranteeGrant, err := types.NewFeeAllowanceGrant(addr2, nil, &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }) + require.NoError(t, err) + + noGranterGrant, err := types.NewFeeAllowanceGrant(nil, addr, &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }) + require.NoError(t, err) + + selfGrant, err := types.NewFeeAllowanceGrant(addr2, addr2, &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }) + require.NoError(t, err) + + badAllowanceGrant, err := types.NewFeeAllowanceGrant(addr2, addr, &types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(-1), + }) + require.NoError(t, err) + + cdc := app.AppCodec() + // RegisterLegacyAminoCodec(cdc) + + cases := map[string]struct { + grant types.FeeAllowanceGrant + valid bool + }{ + "good": { + grant: goodGrant, + valid: true, + }, + "no grantee": { + grant: noGranteeGrant, + }, + "no granter": { + grant: noGranterGrant, + }, + "self-grant": { + grant: selfGrant, + }, + "bad allowance": { + grant: badAllowanceGrant, + }, + } + + for name, tc := range cases { + tc := tc + t.Run(name, func(t *testing.T) { + err := tc.grant.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + // if it is valid, let's try to serialize, deserialize, and make sure it matches + bz, err := cdc.MarshalBinaryBare(&tc.grant) + require.NoError(t, err) + var loaded types.FeeAllowanceGrant + err = cdc.UnmarshalBinaryBare(bz, &loaded) + require.NoError(t, err) + + err = loaded.ValidateBasic() + require.NoError(t, err) + + assert.Equal(t, tc.grant, loaded) + }) + } +} diff --git a/x/feegrant/types/key.go b/x/feegrant/types/key.go new file mode 100644 index 000000000000..7cd1ce4f8c8f --- /dev/null +++ b/x/feegrant/types/key.go @@ -0,0 +1,36 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" +) + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "feegrant" + + // StoreKey is the store key string for supply + StoreKey = ModuleName + + // RouterKey is the message route for supply + RouterKey = ModuleName + + // QuerierRoute is the querier route for supply + QuerierRoute = ModuleName +) + +var ( + // FeeAllowanceKeyPrefix is the set of the kvstore for fee allowance data + FeeAllowanceKeyPrefix = []byte{0x00} +) + +// FeeAllowanceKey is the canonical key to store a grant from granter to grantee +// We store by grantee first to allow searching by everyone who granted to you +func FeeAllowanceKey(granter sdk.AccAddress, grantee sdk.AccAddress) []byte { + return append(FeeAllowancePrefixByGrantee(grantee), address.MustLengthPrefix(granter.Bytes())...) +} + +// FeeAllowancePrefixByGrantee returns a prefix to scan for all grants to this given address. +func FeeAllowancePrefixByGrantee(grantee sdk.AccAddress) []byte { + return append(FeeAllowanceKeyPrefix, address.MustLengthPrefix(grantee.Bytes())...) +} diff --git a/x/feegrant/types/msgs.go b/x/feegrant/types/msgs.go new file mode 100644 index 000000000000..5a25016f87e0 --- /dev/null +++ b/x/feegrant/types/msgs.go @@ -0,0 +1,101 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/gogo/protobuf/proto" +) + +var ( + _, _ sdk.MsgRequest = &MsgGrantFeeAllowance{}, &MsgRevokeFeeAllowance{} + _ types.UnpackInterfacesMessage = &MsgGrantFeeAllowance{} +) + +// feegrant message types +const ( + TypeMsgGrantFeeAllowance = "grant_fee_allowance" + TypeMsgRevokeFeeAllowance = "revoke_fee_allowance" +) + +// NewMsgGrantFeeAllowance creates a new MsgGrantFeeAllowance. +//nolint:interfacer +func NewMsgGrantFeeAllowance(feeAllowance FeeAllowanceI, granter, grantee sdk.AccAddress) (*MsgGrantFeeAllowance, error) { + msg, ok := feeAllowance.(proto.Message) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return nil, err + } + + return &MsgGrantFeeAllowance{ + Granter: granter.String(), + Grantee: grantee.String(), + Allowance: any, + }, nil +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgGrantFeeAllowance) ValidateBasic() error { + if msg.Granter == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing granter address") + } + if msg.Grantee == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing grantee address") + } + if msg.Grantee == msg.Granter { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "cannot self-grant fee authorization") + } + + return msg.GetFeeAllowanceI().ValidateBasic() +} + +func (msg MsgGrantFeeAllowance) GetSigners() []sdk.AccAddress { + granter, err := sdk.AccAddressFromBech32(msg.Granter) + if err != nil { + panic(err) + } + return []sdk.AccAddress{granter} +} + +// GetFeeAllowanceI returns unpacked FeeAllowance +func (msg MsgGrantFeeAllowance) GetFeeAllowanceI() FeeAllowanceI { + allowance, ok := msg.Allowance.GetCachedValue().(FeeAllowanceI) + if !ok { + return nil + } + + return allowance +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (msg MsgGrantFeeAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error { + var allowance FeeAllowanceI + return unpacker.UnpackAny(msg.Allowance, &allowance) +} + +//nolint:interfacer +func NewMsgRevokeFeeAllowance(granter sdk.AccAddress, grantee sdk.AccAddress) MsgRevokeFeeAllowance { + return MsgRevokeFeeAllowance{Granter: granter.String(), Grantee: grantee.String()} +} + +func (msg MsgRevokeFeeAllowance) ValidateBasic() error { + if msg.Granter == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing granter address") + } + if msg.Grantee == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing grantee address") + } + + return nil +} + +func (msg MsgRevokeFeeAllowance) GetSigners() []sdk.AccAddress { + granter, err := sdk.AccAddressFromBech32(msg.Granter) + if err != nil { + panic(err) + } + return []sdk.AccAddress{granter} +} diff --git a/x/feegrant/types/periodic_fee.go b/x/feegrant/types/periodic_fee.go new file mode 100644 index 000000000000..61c9ba2ffe2d --- /dev/null +++ b/x/feegrant/types/periodic_fee.go @@ -0,0 +1,120 @@ +package types + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ FeeAllowanceI = (*PeriodicFeeAllowance)(nil) + +// Accept can use fee payment requested as well as timestamp/height of the current block +// to determine whether or not to process this. This is checked in +// Keeper.UseGrantedFees and the return values should match how it is handled there. +// +// If it returns an error, the fee payment is rejected, otherwise it is accepted. +// The FeeAllowance implementation is expected to update it's internal state +// and will be saved again after an acceptance. +// +// If remove is true (regardless of the error), the FeeAllowance will be deleted from storage +// (eg. when it is used up). (See call to RevokeFeeAllowance in Keeper.UseGrantedFees) +func (a *PeriodicFeeAllowance) Accept(fee sdk.Coins, blockTime time.Time, blockHeight int64) (bool, error) { + if a.Basic.Expiration.IsExpired(&blockTime, blockHeight) { + return true, sdkerrors.Wrap(ErrFeeLimitExpired, "absolute limit") + } + + a.tryResetPeriod(blockTime, blockHeight) + + // deduct from both the current period and the max amount + var isNeg bool + a.PeriodCanSpend, isNeg = a.PeriodCanSpend.SafeSub(fee) + if isNeg { + return false, sdkerrors.Wrap(ErrFeeLimitExceeded, "period limit") + } + + if a.Basic.SpendLimit != nil { + a.Basic.SpendLimit, isNeg = a.Basic.SpendLimit.SafeSub(fee) + if isNeg { + return false, sdkerrors.Wrap(ErrFeeLimitExceeded, "absolute limit") + } + + return a.Basic.SpendLimit.IsZero(), nil + } + + return false, nil +} + +// tryResetPeriod will check if the PeriodReset has been hit. If not, it is a no-op. +// If we hit the reset period, it will top up the PeriodCanSpend amount to +// min(PeriodicSpendLimit, a.Basic.SpendLimit) so it is never more than the maximum allowed. +// It will also update the PeriodReset. If we are within one Period, it will update from the +// last PeriodReset (eg. if you always do one tx per day, it will always reset the same time) +// If we are more then one period out (eg. no activity in a week), reset is one Period from the execution of this method +func (a *PeriodicFeeAllowance) tryResetPeriod(blockTime time.Time, blockHeight int64) { + if !a.PeriodReset.Undefined() && !a.PeriodReset.IsExpired(&blockTime, blockHeight) { + return + } + // set CanSpend to the lesser of PeriodSpendLimit and the TotalLimit + if _, isNeg := a.Basic.SpendLimit.SafeSub(a.PeriodSpendLimit); isNeg { + a.PeriodCanSpend = a.Basic.SpendLimit + } else { + a.PeriodCanSpend = a.PeriodSpendLimit + } + + // If we are within the period, step from expiration (eg. if you always do one tx per day, it will always reset the same time) + // If we are more then one period out (eg. no activity in a week), reset is one period from this time + a.PeriodReset = a.PeriodReset.MustStep(a.Period) + if a.PeriodReset.IsExpired(&blockTime, blockHeight) { + a.PeriodReset = a.PeriodReset.FastForward(blockTime, blockHeight).MustStep(a.Period) + } +} + +// PrepareForExport will adjust the expiration based on export time. In particular, +// it will subtract the dumpHeight from any height-based expiration to ensure that +// the elapsed number of blocks this allowance is valid for is fixed. +// (For PeriodReset and Basic.Expiration) +func (a *PeriodicFeeAllowance) PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceI { + return &PeriodicFeeAllowance{ + Basic: BasicFeeAllowance{ + SpendLimit: a.Basic.SpendLimit, + Expiration: a.Basic.Expiration.PrepareForExport(dumpTime, dumpHeight), + }, + PeriodSpendLimit: a.PeriodSpendLimit, + PeriodCanSpend: a.PeriodCanSpend, + Period: a.Period, + PeriodReset: a.PeriodReset.PrepareForExport(dumpTime, dumpHeight), + } +} + +// ValidateBasic implements FeeAllowance and enforces basic sanity checks +func (a PeriodicFeeAllowance) ValidateBasic() error { + if err := a.Basic.ValidateBasic(); err != nil { + return err + } + + if !a.PeriodSpendLimit.IsValid() { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "spend amount is invalid: %s", a.PeriodSpendLimit) + } + if !a.PeriodSpendLimit.IsAllPositive() { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "spend limit must be positive") + } + if !a.PeriodCanSpend.IsValid() { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "can spend amount is invalid: %s", a.PeriodCanSpend) + } + // We allow 0 for CanSpend + if a.PeriodCanSpend.IsAnyNegative() { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "can spend must not be negative") + } + + // ensure PeriodSpendLimit can be subtracted from total (same coin types) + if a.Basic.SpendLimit != nil && !a.PeriodSpendLimit.DenomsSubsetOf(a.Basic.SpendLimit) { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "period spend limit has different currency than basic spend limit") + } + + // check times + if err := a.Period.ValidateBasic(); err != nil { + return err + } + return a.PeriodReset.ValidateBasic() +} diff --git a/x/feegrant/types/periodic_fee_test.go b/x/feegrant/types/periodic_fee_test.go new file mode 100644 index 000000000000..cc54f4080878 --- /dev/null +++ b/x/feegrant/types/periodic_fee_test.go @@ -0,0 +1,205 @@ +package types_test + +import ( + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/feegrant/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestPeriodicFeeValidAllow(t *testing.T) { + atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) + smallAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 43)) + leftAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 512)) + oneAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 1)) + eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 1)) + + cases := map[string]struct { + allow types.PeriodicFeeAllowance + // all other checks are ignored if valid=false + fee sdk.Coins + blockTime time.Time + blockHeight int64 + valid bool + accept bool + remove bool + remains sdk.Coins + remainsPeriod sdk.Coins + periodReset types.ExpiresAt + }{ + "empty": { + allow: types.PeriodicFeeAllowance{}, + valid: false, + }, + "only basic": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + }, + valid: false, + }, + "empty basic": { + allow: types.PeriodicFeeAllowance{ + Period: types.BlockDuration(10), + PeriodSpendLimit: smallAtom, + PeriodReset: types.ExpiresAtHeight(70), + }, + blockHeight: 75, + valid: true, + accept: true, + remove: false, + periodReset: types.ExpiresAtHeight(80), + }, + "mismatched currencies": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + Period: types.BlockDuration(10), + PeriodSpendLimit: eth, + }, + valid: false, + }, + "first time": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + Period: types.BlockDuration(10), + PeriodSpendLimit: smallAtom, + }, + valid: true, + fee: smallAtom, + blockHeight: 75, + accept: true, + remove: false, + remainsPeriod: nil, + remains: leftAtom, + periodReset: types.ExpiresAtHeight(85), + }, + "same period": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + Period: types.BlockDuration(10), + PeriodReset: types.ExpiresAtHeight(80), + PeriodSpendLimit: leftAtom, + PeriodCanSpend: smallAtom, + }, + valid: true, + fee: smallAtom, + blockHeight: 75, + accept: true, + remove: false, + remainsPeriod: nil, + remains: leftAtom, + periodReset: types.ExpiresAtHeight(80), + }, + "step one period": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + Period: types.BlockDuration(10), + PeriodReset: types.ExpiresAtHeight(70), + PeriodSpendLimit: leftAtom, + }, + valid: true, + fee: leftAtom, + blockHeight: 75, + accept: true, + remove: false, + remainsPeriod: nil, + remains: smallAtom, + periodReset: types.ExpiresAtHeight(80), // one step from last reset, not now + }, + "step limited by global allowance": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: smallAtom, + Expiration: types.ExpiresAtHeight(100), + }, + Period: types.BlockDuration(10), + PeriodReset: types.ExpiresAtHeight(70), + PeriodSpendLimit: atom, + }, + valid: true, + fee: oneAtom, + blockHeight: 75, + accept: true, + remove: false, + remainsPeriod: smallAtom.Sub(oneAtom), + remains: smallAtom.Sub(oneAtom), + periodReset: types.ExpiresAtHeight(80), // one step from last reset, not now + }, + "expired": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + Period: types.BlockDuration(10), + PeriodSpendLimit: smallAtom, + }, + valid: true, + fee: smallAtom, + blockHeight: 101, + accept: false, + remove: true, + }, + "over period limit": { + allow: types.PeriodicFeeAllowance{ + Basic: types.BasicFeeAllowance{ + SpendLimit: atom, + Expiration: types.ExpiresAtHeight(100), + }, + Period: types.BlockDuration(10), + PeriodReset: types.ExpiresAtHeight(80), + PeriodSpendLimit: leftAtom, + PeriodCanSpend: smallAtom, + }, + valid: true, + fee: leftAtom, + blockHeight: 70, + accept: false, + remove: true, + }, + } + + for name, stc := range cases { + tc := stc // to make scopelint happy + t.Run(name, func(t *testing.T) { + err := tc.allow.ValidateBasic() + if !tc.valid { + require.Error(t, err) + return + } + require.NoError(t, err) + + // now try to deduct + remove, err := tc.allow.Accept(tc.fee, tc.blockTime, tc.blockHeight) + if !tc.accept { + require.Error(t, err) + return + } + require.NoError(t, err) + + require.Equal(t, tc.remove, remove) + if !remove { + assert.Equal(t, tc.remains, tc.allow.Basic.SpendLimit) + assert.Equal(t, tc.remainsPeriod, tc.allow.PeriodCanSpend) + assert.Equal(t, tc.periodReset, tc.allow.PeriodReset) + } + }) + } +} diff --git a/x/feegrant/types/query.pb.go b/x/feegrant/types/query.pb.go new file mode 100644 index 000000000000..e2597c3bc833 --- /dev/null +++ b/x/feegrant/types/query.pb.go @@ -0,0 +1,1172 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/feegrant/v1beta1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryFeeAllowanceRequest is the request type for the Query/FeeAllowance RPC method. +type QueryFeeAllowanceRequest struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` +} + +func (m *QueryFeeAllowanceRequest) Reset() { *m = QueryFeeAllowanceRequest{} } +func (m *QueryFeeAllowanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeAllowanceRequest) ProtoMessage() {} +func (*QueryFeeAllowanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_59efc303945de53f, []int{0} +} +func (m *QueryFeeAllowanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeAllowanceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeAllowanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeAllowanceRequest.Merge(m, src) +} +func (m *QueryFeeAllowanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeAllowanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeAllowanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeAllowanceRequest proto.InternalMessageInfo + +func (m *QueryFeeAllowanceRequest) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *QueryFeeAllowanceRequest) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +// QueryFeeAllowanceResponse is the response type for the Query/FeeAllowance RPC method. +type QueryFeeAllowanceResponse struct { + // fee_allowance is a fee_allowance granted for grantee by granter. + FeeAllowance *FeeAllowanceGrant `protobuf:"bytes,1,opt,name=fee_allowance,json=feeAllowance,proto3" json:"fee_allowance,omitempty"` +} + +func (m *QueryFeeAllowanceResponse) Reset() { *m = QueryFeeAllowanceResponse{} } +func (m *QueryFeeAllowanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeAllowanceResponse) ProtoMessage() {} +func (*QueryFeeAllowanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_59efc303945de53f, []int{1} +} +func (m *QueryFeeAllowanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeAllowanceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeAllowanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeAllowanceResponse.Merge(m, src) +} +func (m *QueryFeeAllowanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeAllowanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeAllowanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeAllowanceResponse proto.InternalMessageInfo + +func (m *QueryFeeAllowanceResponse) GetFeeAllowance() *FeeAllowanceGrant { + if m != nil { + return m.FeeAllowance + } + return nil +} + +// QueryFeeAllowancesRequest is the request type for the Query/FeeAllowances RPC method. +type QueryFeeAllowancesRequest struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + // pagination defines an pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryFeeAllowancesRequest) Reset() { *m = QueryFeeAllowancesRequest{} } +func (m *QueryFeeAllowancesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeAllowancesRequest) ProtoMessage() {} +func (*QueryFeeAllowancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_59efc303945de53f, []int{2} +} +func (m *QueryFeeAllowancesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeAllowancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeAllowancesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeAllowancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeAllowancesRequest.Merge(m, src) +} +func (m *QueryFeeAllowancesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeAllowancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeAllowancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeAllowancesRequest proto.InternalMessageInfo + +func (m *QueryFeeAllowancesRequest) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *QueryFeeAllowancesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryFeeAllowancesResponse is the response type for the Query/FeeAllowances RPC method. +type QueryFeeAllowancesResponse struct { + // fee_allowances are fee_allowance's granted for grantee by granter. + FeeAllowances []*FeeAllowanceGrant `protobuf:"bytes,1,rep,name=fee_allowances,json=feeAllowances,proto3" json:"fee_allowances,omitempty"` + // pagination defines an pagination for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryFeeAllowancesResponse) Reset() { *m = QueryFeeAllowancesResponse{} } +func (m *QueryFeeAllowancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeAllowancesResponse) ProtoMessage() {} +func (*QueryFeeAllowancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_59efc303945de53f, []int{3} +} +func (m *QueryFeeAllowancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeAllowancesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeAllowancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeAllowancesResponse.Merge(m, src) +} +func (m *QueryFeeAllowancesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeAllowancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeAllowancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeAllowancesResponse proto.InternalMessageInfo + +func (m *QueryFeeAllowancesResponse) GetFeeAllowances() []*FeeAllowanceGrant { + if m != nil { + return m.FeeAllowances + } + return nil +} + +func (m *QueryFeeAllowancesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryFeeAllowanceRequest)(nil), "cosmos.feegrant.v1beta1.QueryFeeAllowanceRequest") + proto.RegisterType((*QueryFeeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.QueryFeeAllowanceResponse") + proto.RegisterType((*QueryFeeAllowancesRequest)(nil), "cosmos.feegrant.v1beta1.QueryFeeAllowancesRequest") + proto.RegisterType((*QueryFeeAllowancesResponse)(nil), "cosmos.feegrant.v1beta1.QueryFeeAllowancesResponse") +} + +func init() { + proto.RegisterFile("cosmos/feegrant/v1beta1/query.proto", fileDescriptor_59efc303945de53f) +} + +var fileDescriptor_59efc303945de53f = []byte{ + // 455 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x31, 0x8f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0x22, 0x40, 0xf8, 0xae, 0x0c, 0x16, 0x12, 0x21, 0x42, 0xd1, 0x29, 0x48, 0x07, + 0x3a, 0xe9, 0x62, 0x35, 0x9d, 0x40, 0x2c, 0xdc, 0x70, 0xdd, 0x80, 0xcb, 0xc8, 0x82, 0x9c, 0xf2, + 0x6a, 0x22, 0x72, 0x71, 0x2e, 0x76, 0x81, 0x13, 0xea, 0xc2, 0x27, 0x40, 0xe2, 0xa3, 0xb0, 0xc0, + 0x37, 0x60, 0x3c, 0x89, 0x85, 0x11, 0xb5, 0x7c, 0x09, 0x36, 0x14, 0x3b, 0x6e, 0x52, 0x91, 0x00, + 0x99, 0xe2, 0xe4, 0xfd, 0xdf, 0x7b, 0xbf, 0xf7, 0xcf, 0x33, 0xbe, 0x33, 0x13, 0xf2, 0x54, 0x48, + 0x3a, 0x07, 0xe0, 0x05, 0xcb, 0x14, 0x7d, 0x3d, 0x8e, 0x41, 0xb1, 0x31, 0x3d, 0x5b, 0x40, 0x71, + 0x1e, 0xe4, 0x85, 0x50, 0x82, 0xdc, 0x34, 0xa2, 0xc0, 0x8a, 0x82, 0x4a, 0xe4, 0xde, 0xe0, 0x82, + 0x0b, 0xad, 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0xc3, 0xd3, 0x44, 0x0f, 0x7f, 0x0d, 0xf1, + 0x65, 0x8d, 0x4e, 0xbe, 0x20, 0xbc, 0xdb, 0xec, 0x4b, 0xc6, 0x9d, 0x78, 0x5d, 0x9b, 0xe2, 0x86, + 0x7d, 0x52, 0x0c, 0x8d, 0x7f, 0xf4, 0xfe, 0xdb, 0xcf, 0x8f, 0xc3, 0x87, 0xe4, 0x01, 0xfd, 0xcb, + 0xd2, 0xd7, 0xe6, 0xd1, 0x77, 0xd5, 0xf2, 0x2d, 0xed, 0x09, 0x96, 0xe4, 0x13, 0xc2, 0xa3, 0x2d, + 0xef, 0x49, 0x0f, 0x12, 0xbb, 0x28, 0xee, 0xa4, 0x57, 0x4e, 0x85, 0x7f, 0x5f, 0xe3, 0x4f, 0xc8, + 0xf8, 0xff, 0xf0, 0x65, 0x4d, 0x7d, 0x34, 0xfd, 0xba, 0xf2, 0xd0, 0xc5, 0xca, 0x43, 0x3f, 0x56, + 0x1e, 0xfa, 0xb0, 0xf6, 0x06, 0x17, 0x6b, 0x6f, 0xf0, 0x7d, 0xed, 0x0d, 0x9e, 0x1d, 0xf2, 0x44, + 0xbd, 0x5c, 0xc4, 0xc1, 0x4c, 0x9c, 0xda, 0xb2, 0xe6, 0x71, 0x28, 0x5f, 0xbc, 0xa2, 0x6f, 0xeb, + 0x1e, 0xea, 0x3c, 0x07, 0x19, 0x5f, 0xd1, 0x77, 0x78, 0xf2, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xb8, + 0x46, 0x4c, 0xba, 0x8b, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // FeeAllowance returns fee granted to the grantee by the granter. + FeeAllowance(ctx context.Context, in *QueryFeeAllowanceRequest, opts ...grpc.CallOption) (*QueryFeeAllowanceResponse, error) + // FeeAllowances returns all the grants for address. + FeeAllowances(ctx context.Context, in *QueryFeeAllowancesRequest, opts ...grpc.CallOption) (*QueryFeeAllowancesResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) FeeAllowance(ctx context.Context, in *QueryFeeAllowanceRequest, opts ...grpc.CallOption) (*QueryFeeAllowanceResponse, error) { + out := new(QueryFeeAllowanceResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Query/FeeAllowance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FeeAllowances(ctx context.Context, in *QueryFeeAllowancesRequest, opts ...grpc.CallOption) (*QueryFeeAllowancesResponse, error) { + out := new(QueryFeeAllowancesResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Query/FeeAllowances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // FeeAllowance returns fee granted to the grantee by the granter. + FeeAllowance(context.Context, *QueryFeeAllowanceRequest) (*QueryFeeAllowanceResponse, error) + // FeeAllowances returns all the grants for address. + FeeAllowances(context.Context, *QueryFeeAllowancesRequest) (*QueryFeeAllowancesResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) FeeAllowance(ctx context.Context, req *QueryFeeAllowanceRequest) (*QueryFeeAllowanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeeAllowance not implemented") +} +func (*UnimplementedQueryServer) FeeAllowances(ctx context.Context, req *QueryFeeAllowancesRequest) (*QueryFeeAllowancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeeAllowances not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_FeeAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeAllowanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FeeAllowance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Query/FeeAllowance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FeeAllowance(ctx, req.(*QueryFeeAllowanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FeeAllowances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeAllowancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FeeAllowances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Query/FeeAllowances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FeeAllowances(ctx, req.(*QueryFeeAllowancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.feegrant.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FeeAllowance", + Handler: _Query_FeeAllowance_Handler, + }, + { + MethodName: "FeeAllowances", + Handler: _Query_FeeAllowances_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/feegrant/v1beta1/query.proto", +} + +func (m *QueryFeeAllowanceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeAllowanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0x12 + } + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeAllowanceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FeeAllowance != nil { + { + size, err := m.FeeAllowance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeAllowancesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeAllowancesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeAllowancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeAllowancesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.FeeAllowances) > 0 { + for iNdEx := len(m.FeeAllowances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FeeAllowances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryFeeAllowanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeeAllowanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FeeAllowance != nil { + l = m.FeeAllowance.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeeAllowancesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeeAllowancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FeeAllowances) > 0 { + for _, e := range m.FeeAllowances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryFeeAllowanceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeAllowanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeAllowanceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeAllowanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeAllowance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FeeAllowance == nil { + m.FeeAllowance = &FeeAllowanceGrant{} + } + if err := m.FeeAllowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeAllowancesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeAllowancesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeAllowancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeAllowancesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeAllowancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeAllowances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeAllowances = append(m.FeeAllowances, &FeeAllowanceGrant{}) + if err := m.FeeAllowances[len(m.FeeAllowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feegrant/types/query.pb.gw.go b/x/feegrant/types/query.pb.gw.go new file mode 100644 index 000000000000..499e4a441d18 --- /dev/null +++ b/x/feegrant/types/query.pb.gw.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cosmos/feegrant/v1beta1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +func request_Query_FeeAllowance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeAllowanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["granter"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") + } + + protoReq.Granter, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) + } + + val, ok = pathParams["grantee"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") + } + + protoReq.Grantee, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) + } + + msg, err := client.FeeAllowance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_FeeAllowance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeAllowanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["granter"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") + } + + protoReq.Granter, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) + } + + val, ok = pathParams["grantee"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") + } + + protoReq.Grantee, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) + } + + msg, err := server.FeeAllowance(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_FeeAllowances_0 = &utilities.DoubleArray{Encoding: map[string]int{"grantee": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_FeeAllowances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeAllowancesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["grantee"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") + } + + protoReq.Grantee, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_FeeAllowances_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.FeeAllowances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_FeeAllowances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeAllowancesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["grantee"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") + } + + protoReq.Grantee, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_FeeAllowances_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.FeeAllowances(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_FeeAllowance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_FeeAllowance_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_FeeAllowance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_FeeAllowances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_FeeAllowances_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_FeeAllowances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_FeeAllowance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_FeeAllowance_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_FeeAllowance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_FeeAllowances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_FeeAllowances_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_FeeAllowances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_FeeAllowance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"cosmos", "feegrant", "v1beta1", "fee_allowance", "granter", "grantee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_FeeAllowances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "feegrant", "v1beta1", "fee_allowances", "grantee"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Query_FeeAllowance_0 = runtime.ForwardResponseMessage + + forward_Query_FeeAllowances_0 = runtime.ForwardResponseMessage +) diff --git a/x/feegrant/types/tx.pb.go b/x/feegrant/types/tx.pb.go new file mode 100644 index 000000000000..d3080f10e3df --- /dev/null +++ b/x/feegrant/types/tx.pb.go @@ -0,0 +1,1033 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/feegrant/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgGrantFeeAllowance adds permission for Grantee to spend up to Allowance +// of fees from the account of Granter. +type MsgGrantFeeAllowance struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` + Allowance *types.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` +} + +func (m *MsgGrantFeeAllowance) Reset() { *m = MsgGrantFeeAllowance{} } +func (m *MsgGrantFeeAllowance) String() string { return proto.CompactTextString(m) } +func (*MsgGrantFeeAllowance) ProtoMessage() {} +func (*MsgGrantFeeAllowance) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{0} +} +func (m *MsgGrantFeeAllowance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGrantFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGrantFeeAllowance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGrantFeeAllowance) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGrantFeeAllowance.Merge(m, src) +} +func (m *MsgGrantFeeAllowance) XXX_Size() int { + return m.Size() +} +func (m *MsgGrantFeeAllowance) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGrantFeeAllowance.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGrantFeeAllowance proto.InternalMessageInfo + +func (m *MsgGrantFeeAllowance) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *MsgGrantFeeAllowance) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *MsgGrantFeeAllowance) GetAllowance() *types.Any { + if m != nil { + return m.Allowance + } + return nil +} + +// MsgGrantFeeAllowanceResponse defines the Msg/GrantFeeAllowanceResponse response type. +type MsgGrantFeeAllowanceResponse struct { +} + +func (m *MsgGrantFeeAllowanceResponse) Reset() { *m = MsgGrantFeeAllowanceResponse{} } +func (m *MsgGrantFeeAllowanceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGrantFeeAllowanceResponse) ProtoMessage() {} +func (*MsgGrantFeeAllowanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{1} +} +func (m *MsgGrantFeeAllowanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGrantFeeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGrantFeeAllowanceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGrantFeeAllowanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGrantFeeAllowanceResponse.Merge(m, src) +} +func (m *MsgGrantFeeAllowanceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGrantFeeAllowanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGrantFeeAllowanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGrantFeeAllowanceResponse proto.InternalMessageInfo + +// MsgRevokeFeeAllowance removes any existing FeeAllowance from Granter to Grantee. +type MsgRevokeFeeAllowance struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` +} + +func (m *MsgRevokeFeeAllowance) Reset() { *m = MsgRevokeFeeAllowance{} } +func (m *MsgRevokeFeeAllowance) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeFeeAllowance) ProtoMessage() {} +func (*MsgRevokeFeeAllowance) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{2} +} +func (m *MsgRevokeFeeAllowance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeFeeAllowance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRevokeFeeAllowance) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeFeeAllowance.Merge(m, src) +} +func (m *MsgRevokeFeeAllowance) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeFeeAllowance) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeFeeAllowance.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeFeeAllowance proto.InternalMessageInfo + +func (m *MsgRevokeFeeAllowance) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *MsgRevokeFeeAllowance) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +// MsgRevokeFeeAllowanceResponse defines the Msg/RevokeFeeAllowanceResponse response type. +type MsgRevokeFeeAllowanceResponse struct { +} + +func (m *MsgRevokeFeeAllowanceResponse) Reset() { *m = MsgRevokeFeeAllowanceResponse{} } +func (m *MsgRevokeFeeAllowanceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeFeeAllowanceResponse) ProtoMessage() {} +func (*MsgRevokeFeeAllowanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dd44ad7946dad783, []int{3} +} +func (m *MsgRevokeFeeAllowanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeFeeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeFeeAllowanceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRevokeFeeAllowanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeFeeAllowanceResponse.Merge(m, src) +} +func (m *MsgRevokeFeeAllowanceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeFeeAllowanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeFeeAllowanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeFeeAllowanceResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgGrantFeeAllowance)(nil), "cosmos.feegrant.v1beta1.MsgGrantFeeAllowance") + proto.RegisterType((*MsgGrantFeeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgGrantFeeAllowanceResponse") + proto.RegisterType((*MsgRevokeFeeAllowance)(nil), "cosmos.feegrant.v1beta1.MsgRevokeFeeAllowance") + proto.RegisterType((*MsgRevokeFeeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgRevokeFeeAllowanceResponse") +} + +func init() { proto.RegisterFile("cosmos/feegrant/v1beta1/tx.proto", fileDescriptor_dd44ad7946dad783) } + +var fileDescriptor_dd44ad7946dad783 = []byte{ + // 345 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x4f, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, + 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, + 0xb1, 0x20, 0xca, 0xa5, 0x24, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xbc, 0xa4, 0xd2, + 0x34, 0xfd, 0xc4, 0xbc, 0x4a, 0x98, 0x14, 0xc4, 0xa4, 0x78, 0x88, 0x1e, 0xa8, 0xb1, 0x60, 0x8e,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c6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, + 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xdd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, + 0xbd, 0xe4, 0xfc, 0x5c, 0x68, 0xaa, 0x82, 0x52, 0xba, 0xc5, 0x29, 0xd9, 0xfa, 0x15, 0x88, 0xb4, + 0x5d, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x4e, 0x03, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x7b, 0xbe, 0x24, 0x15, 0xfb, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // GrantFeeAllowance grants fee allowance to the grantee on the granter's + // account with the provided expiration time. + GrantFeeAllowance(ctx context.Context, in *MsgGrantFeeAllowance, opts ...grpc.CallOption) (*MsgGrantFeeAllowanceResponse, error) + // RevokeFeeAllowance revokes any fee allowance of granter's account that + // has been granted to the grantee. + RevokeFeeAllowance(ctx context.Context, in *MsgRevokeFeeAllowance, opts ...grpc.CallOption) (*MsgRevokeFeeAllowanceResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) GrantFeeAllowance(ctx context.Context, in *MsgGrantFeeAllowance, opts ...grpc.CallOption) (*MsgGrantFeeAllowanceResponse, error) { + out := new(MsgGrantFeeAllowanceResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/GrantFeeAllowance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RevokeFeeAllowance(ctx context.Context, in *MsgRevokeFeeAllowance, opts ...grpc.CallOption) (*MsgRevokeFeeAllowanceResponse, error) { + out := new(MsgRevokeFeeAllowanceResponse) + err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/RevokeFeeAllowance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // GrantFeeAllowance grants fee allowance to the grantee on the granter's + // account with the provided expiration time. + GrantFeeAllowance(context.Context, *MsgGrantFeeAllowance) (*MsgGrantFeeAllowanceResponse, error) + // RevokeFeeAllowance revokes any fee allowance of granter's account that + // has been granted to the grantee. + RevokeFeeAllowance(context.Context, *MsgRevokeFeeAllowance) (*MsgRevokeFeeAllowanceResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) GrantFeeAllowance(ctx context.Context, req *MsgGrantFeeAllowance) (*MsgGrantFeeAllowanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GrantFeeAllowance not implemented") +} +func (*UnimplementedMsgServer) RevokeFeeAllowance(ctx context.Context, req *MsgRevokeFeeAllowance) (*MsgRevokeFeeAllowanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeFeeAllowance not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_GrantFeeAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGrantFeeAllowance) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GrantFeeAllowance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Msg/GrantFeeAllowance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GrantFeeAllowance(ctx, req.(*MsgGrantFeeAllowance)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RevokeFeeAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRevokeFeeAllowance) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RevokeFeeAllowance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.feegrant.v1beta1.Msg/RevokeFeeAllowance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RevokeFeeAllowance(ctx, req.(*MsgRevokeFeeAllowance)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.feegrant.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GrantFeeAllowance", + Handler: _Msg_GrantFeeAllowance_Handler, + }, + { + MethodName: "RevokeFeeAllowance", + Handler: _Msg_RevokeFeeAllowance_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/feegrant/v1beta1/tx.proto", +} + +func (m *MsgGrantFeeAllowance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGrantFeeAllowance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGrantFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Allowance != nil { + { + size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0x12 + } + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGrantFeeAllowanceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGrantFeeAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGrantFeeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRevokeFeeAllowance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRevokeFeeAllowance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0x12 + } + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRevokeFeeAllowanceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRevokeFeeAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeFeeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgGrantFeeAllowance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Allowance != nil { + l = m.Allowance.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgGrantFeeAllowanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRevokeFeeAllowance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRevokeFeeAllowanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgGrantFeeAllowance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGrantFeeAllowance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGrantFeeAllowance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Allowance == nil { + m.Allowance = &types.Any{} + } + if err := m.Allowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGrantFeeAllowanceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGrantFeeAllowanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGrantFeeAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRevokeFeeAllowance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRevokeFeeAllowance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeFeeAllowance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRevokeFeeAllowanceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRevokeFeeAllowanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeFeeAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index 8c67cd96e5e1..b382f540e26b 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "strconv" "strings" @@ -74,7 +73,7 @@ $ %s query gov proposal 1 // Query the proposal res, err := queryClient.Proposal( - context.Background(), + cmd.Context(), &types.QueryProposalRequest{ProposalId: proposalID}, ) if err != nil { @@ -149,7 +148,7 @@ $ %s query gov proposals --page=2 --limit=100 } res, err := queryClient.Proposals( - context.Background(), + cmd.Context(), &types.QueryProposalsRequest{ ProposalStatus: proposalStatus, Voter: bechVoterAddr, @@ -208,8 +207,9 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk } // check to see if the proposal is in the store + ctx := cmd.Context() _, err = queryClient.Proposal( - context.Background(), + ctx, &types.QueryProposalRequest{ProposalId: proposalID}, ) if err != nil { @@ -222,7 +222,7 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk } res, err := queryClient.Vote( - context.Background(), + ctx, &types.QueryVoteRequest{ProposalId: proposalID, Voter: args[1]}, ) if err != nil { @@ -282,8 +282,9 @@ $ %[1]s query gov votes 1 --page=2 --limit=100 } // check to see if the proposal is in the store + ctx := cmd.Context() proposalRes, err := queryClient.Proposal( - context.Background(), + ctx, &types.QueryProposalRequest{ProposalId: proposalID}, ) if err != nil { @@ -315,7 +316,7 @@ $ %[1]s query gov votes 1 --page=2 --limit=100 } res, err := queryClient.Votes( - context.Background(), + ctx, &types.QueryVotesRequest{ProposalId: proposalID, Pagination: pageReq}, ) @@ -364,8 +365,9 @@ $ %s query gov deposit 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk } // check to see if the proposal is in the store + ctx := cmd.Context() _, err = queryClient.Proposal( - context.Background(), + ctx, &types.QueryProposalRequest{ProposalId: proposalID}, ) if err != nil { @@ -378,7 +380,7 @@ $ %s query gov deposit 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk } res, err := queryClient.Deposit( - context.Background(), + ctx, &types.QueryDepositRequest{ProposalId: proposalID, Depositor: args[1]}, ) if err != nil { @@ -434,8 +436,9 @@ $ %s query gov deposits 1 } // check to see if the proposal is in the store + ctx := cmd.Context() proposalRes, err := queryClient.Proposal( - context.Background(), + ctx, &types.QueryProposalRequest{ProposalId: proposalID}, ) if err != nil { @@ -464,7 +467,7 @@ $ %s query gov deposits 1 } res, err := queryClient.Deposits( - context.Background(), + ctx, &types.QueryDepositsRequest{ProposalId: proposalID, Pagination: pageReq}, ) @@ -512,8 +515,9 @@ $ %s query gov tally 1 } // check to see if the proposal is in the store + ctx := cmd.Context() _, err = queryClient.Proposal( - context.Background(), + ctx, &types.QueryProposalRequest{ProposalId: proposalID}, ) if err != nil { @@ -522,7 +526,7 @@ $ %s query gov tally 1 // Query store res, err := queryClient.TallyResult( - context.Background(), + ctx, &types.QueryTallyResultRequest{ProposalId: proposalID}, ) if err != nil { @@ -561,8 +565,9 @@ $ %s query gov params queryClient := types.NewQueryClient(clientCtx) // Query store for all 3 params + ctx := cmd.Context() votingRes, err := queryClient.Params( - context.Background(), + ctx, &types.QueryParamsRequest{ParamsType: "voting"}, ) if err != nil { @@ -570,7 +575,7 @@ $ %s query gov params } tallyRes, err := queryClient.Params( - context.Background(), + ctx, &types.QueryParamsRequest{ParamsType: "tallying"}, ) if err != nil { @@ -578,7 +583,7 @@ $ %s query gov params } depositRes, err := queryClient.Params( - context.Background(), + ctx, &types.QueryParamsRequest{ParamsType: "deposit"}, ) if err != nil { @@ -626,7 +631,7 @@ $ %s query gov param deposit // Query store res, err := queryClient.Params( - context.Background(), + cmd.Context(), &types.QueryParamsRequest{ParamsType: args[0]}, ) if err != nil { diff --git a/x/gov/types/keys.go b/x/gov/types/keys.go index 7681116fc46a..fe98bcbf81c4 100644 --- a/x/gov/types/keys.go +++ b/x/gov/types/keys.go @@ -6,6 +6,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -33,9 +34,9 @@ const ( // // - 0x03: nextProposalID // -// - 0x10: Deposit +// - 0x10: Deposit // -// - 0x20: Voter +// - 0x20: Voter var ( ProposalsKeyPrefix = []byte{0x00} ActiveProposalQueuePrefix = []byte{0x01} @@ -93,7 +94,7 @@ func DepositsKey(proposalID uint64) []byte { // DepositKey key of a specific deposit from the store func DepositKey(proposalID uint64, depositorAddr sdk.AccAddress) []byte { - return append(DepositsKey(proposalID), depositorAddr.Bytes()...) + return append(DepositsKey(proposalID), address.MustLengthPrefix(depositorAddr.Bytes())...) } // VotesKey gets the first part of the votes key based on the proposalID @@ -103,7 +104,7 @@ func VotesKey(proposalID uint64) []byte { // VoteKey key of a specific vote from the store func VoteKey(proposalID uint64, voterAddr sdk.AccAddress) []byte { - return append(VotesKey(proposalID), voterAddr.Bytes()...) + return append(VotesKey(proposalID), address.MustLengthPrefix(voterAddr.Bytes())...) } // Split keys function; used for iterators @@ -154,11 +155,9 @@ func splitKeyWithTime(key []byte) (proposalID uint64, endTime time.Time) { } func splitKeyWithAddress(key []byte) (proposalID uint64, addr sdk.AccAddress) { - if len(key[1:]) != 8+sdk.AddrLen { - panic(fmt.Sprintf("unexpected key length (%d ≠ %d)", len(key), 8+sdk.AddrLen)) - } - + // Both Vote and Deposit store keys are of format: + // proposalID = GetProposalIDFromBytes(key[1:9]) - addr = sdk.AccAddress(key[9:]) + addr = sdk.AccAddress(key[10:]) return } diff --git a/x/gov/types/keys_test.go b/x/gov/types/keys_test.go index 80dfa7d207a3..30266f8f4d78 100644 --- a/x/gov/types/keys_test.go +++ b/x/gov/types/keys_test.go @@ -46,11 +46,6 @@ func TestDepositKeys(t *testing.T) { proposalID, depositorAddr := SplitKeyDeposit(key) require.Equal(t, int(proposalID), 2) require.Equal(t, addr, depositorAddr) - - // invalid key - addr2 := sdk.AccAddress("test1") - key = DepositKey(5, addr2) - require.Panics(t, func() { SplitKeyDeposit(key) }) } func TestVoteKeys(t *testing.T) { @@ -63,9 +58,4 @@ func TestVoteKeys(t *testing.T) { proposalID, voterAddr := SplitKeyDeposit(key) require.Equal(t, int(proposalID), 2) require.Equal(t, addr, voterAddr) - - // invalid key - addr2 := sdk.AccAddress("test1") - key = VoteKey(5, addr2) - require.Panics(t, func() { SplitKeyVote(key) }) } diff --git a/x/ibc/applications/transfer/client/cli/query.go b/x/ibc/applications/transfer/client/cli/query.go index 7d281bb4155f..b9658e05ae92 100644 --- a/x/ibc/applications/transfer/client/cli/query.go +++ b/x/ibc/applications/transfer/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "github.com/spf13/cobra" @@ -31,7 +30,7 @@ func GetCmdQueryDenomTrace() *cobra.Command { Hash: args[0], } - res, err := queryClient.DenomTrace(context.Background(), req) + res, err := queryClient.DenomTrace(cmd.Context(), req) if err != nil { return err } @@ -69,7 +68,7 @@ func GetCmdQueryDenomTraces() *cobra.Command { Pagination: pageReq, } - res, err := queryClient.DenomTraces(context.Background(), req) + res, err := queryClient.DenomTraces(cmd.Context(), req) if err != nil { return err } @@ -98,7 +97,7 @@ func GetCmdParams() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, _ := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) + res, _ := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) return clientCtx.PrintProto(res.Params) }, } diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index 039597afe5e4..67c736555b8a 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -202,8 +202,8 @@ func ValidateTransferChannelParams( if err != nil { return err } - if channelSequence > math.MaxUint32 { - return sdkerrors.Wrapf(types.ErrMaxTransferChannels, "channel sequence %d is greater than max allowed transfer channels %d", channelSequence, math.MaxUint32) + if channelSequence > uint64(math.MaxUint32) { + return sdkerrors.Wrapf(types.ErrMaxTransferChannels, "channel sequence %d is greater than max allowed transfer channels %d", channelSequence, uint64(math.MaxUint32)) } if order != channeltypes.UNORDERED { return sdkerrors.Wrapf(channeltypes.ErrInvalidChannelOrdering, "expected %s channel, got %s ", channeltypes.UNORDERED, order) @@ -379,7 +379,7 @@ func (am AppModule) OnAcknowledgementPacket( sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), sdk.NewAttribute(types.AttributeKeyAmount, fmt.Sprintf("%d", data.Amount)), - sdk.NewAttribute(types.AttributeKeyAck, fmt.Sprintf("%v", ack)), + sdk.NewAttribute(types.AttributeKeyAck, ack.String()), ), ) diff --git a/x/ibc/core/02-client/client/cli/query.go b/x/ibc/core/02-client/client/cli/query.go index 7c49b12e0220..c1b5e51a050f 100644 --- a/x/ibc/core/02-client/client/cli/query.go +++ b/x/ibc/core/02-client/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "errors" "fmt" @@ -44,7 +43,7 @@ func GetCmdQueryClientStates() *cobra.Command { Pagination: pageReq, } - res, err := queryClient.ClientStates(context.Background(), req) + res, err := queryClient.ClientStates(cmd.Context(), req) if err != nil { return err } @@ -118,7 +117,7 @@ func GetCmdQueryConsensusStates() *cobra.Command { Pagination: pageReq, } - res, err := queryClient.ConsensusStates(context.Background(), req) + res, err := queryClient.ConsensusStates(cmd.Context(), req) if err != nil { return err } @@ -250,7 +249,7 @@ func GetCmdParams() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, _ := queryClient.ClientParams(context.Background(), &types.QueryClientParamsRequest{}) + res, _ := queryClient.ClientParams(cmd.Context(), &types.QueryClientParamsRequest{}) return clientCtx.PrintProto(res.Params) }, } diff --git a/x/ibc/core/02-client/types/client.go b/x/ibc/core/02-client/types/client.go index 1c44d6e2b9c2..6d51828af0f7 100644 --- a/x/ibc/core/02-client/types/client.go +++ b/x/ibc/core/02-client/types/client.go @@ -93,7 +93,7 @@ func ValidateClientType(clientType string) error { } smallestPossibleClientID := FormatClientIdentifier(clientType, 0) - largestPossibleClientID := FormatClientIdentifier(clientType, math.MaxUint64) + largestPossibleClientID := FormatClientIdentifier(clientType, uint64(math.MaxUint64)) // IsValidClientID will check client type format and if the sequence is a uint64 if !IsValidClientID(smallestPossibleClientID) { diff --git a/x/ibc/core/03-connection/client/cli/query.go b/x/ibc/core/03-connection/client/cli/query.go index 071410398db5..21c4bd8f578e 100644 --- a/x/ibc/core/03-connection/client/cli/query.go +++ b/x/ibc/core/03-connection/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "github.com/spf13/cobra" @@ -39,7 +38,7 @@ func GetCmdQueryConnections() *cobra.Command { Pagination: pageReq, } - res, err := queryClient.Connections(context.Background(), req) + res, err := queryClient.Connections(cmd.Context(), req) if err != nil { return err } diff --git a/x/ibc/core/04-channel/client/cli/query.go b/x/ibc/core/04-channel/client/cli/query.go index 5d059c08cf94..03df474f1e79 100644 --- a/x/ibc/core/04-channel/client/cli/query.go +++ b/x/ibc/core/04-channel/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "strconv" @@ -44,7 +43,7 @@ func GetCmdQueryChannels() *cobra.Command { Pagination: pageReq, } - res, err := queryClient.Channels(context.Background(), req) + res, err := queryClient.Channels(cmd.Context(), req) if err != nil { return err } @@ -118,7 +117,7 @@ func GetCmdQueryConnectionChannels() *cobra.Command { Pagination: pageReq, } - res, err := queryClient.ConnectionChannels(context.Background(), req) + res, err := queryClient.ConnectionChannels(cmd.Context(), req) if err != nil { return err } @@ -189,7 +188,7 @@ func GetCmdQueryPacketCommitments() *cobra.Command { Pagination: pageReq, } - res, err := queryClient.PacketCommitments(context.Background(), req) + res, err := queryClient.PacketCommitments(cmd.Context(), req) if err != nil { return err } @@ -357,7 +356,7 @@ The return value represents: PacketCommitmentSequences: seqs, } - res, err := queryClient.UnreceivedPackets(context.Background(), req) + res, err := queryClient.UnreceivedPackets(cmd.Context(), req) if err != nil { return err } @@ -407,7 +406,7 @@ The return value represents: PacketAckSequences: seqs, } - res, err := queryClient.UnreceivedAcks(context.Background(), req) + res, err := queryClient.UnreceivedAcks(cmd.Context(), req) if err != nil { return err } diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index 9af59745d549..49b59733c5a3 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -129,6 +129,9 @@ func (k Keeper) SendPacket( sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), + // we only support 1-hop packets now, and that is the most important hop for a relayer + // (is it going to a chain I am connected to) + sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -289,6 +292,9 @@ func (k Keeper) RecvPacket( sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), + // we only support 1-hop packets now, and that is the most important hop for a relayer + // (is it going to a chain I am connected to) + sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -370,6 +376,9 @@ func (k Keeper) WriteAcknowledgement( sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), sdk.NewAttribute(types.AttributeKeyAck, string(acknowledgement)), + // we only support 1-hop packets now, and that is the most important hop for a relayer + // (is it going to a chain I am connected to) + sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -505,6 +514,9 @@ func (k Keeper) AcknowledgePacket( sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), + // we only support 1-hop packets now, and that is the most important hop for a relayer + // (is it going to a chain I am connected to) + sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), ), sdk.NewEvent( sdk.EventTypeMessage, diff --git a/x/ibc/core/04-channel/types/events.go b/x/ibc/core/04-channel/types/events.go index 923587d439d7..b9ddb3052c30 100644 --- a/x/ibc/core/04-channel/types/events.go +++ b/x/ibc/core/04-channel/types/events.go @@ -30,6 +30,7 @@ const ( AttributeKeyDstPort = "packet_dst_port" AttributeKeyDstChannel = "packet_dst_channel" AttributeKeyChannelOrdering = "packet_channel_ordering" + AttributeKeyConnection = "packet_connection" ) // IBC channel events vars diff --git a/x/mint/client/cli/query.go b/x/mint/client/cli/query.go index cce0d7c12bbb..792fa8a6798f 100644 --- a/x/mint/client/cli/query.go +++ b/x/mint/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "github.com/spf13/cobra" @@ -45,7 +44,7 @@ func GetCmdQueryParams() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) params := &types.QueryParamsRequest{} - res, err := queryClient.Params(context.Background(), params) + res, err := queryClient.Params(cmd.Context(), params) if err != nil { return err @@ -75,7 +74,7 @@ func GetCmdQueryInflation() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) params := &types.QueryInflationRequest{} - res, err := queryClient.Inflation(context.Background(), params) + res, err := queryClient.Inflation(cmd.Context(), params) if err != nil { return err @@ -105,7 +104,7 @@ func GetCmdQueryAnnualProvisions() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) params := &types.QueryAnnualProvisionsRequest{} - res, err := queryClient.AnnualProvisions(context.Background(), params) + res, err := queryClient.AnnualProvisions(cmd.Context(), params) if err != nil { return err diff --git a/x/mint/simulation/decoder.go b/x/mint/simulation/decoder.go index 37d9930f7da5..f0a89be43965 100644 --- a/x/mint/simulation/decoder.go +++ b/x/mint/simulation/decoder.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/mint/types" ) -// NewDecodeStore returns a decoder function closure that umarshals the KVPair's +// NewDecodeStore returns a decoder function closure that unmarshals the KVPair's // Value to the corresponding mint type. func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { return func(kvA, kvB kv.Pair) string { diff --git a/x/mint/types/minter_test.go b/x/mint/types/minter_test.go index 8760a66f4466..4abedb51cd05 100644 --- a/x/mint/types/minter_test.go +++ b/x/mint/types/minter_test.go @@ -89,6 +89,7 @@ func TestBlockProvision(t *testing.T) { // using sdk.Dec operations: (current implementation) // BenchmarkBlockProvision-4 3000000 429 ns/op func BenchmarkBlockProvision(b *testing.B) { + b.ReportAllocs() minter := InitialMinter(sdk.NewDecWithPrec(1, 1)) params := DefaultParams() @@ -105,6 +106,7 @@ func BenchmarkBlockProvision(b *testing.B) { // Next inflation benchmarking // BenchmarkNextInflation-4 1000000 1828 ns/op func BenchmarkNextInflation(b *testing.B) { + b.ReportAllocs() minter := InitialMinter(sdk.NewDecWithPrec(1, 1)) params := DefaultParams() bondedRatio := sdk.NewDecWithPrec(1, 1) @@ -119,6 +121,7 @@ func BenchmarkNextInflation(b *testing.B) { // Next annual provisions benchmarking // BenchmarkNextAnnualProvisions-4 5000000 251 ns/op func BenchmarkNextAnnualProvisions(b *testing.B) { + b.ReportAllocs() minter := InitialMinter(sdk.NewDecWithPrec(1, 1)) params := DefaultParams() totalSupply := sdk.NewInt(100000000000000) diff --git a/x/params/client/cli/query.go b/x/params/client/cli/query.go index 516ff3b6b474..ce7b45d0602d 100644 --- a/x/params/client/cli/query.go +++ b/x/params/client/cli/query.go @@ -1,8 +1,6 @@ package cli import ( - "context" - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -41,7 +39,7 @@ func NewQuerySubspaceParamsCmd() *cobra.Command { queryClient := proposal.NewQueryClient(clientCtx) params := proposal.QueryParamsRequest{Subspace: args[0], Key: args[1]} - res, err := queryClient.Params(context.Background(), ¶ms) + res, err := queryClient.Params(cmd.Context(), ¶ms) if err != nil { return err } diff --git a/x/slashing/client/cli/query.go b/x/slashing/client/cli/query.go index d55b33201b10..6cb2f803d085 100644 --- a/x/slashing/client/cli/query.go +++ b/x/slashing/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "strings" "github.com/spf13/cobra" @@ -58,7 +57,7 @@ $ query slashing signing-info cosmosvalconspub1zcjduepqfhvwcmt7p06fvdgexx consAddr := sdk.ConsAddress(pk.Address()) params := &types.QuerySigningInfoRequest{ConsAddress: consAddr.String()} - res, err := queryClient.SigningInfo(context.Background(), params) + res, err := queryClient.SigningInfo(cmd.Context(), params) if err != nil { return err } @@ -95,7 +94,7 @@ $ query slashing signing-infos } params := &types.QuerySigningInfosRequest{Pagination: pageReq} - res, err := queryClient.SigningInfos(context.Background(), params) + res, err := queryClient.SigningInfos(cmd.Context(), params) if err != nil { return err } @@ -128,7 +127,7 @@ $ query slashing params queryClient := types.NewQueryClient(clientCtx) params := &types.QueryParamsRequest{} - res, err := queryClient.Params(context.Background(), params) + res, err := queryClient.Params(cmd.Context(), params) if err != nil { return err } diff --git a/x/slashing/types/keys.go b/x/slashing/types/keys.go index c9792d22085f..f0049760f0a0 100644 --- a/x/slashing/types/keys.go +++ b/x/slashing/types/keys.go @@ -4,6 +4,7 @@ import ( "encoding/binary" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -23,11 +24,11 @@ const ( // Keys for slashing store // Items are stored with the following key: values // -// - 0x01: ValidatorSigningInfo +// - 0x01: ValidatorSigningInfo // -// - 0x02: bool +// - 0x02: bool // -// - 0x03: crypto.PubKey +// - 0x03: cryptotypes.PubKey var ( ValidatorSigningInfoKeyPrefix = []byte{0x01} // Prefix for signing info ValidatorMissedBlockBitArrayKeyPrefix = []byte{0x02} // Prefix for missed block bit array @@ -36,31 +37,31 @@ var ( // ValidatorSigningInfoKey - stored by *Consensus* address (not operator address) func ValidatorSigningInfoKey(v sdk.ConsAddress) []byte { - return append(ValidatorSigningInfoKeyPrefix, v.Bytes()...) + return append(ValidatorSigningInfoKeyPrefix, address.MustLengthPrefix(v.Bytes())...) } // ValidatorSigningInfoAddress - extract the address from a validator signing info key func ValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress) { - addr := key[1:] - if len(addr) != sdk.AddrLen { - panic("unexpected key length") - } + // Remove prefix and address length. + addr := key[2:] + return sdk.ConsAddress(addr) } // ValidatorMissedBlockBitArrayPrefixKey - stored by *Consensus* address (not operator address) func ValidatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte { - return append(ValidatorMissedBlockBitArrayKeyPrefix, v.Bytes()...) + return append(ValidatorMissedBlockBitArrayKeyPrefix, address.MustLengthPrefix(v.Bytes())...) } // ValidatorMissedBlockBitArrayKey - stored by *Consensus* address (not operator address) func ValidatorMissedBlockBitArrayKey(v sdk.ConsAddress, i int64) []byte { b := make([]byte, 8) binary.LittleEndian.PutUint64(b, uint64(i)) + return append(ValidatorMissedBlockBitArrayPrefixKey(v), b...) } // AddrPubkeyRelationKey gets pubkey relation key used to get the pubkey from the address -func AddrPubkeyRelationKey(address []byte) []byte { - return append(AddrPubkeyRelationKeyPrefix, address...) +func AddrPubkeyRelationKey(addr []byte) []byte { + return append(AddrPubkeyRelationKeyPrefix, address.MustLengthPrefix(addr)...) } diff --git a/x/staking/client/cli/query.go b/x/staking/client/cli/query.go index 1e8b0a5c539a..7bf3ae41ccbe 100644 --- a/x/staking/client/cli/query.go +++ b/x/staking/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "strconv" "strings" @@ -115,7 +114,7 @@ $ %s query staking validators return err } - result, err := queryClient.Validators(context.Background(), &types.QueryValidatorsRequest{ + result, err := queryClient.Validators(cmd.Context(), &types.QueryValidatorsRequest{ // Leaving status empty on purpose to query all validators. Pagination: pageReq, }) @@ -172,7 +171,7 @@ $ %s query staking unbonding-delegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9l Pagination: pageReq, } - res, err := queryClient.ValidatorUnbondingDelegations(context.Background(), params) + res, err := queryClient.ValidatorUnbondingDelegations(cmd.Context(), params) if err != nil { return err } @@ -227,7 +226,7 @@ $ %s query staking redelegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj Pagination: pageReq, } - res, err := queryClient.Redelegations(context.Background(), params) + res, err := queryClient.Redelegations(cmd.Context(), params) if err != nil { return err } @@ -282,7 +281,7 @@ $ %s query staking delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghju ValidatorAddr: valAddr.String(), } - res, err := queryClient.Delegation(context.Background(), params) + res, err := queryClient.Delegation(cmd.Context(), params) if err != nil { return err } @@ -336,7 +335,7 @@ $ %s query staking delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p Pagination: pageReq, } - res, err := queryClient.DelegatorDelegations(context.Background(), params) + res, err := queryClient.DelegatorDelegations(cmd.Context(), params) if err != nil { return err } @@ -391,7 +390,7 @@ $ %s query staking delegations-to %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj Pagination: pageReq, } - res, err := queryClient.ValidatorDelegations(context.Background(), params) + res, err := queryClient.ValidatorDelegations(cmd.Context(), params) if err != nil { return err } @@ -447,7 +446,7 @@ $ %s query staking unbonding-delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9 ValidatorAddr: valAddr.String(), } - res, err := queryClient.UnbondingDelegation(context.Background(), params) + res, err := queryClient.UnbondingDelegation(cmd.Context(), params) if err != nil { return err } @@ -501,7 +500,7 @@ $ %s query staking unbonding-delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru Pagination: pageReq, } - res, err := queryClient.DelegatorUnbondingDelegations(context.Background(), params) + res, err := queryClient.DelegatorUnbondingDelegations(cmd.Context(), params) if err != nil { return err } @@ -563,7 +562,7 @@ $ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1l2r SrcValidatorAddr: valSrcAddr.String(), } - res, err := queryClient.Redelegations(context.Background(), params) + res, err := queryClient.Redelegations(cmd.Context(), params) if err != nil { return err } @@ -617,7 +616,7 @@ $ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p Pagination: pageReq, } - res, err := queryClient.Redelegations(context.Background(), params) + res, err := queryClient.Redelegations(cmd.Context(), params) if err != nil { return err } @@ -660,7 +659,7 @@ $ %s query staking historical-info 5 } params := &types.QueryHistoricalInfoRequest{Height: height} - res, err := queryClient.HistoricalInfo(context.Background(), params) + res, err := queryClient.HistoricalInfo(cmd.Context(), params) if err != nil { return err @@ -697,7 +696,7 @@ $ %s query staking pool } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Pool(context.Background(), &types.QueryPoolRequest{}) + res, err := queryClient.Pool(cmd.Context(), &types.QueryPoolRequest{}) if err != nil { return err } @@ -733,7 +732,7 @@ $ %s query staking params } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) + res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) if err != nil { return err } diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index 20333d62ff11..4eece491d429 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// Calculate the ValidatorUpdates for the current block +// BlockValidatorUpdates calculates the ValidatorUpdates for the current block // Called in each EndBlock func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { // Calculate validator set changes. @@ -97,7 +97,7 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { return validatorUpdates } -// Apply and return accumulated updates to the bonded validator set. Also, +// ApplyAndReturnValidatorSetUpdates applies and return accumulated updates to the bonded validator set. Also, // * Updates the active valset as keyed by LastValidatorPowerKey. // * Updates the total power as keyed by LastTotalPowerKey. // * Updates validator status' according to updated powers. @@ -119,7 +119,10 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab // Retrieve the last validator set. // The persistent set is updated later in this function. // (see LastValidatorPowerKey). - last := k.getLastValidatorsByAddr(ctx) + last, err := k.getLastValidatorsByAddr(ctx) + if err != nil { + return nil, err + } // Iterate over validators, highest power to lowest. iterator := k.ValidatorsPowerStoreIterator(ctx) @@ -162,10 +165,11 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab } // fetch the old power bytes - var valAddrBytes [sdk.AddrLen]byte - - copy(valAddrBytes[:], valAddr[:]) - oldPowerBytes, found := last[valAddrBytes] + valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixValAddr, valAddr) + if err != nil { + return nil, err + } + oldPowerBytes, found := last[valAddrStr] newPower := validator.ConsensusPower(powerReduction) newPowerBytes := k.cdc.MustMarshalBinaryBare(&gogotypes.Int64Value{Value: newPower}) @@ -176,13 +180,17 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab k.SetLastValidatorPower(ctx, valAddr, newPower) } - delete(last, valAddrBytes) + delete(last, valAddrStr) count++ totalPower = totalPower.Add(sdk.NewInt(newPower)) } - noLongerBonded := sortNoLongerBonded(last) + noLongerBonded, err := sortNoLongerBonded(last) + if err != nil { + return nil, err + } + for _, valAddrBytes := range noLongerBonded { validator := k.mustGetValidator(ctx, sdk.ValAddress(valAddrBytes)) validator, err = k.bondedToUnbonding(ctx, validator) @@ -341,39 +349,46 @@ func (k Keeper) completeUnbondingValidator(ctx sdk.Context, validator types.Vali return validator } -// map of operator addresses to serialized power -type validatorsByAddr map[[sdk.AddrLen]byte][]byte +// map of operator bech32-addresses to serialized power +// We use bech32 strings here, because we can't have slices as keys: map[[]byte][]byte +type validatorsByAddr map[string][]byte // get the last validator set -func (k Keeper) getLastValidatorsByAddr(ctx sdk.Context) validatorsByAddr { +func (k Keeper) getLastValidatorsByAddr(ctx sdk.Context) (validatorsByAddr, error) { last := make(validatorsByAddr) iterator := k.LastValidatorsIterator(ctx) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var valAddr [sdk.AddrLen]byte - // extract the validator address from the key (prefix is 1-byte) - copy(valAddr[:], iterator.Key()[1:]) + // extract the validator address from the key (prefix is 1-byte, addrLen is 1-byte) + valAddr := types.AddressFromLastValidatorPowerKey(iterator.Key()) + valAddrStr, err := sdk.Bech32ifyAddressBytes(sdk.Bech32PrefixValAddr, valAddr) + if err != nil { + return nil, err + } + powerBytes := iterator.Value() - last[valAddr] = make([]byte, len(powerBytes)) - copy(last[valAddr], powerBytes) + last[valAddrStr] = make([]byte, len(powerBytes)) + copy(last[valAddrStr], powerBytes) } - return last + return last, nil } // given a map of remaining validators to previous bonded power // returns the list of validators to be unbonded, sorted by operator address -func sortNoLongerBonded(last validatorsByAddr) [][]byte { +func sortNoLongerBonded(last validatorsByAddr) ([][]byte, error) { // sort the map keys for determinism noLongerBonded := make([][]byte, len(last)) index := 0 - for valAddrBytes := range last { - valAddr := make([]byte, sdk.AddrLen) - copy(valAddr, valAddrBytes[:]) - noLongerBonded[index] = valAddr + for valAddrStr := range last { + valAddrBytes, err := sdk.ValAddressFromBech32(valAddrStr) + if err != nil { + return nil, err + } + noLongerBonded[index] = valAddrBytes index++ } // sorted by address - order doesn't matter @@ -382,5 +397,5 @@ func sortNoLongerBonded(last validatorsByAddr) [][]byte { return bytes.Compare(noLongerBonded[i], noLongerBonded[j]) == -1 }) - return noLongerBonded + return noLongerBonded, nil } diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index 591ab374d7ab..28c0946e9540 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -327,7 +327,7 @@ func (k Keeper) IterateLastValidatorPowers(ctx sdk.Context, handler func(operato defer iter.Close() for ; iter.Valid(); iter.Next() { - addr := sdk.ValAddress(iter.Key()[len(types.LastValidatorPowerKey):]) + addr := sdk.ValAddress(types.AddressFromLastValidatorPowerKey(iter.Key())) intV := &gogotypes.Int64Value{} k.cdc.MustUnmarshalBinaryBare(iter.Value(), intV) diff --git a/x/staking/spec/01_state.md b/x/staking/spec/01_state.md index c0aae9943bc9..e090acb01541 100644 --- a/x/staking/spec/01_state.md +++ b/x/staking/spec/01_state.md @@ -8,24 +8,16 @@ order: 1 LastTotalPower tracks the total amounts of bonded tokens recorded during the previous end block. -- LastTotalPower: `0x12 -> amino(sdk.Int)` +- LastTotalPower: `0x12 -> ProtocolBuffer(sdk.Int)` ## Params Params is a module-wide configuration structure that stores system parameters and defines overall functioning of the staking module. -- Params: `Paramsspace("staking") -> amino(params)` +- Params: `Paramsspace("staking") -> legacy_amino(params)` -```go -type Params struct { - UnbondingTime time.Duration // time duration of unbonding - MaxValidators uint16 // maximum number of validators - MaxEntries uint16 // max entries for either unbonding delegation or redelegation (per pair/trio) - BondDenom string // bondable coin denomination - PowerReduction sdk.Int // power reduction on-chain param -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/proto/cosmos/staking/v1beta1/staking.proto#L230-L241 ## Validator @@ -38,8 +30,8 @@ Validators can have one of three statuses They are signing blocks and receiving rewards. They can receive further delegations. They can be slashed for misbehavior. Delegators to this validator who unbond their delegation must wait the duration of the UnbondingTime, a chain-specific param. during which time - they are still slashable for offences of the source validator if those offences were committed - during the period of time that the tokens were bonded. + they are still slashable for offences of the source validator if those offences were committed + during the period of time that the tokens were bonded. - `Unbonding`: When a validator leaves the active set, either by choice or due to slashing or tombstoning, an unbonding of all their delegations begins. All delegations must then wait the UnbondingTime before moving receiving their tokens to their accounts from the `BondedPool`. @@ -52,10 +44,10 @@ required lookups for slashing and validator-set updates. A third special index throughout each block, unlike the first two indices which mirror the validator records within a block. -- Validators: `0x21 | OperatorAddr -> amino(validator)` +- Validators: `0x21 | OperatorAddr -> ProtocolBuffer(validator)` - ValidatorsByConsAddr: `0x22 | ConsAddr -> OperatorAddr` - ValidatorsByPower: `0x23 | BigEndian(ConsensusPower) | OperatorAddr -> OperatorAddr` -- LastValidatorsPower: `0x11 OperatorAddr -> amino(ConsensusPower)` +- LastValidatorsPower: `0x11 OperatorAddr -> ProtocolBuffer(ConsensusPower)` `Validators` is the primary index - it ensures that each operator can have only one associated validator, where the public key of that validator can change in the @@ -69,7 +61,7 @@ address which can be derived from the validator's `ConsPubKey`. `ValidatorsByPower` is an additional index that provides a sorted list o potential validators to quickly determine the current active set. Here -ConsensusPower is validator.Tokens/10^6. Note that all validators where +ConsensusPower is validator.Tokens/10^6. Note that all validators where `Jailed` is true are not stored within this index. `LastValidatorsPower` is a special index that provides a historical list of the @@ -78,60 +70,23 @@ is updated during the validator set update process which takes place in [`EndBlo Each validator's state is stored in a `Validator` struct: -```go -type Validator struct { - OperatorAddress sdk.ValAddress // address of the validator's operator; bech encoded in JSON - ConsPubKey crypto.PubKey // the consensus public key of the validator; bech encoded in JSON - Jailed bool // has the validator been jailed from bonded status? - Status sdk.BondStatus // validator status (bonded/unbonding/unbonded) - Tokens sdk.Int // delegated tokens (incl. self-delegation) - DelegatorShares sdk.Dec // total shares issued to a validator's delegators - Description Description // description terms for the validator - UnbondingHeight int64 // if unbonding, height at which this validator has begun unbonding - UnbondingCompletionTime time.Time // if unbonding, min time for the validator to complete unbonding - Commission Commission // commission parameters - MinSelfDelegation sdk.Int // validator's self declared minimum self delegation -} - -type Commission struct { - CommissionRates - UpdateTime time.Time // the last time the commission rate was changed -} - -CommissionRates struct { - Rate sdk.Dec // the commission rate charged to delegators, as a fraction - MaxRate sdk.Dec // maximum commission rate which validator can ever charge, as a fraction - MaxChangeRate sdk.Dec // maximum daily increase of the validator commission, as a fraction -} - -type Description struct { - Moniker string // name - Identity string // optional identity signature (ex. UPort or Keybase) - Website string // optional website link - SecurityContact string // optional email for security contact - Details string // optional details -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L65-L99 + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L24-L63 ## Delegation Delegations are identified by combining `DelegatorAddr` (the address of the delegator) with the `ValidatorAddr` Delegators are indexed in the store as follows: -- Delegation: `0x31 | DelegatorAddr | ValidatorAddr -> amino(delegation)` +- Delegation: `0x31 | DelegatorAddr | ValidatorAddr -> ProtocolBuffer(delegation)` Stake holders may delegate coins to validators; under this circumstance their funds are held in a `Delegation` data structure. It is owned by one delegator, and is associated with the shares for one validator. The sender of the transaction is the owner of the bond. -```go -type Delegation struct { - DelegatorAddr sdk.AccAddress - ValidatorAddr sdk.ValAddress - Shares sdk.Dec // delegation shares received -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L159-L170 ### Delegator Shares @@ -160,10 +115,8 @@ detected. `UnbondingDelegation` are indexed in the store as: -- UnbondingDelegation: `0x32 | DelegatorAddr | ValidatorAddr -> - amino(unbondingDelegation)` -- UnbondingDelegationsFromValidator: `0x33 | ValidatorAddr | DelegatorAddr -> - nil` +- UnbondingDelegation: `0x32 | DelegatorAddr | ValidatorAddr -> ProtocolBuffer(unbondingDelegation)` +- UnbondingDelegationsFromValidator: `0x33 | ValidatorAddr | DelegatorAddr -> nil` The first map here is used in queries, to lookup all unbonding delegations for a given delegator, while the second map is used in slashing, to lookup all @@ -172,20 +125,7 @@ slashed. A UnbondingDelegation object is created every time an unbonding is initiated. -```go -type UnbondingDelegation struct { - DelegatorAddr sdk.AccAddress // delegator - ValidatorAddr sdk.ValAddress // validator unbonding from operator addr - Entries []UnbondingDelegationEntry // unbonding delegation entries -} - -type UnbondingDelegationEntry struct { - CreationHeight int64 // height which the unbonding took place - CompletionTime time.Time // unix time for unbonding completion - InitialBalance sdk.Coin // atoms initially scheduled to receive at completion - Balance sdk.Coin // atoms to receive at completion -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L172-L198 ## Redelegation @@ -197,7 +137,7 @@ committed by the source validator. `Redelegation` are indexed in the store as: -- Redelegations: `0x34 | DelegatorAddr | ValidatorSrcAddr | ValidatorDstAddr -> amino(redelegation)` +- Redelegations: `0x34 | DelegatorAddr | ValidatorSrcAddr | ValidatorDstAddr -> ProtocolBuffer(redelegation)` - RedelegationsBySrc: `0x35 | ValidatorSrcAddr | ValidatorDstAddr | DelegatorAddr -> nil` - RedelegationsByDst: `0x36 | ValidatorDstAddr | ValidatorSrcAddr | DelegatorAddr -> nil` @@ -205,30 +145,15 @@ The first map here is used for queries, to lookup all redelegations for a given delegator. The second map is used for slashing based on the `ValidatorSrcAddr`, while the third map is for slashing based on the `ValidatorDstAddr`. -A redelegation object is created every time a redelegation occurs. To prevent +A redelegation object is created every time a redelegation occurs. To prevent "redelegation hopping" redelegations may not occur under the situation that: - the (re)delegator already has another immature redelegation in progress -with a destination to a validator (let's call it `Validator X`) + with a destination to a validator (let's call it `Validator X`) - and, the (re)delegator is attempting to create a _new_ redelegation -where the source validator for this new redelegation is `Validator-X`. - -```go -type Redelegation struct { - DelegatorAddr sdk.AccAddress // delegator - ValidatorSrcAddr sdk.ValAddress // validator redelegation source operator addr - ValidatorDstAddr sdk.ValAddress // validator redelegation destination operator addr - Entries []RedelegationEntry // redelegation entries -} - -type RedelegationEntry struct { - CreationHeight int64 // height which the redelegation took place - CompletionTime time.Time // unix time for redelegation completion - InitialBalance sdk.Coin // initial balance when redelegation started - Balance sdk.Coin // current balance (current value held in destination validator) - SharesDst sdk.Dec // amount of destination-validator shares created by redelegation -} -``` + where the source validator for this new redelegation is `Validator-X`. + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L200-L228 ## Queues @@ -250,12 +175,7 @@ delegations queue is kept. - UnbondingDelegation: `0x41 | format(time) -> []DVPair` -```go -type DVPair struct { - DelegatorAddr sdk.AccAddress - ValidatorAddr sdk.ValAddress -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L123-L133 ### RedelegationQueue @@ -264,13 +184,7 @@ kept. - UnbondingDelegation: `0x42 | format(time) -> []DVVTriplet` -```go -type DVVTriplet struct { - DelegatorAddr sdk.AccAddress - ValidatorSrcAddr sdk.ValAddress - ValidatorDstAddr sdk.ValAddress -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L140-L152 ### ValidatorQueue @@ -280,7 +194,7 @@ queue is kept. - ValidatorQueueTime: `0x43 | format(time) -> []sdk.ValAddress` The stored object as each key is an array of validator operator addresses from -which the validator object can be accessed. Typically it is expected that only +which the validator object can be accessed. Typically it is expected that only a single validator record will be associated with a given timestamp however it is possible that multiple validators exist in the queue at the same location. @@ -289,15 +203,10 @@ that multiple validators exist in the queue at the same location. HistoricalInfo objects are stored and pruned at each block such that the staking keeper persists the `n` most recent historical info defined by staking module parameter: `HistoricalEntries`. -```go -type HistoricalInfo struct { - Header tmproto.Header - ValSet []types.Validator -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L15-L22 At each BeginBlock, the staking keeper will persist the current Header and the Validators that committed -the current block in a `HistoricalInfo` object. The Validators are sorted on their address to ensure that +the current block in a `HistoricalInfo` object. The Validators are sorted on their address to ensure that they are in a determisnistic order. -The oldest HistoricalEntries will be pruned to ensure that there only exist the parameter-defined number of +The oldest HistoricalEntries will be pruned to ensure that there only exist the parameter-defined number of historical entries. diff --git a/x/staking/spec/02_state_transitions.md b/x/staking/spec/02_state_transitions.md index c2766aa43b79..9e245719cc24 100644 --- a/x/staking/spec/02_state_transitions.md +++ b/x/staking/spec/02_state_transitions.md @@ -11,12 +11,13 @@ This document describes the state transition operations pertaining to: 3. [Slashing](./02_state_transitions.md#slashing) ## Validators -State transitions in validators are performed on every [`EndBlock`](./05_end_block.md#validator-set-changes) + +State transitions in validators are performed on every [`EndBlock`](./05_end_block.md#validator-set-changes) in order to check for changes in the active `ValidatorSet`. ### Unbonded to Bonded -The following transition occurs when a validator's ranking in the `ValidatorPowerIndex` surpasses +The following transition occurs when a validator's ranking in the `ValidatorPowerIndex` surpasses that of the `LastValidator`. - set `validator.Status` to `Bonded` @@ -98,9 +99,9 @@ Redelegations affect the delegation, source and destination validators. - perform an `unbond` delegation from the source validator to retrieve the tokens worth of the unbonded shares - using the unbonded tokens, `Delegate` them to the destination validator -- if the `sourceValidator.Status` is `Bonded`, and the `destinationValidator` is not, +- if the `sourceValidator.Status` is `Bonded`, and the `destinationValidator` is not, transfer the newly delegated tokens from the `BondedPool` to the `NotBondedPool` `ModuleAccount` -- otherwise, if the `sourceValidator.Status` is not `Bonded`, and the `destinationValidator` +- otherwise, if the `sourceValidator.Status` is not `Bonded`, and the `destinationValidator` is `Bonded`, transfer the newly delegated tokens from the `NotBondedPool` to the `BondedPool` `ModuleAccount` - record the token amount in an new entry in the relevant `Redelegation` @@ -116,20 +117,20 @@ When a redelegations complete the following occurs: When a Validator is slashed, the following occurs: -- The total `slashAmount` is calculated as the `slashFactor` (a chain parameter) * `TokensFromConsensusPower`, -the total number of tokens bonded to the validator at the time of the infraction. +- The total `slashAmount` is calculated as the `slashFactor` (a chain parameter) \* `TokensFromConsensusPower`, + the total number of tokens bonded to the validator at the time of the infraction. - Every unbonding delegation and redelegation from the validator are slashed by the `slashFactor` -percentage of the initialBalance. + percentage of the initialBalance. - Each amount slashed from redelegations and unbonding delegations is subtracted from the -total slash amount. + total slash amount. - The `remaingSlashAmount` is then slashed from the validator's tokens in the `BondedPool` or -`NonBondedPool` depending on the validator's status. This reduces the total supply of tokens. + `NonBondedPool` depending on the validator's status. This reduces the total supply of tokens. ### Slash Unbonding Delegation -When a validator is slashed, so are those unbonding delegations from the validator that began unbonding -after the time of the infraction. Every entry in every unbonding delegation from the validator -is slashed by `slashFactor`. The amount slashed is calculated from the `InitialBalance` of the +When a validator is slashed, so are those unbonding delegations from the validator that began unbonding +after the time of the infraction. Every entry in every unbonding delegation from the validator +is slashed by `slashFactor`. The amount slashed is calculated from the `InitialBalance` of the delegation and is capped to prevent a resulting negative balance. Completed (or mature) unbondings are not slashed. ### Slash Redelegation diff --git a/x/staking/spec/03_messages.md b/x/staking/spec/03_messages.md index bd9f21e2ceb0..1155da93d97d 100644 --- a/x/staking/spec/03_messages.md +++ b/x/staking/spec/03_messages.md @@ -6,23 +6,15 @@ order: 3 In this section we describe the processing of the staking messages and the corresponding updates to the state. All created/modified state objects specified by each message are defined within the [state](./02_state_transitions.md) section. -## MsgCreateValidator +## Msg/CreateValidator -A validator is created using the `MsgCreateValidator` message. +A validator is created using the `Msg/CreateValidator` service message. -```go -type MsgCreateValidator struct { - Description Description - Commission Commission ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L16-L17 - DelegatorAddr sdk.AccAddress - ValidatorAddr sdk.ValAddress - PubKey crypto.PubKey - Delegation sdk.Coin -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L35-L51 -This message is expected to fail if: +This service message is expected to fail if: - another validator with this operator address is already registered - another validator with this pubkey is already registered @@ -33,71 +25,63 @@ This message is expected to fail if: - the initial `MaxChangeRate` is either negative or > `MaxRate` - the description fields are too large -This message creates and stores the `Validator` object at appropriate indexes. +This service message creates and stores the `Validator` object at appropriate indexes. Additionally a self-delegation is made with the initial tokens delegation tokens `Delegation`. The validator always starts as unbonded but may be bonded in the first end-block. -## MsgEditValidator +## Msg/EditValidator The `Description`, `CommissionRate` of a validator can be updated using the -`MsgEditCandidacy`. +`Msg/EditCandidacy` service message. -```go -type MsgEditCandidacy struct { - Description Description - ValidatorAddr sdk.ValAddress - CommissionRate sdk.Dec -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L19-L20 -This message is expected to fail if: ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L56-L76 + +This service message is expected to fail if: - the initial `CommissionRate` is either negative or > `MaxRate` - the `CommissionRate` has already been updated within the previous 24 hours - the `CommissionRate` is > `MaxChangeRate` - the description fields are too large -This message stores the updated `Validator` object. +This service message stores the updated `Validator` object. -## MsgDelegate +## Msg/Delegate -Within this message the delegator provides coins, and in return receives +Within this service message the delegator provides coins, and in return receives some amount of their validator's (newly created) delegator-shares that are assigned to `Delegation.Shares`. -```go -type MsgDelegate struct { - DelegatorAddr sdk.AccAddress - ValidatorAddr sdk.ValAddress - Amount sdk.Coin -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L22-L24 + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90 -This message is expected to fail if: +This service message is expected to fail if: - the validator is does not exist - the validator is jailed - the `Amount` `Coin` has a denomination different than one defined by `params.BondDenom` If an existing `Delegation` object for provided addresses does not already -exist than it is created as part of this message otherwise the existing +exist than it is created as part of this service message otherwise the existing `Delegation` is updated to include the newly received shares. -## MsgBeginUnbonding +## Msg/Undelegate -The begin unbonding message allows delegators to undelegate their tokens from +The `Msg/Undelegate` service message allows delegators to undelegate their tokens from validator. -```go -type MsgBeginUnbonding struct { - DelegatorAddr sdk.AccAddress - ValidatorAddr sdk.ValAddress - Amount sdk.Coin -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L30-L32 + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121 + +This service message returns a response containing the completion time of the undelegation: -This message is expected to fail if: ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L123-L126 + +This service message is expected to fail if: - the delegation doesn't exist - the validator doesn't exist @@ -105,7 +89,7 @@ This message is expected to fail if: - existing `UnbondingDelegation` has maximum entries as defined by `params.MaxEntries` - the `Amount` has a denomination different than one defined by `params.BondDenom` -When this message is processed the following actions occur: +When this service message is processed the following actions occur: - validator's `DelegatorShares` and the delegation's `Shares` are both reduced by the message `SharesAmount` - calculate the token worth of the shares remove that amount tokens held within the validator @@ -116,22 +100,21 @@ When this message is processed the following actions occur: - if there are no more `Shares` in the delegation, then the delegation object is removed from the store - under this situation if the delegation is the validator's self-delegation then also jail the validator. -## MsgBeginRedelegate +## Msg/BeginRedelegate The redelegation command allows delegators to instantly switch validators. Once the unbonding period has passed, the redelegation is automatically completed in the EndBlocker. -```go -type MsgBeginRedelegate struct { - DelegatorAddr sdk.AccAddress - ValidatorSrcAddr sdk.ValAddress - ValidatorDstAddr sdk.ValAddress - Amount sdk.Coin -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L26-L28 + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105 + +This service message returns a response containing the completion time of the redelegation: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L107-L110 -This message is expected to fail if: +This service message is expected to fail if: - the delegation doesn't exist - the source or destination validators don't exist @@ -140,7 +123,7 @@ This message is expected to fail if: - existing `Redelegation` has maximum entries as defined by `params.MaxEntries` - the `Amount` `Coin` has a denomination different than one defined by `params.BondDenom` -When this message is processed the following actions occur: +When this service message is processed the following actions occur: - the source validator's `DelegatorShares` and the delegations `Shares` are both reduced by the message `SharesAmount` - calculate the token worth of the shares remove that amount tokens held within the source validator. @@ -148,6 +131,6 @@ When this message is processed the following actions occur: - `Bonded` - add an entry to the `Redelegation` (create `Redelegation` if it doesn't exist) with a completion time a full unbonding period from the current time. Update pool shares to reduce BondedTokens and increase NotBondedTokens by token worth of the shares (this may be effectively reversed in the next step however). - `Unbonding` - add an entry to the `Redelegation` (create `Redelegation` if it doesn't exist) with the same completion time as the validator (`UnbondingMinTime`). - `Unbonded` - no action required in this step -- Delegate the token worth to the destination validator, possibly moving tokens back to the bonded state. +- Delegate the token worth to the destination validator, possibly moving tokens back to the bonded state. - if there are no more `Shares` in the source delegation, then the source delegation object is removed from the store - under this situation if the delegation is the validator's self-delegation then also jail the validator. diff --git a/x/staking/spec/07_events.md b/x/staking/spec/07_events.md index d8255ca92b13..660319b3c1a4 100644 --- a/x/staking/spec/07_events.md +++ b/x/staking/spec/07_events.md @@ -18,9 +18,9 @@ The staking module emits the following events: | complete_redelegation | destination_validator | {dstValidatorAddress} | | complete_redelegation | delegator | {delegatorAddress} | -## Handlers +## Service Messages -### MsgCreateValidator +### Msg/CreateValidator | Type | Attribute Key | Attribute Value | | ---------------- | ------------- | ------------------ | @@ -30,7 +30,7 @@ The staking module emits the following events: | message | action | create_validator | | message | sender | {senderAddress} | -### MsgEditValidator +### Msg/EditValidator | Type | Attribute Key | Attribute Value | | -------------- | ------------------- | ------------------- | @@ -40,7 +40,7 @@ The staking module emits the following events: | message | action | edit_validator | | message | sender | {senderAddress} | -### MsgDelegate +### Msg/Delegate | Type | Attribute Key | Attribute Value | | -------- | ------------- | ------------------ | @@ -50,7 +50,7 @@ The staking module emits the following events: | message | action | delegate | | message | sender | {senderAddress} | -### MsgUndelegate +### Msg/Undelegate | Type | Attribute Key | Attribute Value | | ------- | ------------------- | ------------------ | @@ -61,9 +61,9 @@ The staking module emits the following events: | message | action | begin_unbonding | | message | sender | {senderAddress} | -* [0] Time is formatted in the RFC3339 standard +- [0] Time is formatted in the RFC3339 standard -### MsgBeginRedelegate +### Msg/BeginRedelegate | Type | Attribute Key | Attribute Value | | ---------- | --------------------- | --------------------- | @@ -75,4 +75,4 @@ The staking module emits the following events: | message | action | begin_redelegate | | message | sender | {senderAddress} | -* [0] Time is formatted in the RFC3339 standard +- [0] Time is formatted in the RFC3339 standard diff --git a/x/staking/spec/README.md b/x/staking/spec/README.md index 0005088ae837..a2cb7cf3a8df 100644 --- a/x/staking/spec/README.md +++ b/x/staking/spec/README.md @@ -38,18 +38,18 @@ network. - [Delegations](02_state_transitions.md#delegations) - [Slashing](02_state_transitions.md#slashing) 3. **[Messages](03_messages.md)** - - [MsgCreateValidator](03_messages.md#msgcreatevalidator) - - [MsgEditValidator](03_messages.md#msgeditvalidator) - - [MsgDelegate](03_messages.md#msgdelegate) - - [MsgBeginUnbonding](03_messages.md#msgbeginunbonding) - - [MsgBeginRedelegate](03_messages.md#msgbeginredelegate) + - [Msg/CreateValidator](03_messages.md#msgcreatevalidator) + - [Msg/EditValidator](03_messages.md#msgeditvalidator) + - [Msg/Delegate](03_messages.md#msgdelegate) + - [Msg/BeginUnbonding](03_messages.md#msgbeginunbonding) + - [Msg/BeginRedelegate](03_messages.md#msgbeginredelegate) 4. **[Begin-Block](04_begin_block.md)** - [Historical Info Tracking](04_begin_block.md#historical-info-tracking) -4. **[End-Block ](05_end_block.md)** +5. **[End-Block ](05_end_block.md)** - [Validator Set Changes](05_end_block.md#validator-set-changes) - [Queues ](05_end_block.md#queues-) -5. **[Hooks](06_hooks.md)** -6. **[Events](07_events.md)** +6. **[Hooks](06_hooks.md)** +7. **[Events](07_events.md)** - [EndBlocker](07_events.md#endblocker) - [Handlers](07_events.md#handlers) -7. **[Parameters](08_params.md)** +8. **[Parameters](08_params.md)** diff --git a/x/staking/types/keys.go b/x/staking/types/keys.go index abdbe8ccff1b..584dba5684c3 100644 --- a/x/staking/types/keys.go +++ b/x/staking/types/keys.go @@ -8,6 +8,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -48,24 +49,29 @@ var ( HistoricalInfoKey = []byte{0x50} // prefix for the historical info ) -// gets the key for the validator with address +// GetValidatorKey creates the key for the validator with address // VALUE: staking/Validator func GetValidatorKey(operatorAddr sdk.ValAddress) []byte { - return append(ValidatorsKey, operatorAddr.Bytes()...) + return append(ValidatorsKey, address.MustLengthPrefix(operatorAddr)...) } -// gets the key for the validator with pubkey +// GetValidatorByConsAddrKey creates the key for the validator with pubkey // VALUE: validator operator address ([]byte) func GetValidatorByConsAddrKey(addr sdk.ConsAddress) []byte { - return append(ValidatorsByConsAddrKey, addr.Bytes()...) + return append(ValidatorsByConsAddrKey, address.MustLengthPrefix(addr)...) } -// Get the validator operator address from LastValidatorPowerKey +// AddressFromValidatorsKey creates the validator operator address from ValidatorsKey +func AddressFromValidatorsKey(key []byte) []byte { + return key[2:] // remove prefix bytes and address length +} + +// AddressFromLastValidatorPowerKey creates the validator operator address from LastValidatorPowerKey func AddressFromLastValidatorPowerKey(key []byte) []byte { - return key[1:] // remove prefix bytes + return key[2:] // remove prefix bytes and address length } -// get the validator by power index. +// GetValidatorsByPowerIndexKey creates the validator by power index. // Power index is the key used in the power-store, and represents the relative // power ranking of the validator. // VALUE: validator operator address ([]byte) @@ -80,39 +86,39 @@ func GetValidatorsByPowerIndexKey(validator Validator, powerReduction sdk.Int) [ powerBytes := consensusPowerBytes powerBytesLen := len(powerBytes) // 8 - // key is of format prefix || powerbytes || addrBytes - key := make([]byte, 1+powerBytesLen+sdk.AddrLen) - - key[0] = ValidatorsByPowerIndexKey[0] - copy(key[1:powerBytesLen+1], powerBytes) addr, err := sdk.ValAddressFromBech32(validator.OperatorAddress) if err != nil { panic(err) } operAddrInvr := sdk.CopyBytes(addr) + addrLen := len(operAddrInvr) for i, b := range operAddrInvr { operAddrInvr[i] = ^b } - copy(key[powerBytesLen+1:], operAddrInvr) + // key is of format prefix || powerbytes || addrLen (1byte) || addrBytes + key := make([]byte, 1+powerBytesLen+1+addrLen) + + key[0] = ValidatorsByPowerIndexKey[0] + copy(key[1:powerBytesLen+1], powerBytes) + key[powerBytesLen+1] = byte(addrLen) + copy(key[powerBytesLen+2:], operAddrInvr) return key } -// get the bonded validator index key for an operator address +// GetLastValidatorPowerKey creates the bonded validator index key for an operator address func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte { - return append(LastValidatorPowerKey, operator...) + return append(LastValidatorPowerKey, address.MustLengthPrefix(operator)...) } -// parse the validators operator address from power rank key +// ParseValidatorPowerRankKey parses the validators operator address from power rank key func ParseValidatorPowerRankKey(key []byte) (operAddr []byte) { powerBytesLen := 8 - if len(key) != 1+powerBytesLen+sdk.AddrLen { - panic("Invalid validator power rank key length") - } - operAddr = sdk.CopyBytes(key[powerBytesLen+1:]) + // key is of format prefix (1 byte) || powerbytes || addrLen (1byte) || addrBytes + operAddr = sdk.CopyBytes(key[powerBytesLen+2:]) for i, b := range operAddr { operAddr[i] = ^b @@ -165,55 +171,51 @@ func ParseValidatorQueueKey(bz []byte) (time.Time, int64, error) { return ts, int64(height), nil } -// gets the key for delegator bond with validator +// GetDelegationKey creates the key for delegator bond with validator // VALUE: staking/Delegation func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { - return append(GetDelegationsKey(delAddr), valAddr.Bytes()...) + return append(GetDelegationsKey(delAddr), address.MustLengthPrefix(valAddr)...) } -// gets the prefix for a delegator for all validators +// GetDelegationsKey creates the prefix for a delegator for all validators func GetDelegationsKey(delAddr sdk.AccAddress) []byte { - return append(DelegationKey, delAddr.Bytes()...) + return append(DelegationKey, address.MustLengthPrefix(delAddr)...) } -// gets the key for an unbonding delegation by delegator and validator addr +// GetUBDKey creates the key for an unbonding delegation by delegator and validator addr // VALUE: staking/UnbondingDelegation func GetUBDKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { - return append( - GetUBDsKey(delAddr.Bytes()), - valAddr.Bytes()...) + return append(GetUBDsKey(delAddr.Bytes()), address.MustLengthPrefix(valAddr)...) } -// gets the index-key for an unbonding delegation, stored by validator-index +// GetUBDByValIndexKey creates the index-key for an unbonding delegation, stored by validator-index // VALUE: none (key rearrangement used) func GetUBDByValIndexKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { - return append(GetUBDsByValIndexKey(valAddr), delAddr.Bytes()...) + return append(GetUBDsByValIndexKey(valAddr), address.MustLengthPrefix(delAddr)...) } -// rearranges the ValIndexKey to get the UBDKey +// GetUBDKeyFromValIndexKey rearranges the ValIndexKey to get the UBDKey func GetUBDKeyFromValIndexKey(indexKey []byte) []byte { addrs := indexKey[1:] // remove prefix bytes - if len(addrs) != 2*sdk.AddrLen { - panic("unexpected key length") - } - valAddr := addrs[:sdk.AddrLen] - delAddr := addrs[sdk.AddrLen:] + valAddrLen := addrs[0] + valAddr := addrs[1 : 1+valAddrLen] + delAddr := addrs[valAddrLen+2:] return GetUBDKey(delAddr, valAddr) } -// gets the prefix for all unbonding delegations from a delegator +// GetUBDsKey creates the prefix for all unbonding delegations from a delegator func GetUBDsKey(delAddr sdk.AccAddress) []byte { - return append(UnbondingDelegationKey, delAddr.Bytes()...) + return append(UnbondingDelegationKey, address.MustLengthPrefix(delAddr)...) } -// gets the prefix keyspace for the indexes of unbonding delegations for a validator +// GetUBDsByValIndexKey creates the prefix keyspace for the indexes of unbonding delegations for a validator func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte { - return append(UnbondingDelegationByValIndexKey, valAddr.Bytes()...) + return append(UnbondingDelegationByValIndexKey, address.MustLengthPrefix(valAddr)...) } -// gets the prefix for all unbonding delegations from a delegator +// GetUnbondingDelegationTimeKey creates the prefix for all unbonding delegations from a delegator func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte { bz := sdk.FormatTimeBytes(timestamp) return append(UnbondingQueueKey, bz...) @@ -222,69 +224,76 @@ func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte { // GetREDKey returns a key prefix for indexing a redelegation from a delegator // and source validator to a destination validator. func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { - key := make([]byte, 1+sdk.AddrLen*3) + // key is of the form GetREDsKey || valSrcAddrLen (1 byte) || valSrcAddr || valDstAddrLen (1 byte) || valDstAddr + key := make([]byte, 1+3+len(delAddr)+len(valSrcAddr)+len(valDstAddr)) - copy(key[0:sdk.AddrLen+1], GetREDsKey(delAddr.Bytes())) - copy(key[sdk.AddrLen+1:2*sdk.AddrLen+1], valSrcAddr.Bytes()) - copy(key[2*sdk.AddrLen+1:3*sdk.AddrLen+1], valDstAddr.Bytes()) + copy(key[0:2+len(delAddr)], GetREDsKey(delAddr.Bytes())) + key[2+len(delAddr)] = byte(len(valSrcAddr)) + copy(key[3+len(delAddr):3+len(delAddr)+len(valSrcAddr)], valSrcAddr.Bytes()) + key[3+len(delAddr)+len(valSrcAddr)] = byte(len(valDstAddr)) + copy(key[4+len(delAddr)+len(valSrcAddr):], valDstAddr.Bytes()) return key } -// gets the index-key for a redelegation, stored by source-validator-index +// GetREDByValSrcIndexKey creates the index-key for a redelegation, stored by source-validator-index // VALUE: none (key rearrangement used) func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { REDSFromValsSrcKey := GetREDsFromValSrcIndexKey(valSrcAddr) offset := len(REDSFromValsSrcKey) - // key is of the form REDSFromValsSrcKey || delAddr || valDstAddr - key := make([]byte, len(REDSFromValsSrcKey)+2*sdk.AddrLen) + // key is of the form REDSFromValsSrcKey || delAddrLen (1 byte) || delAddr || valDstAddrLen (1 byte) || valDstAddr + key := make([]byte, offset+2+len(delAddr)+len(valDstAddr)) copy(key[0:offset], REDSFromValsSrcKey) - copy(key[offset:offset+sdk.AddrLen], delAddr.Bytes()) - copy(key[offset+sdk.AddrLen:offset+2*sdk.AddrLen], valDstAddr.Bytes()) + key[offset] = byte(len(delAddr)) + copy(key[offset+1:offset+1+len(delAddr)], delAddr.Bytes()) + key[offset+1+len(delAddr)] = byte(len(valDstAddr)) + copy(key[offset+2+len(delAddr):], valDstAddr.Bytes()) return key } -// gets the index-key for a redelegation, stored by destination-validator-index +// GetREDByValDstIndexKey creates the index-key for a redelegation, stored by destination-validator-index // VALUE: none (key rearrangement used) func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { REDSToValsDstKey := GetREDsToValDstIndexKey(valDstAddr) offset := len(REDSToValsDstKey) - // key is of the form REDSToValsDstKey || delAddr || valSrcAddr - key := make([]byte, len(REDSToValsDstKey)+2*sdk.AddrLen) + // key is of the form REDSToValsDstKey || delAddrLen (1 byte) || delAddr || valSrcAddrLen (1 byte) || valSrcAddr + key := make([]byte, offset+2+len(delAddr)+len(valSrcAddr)) copy(key[0:offset], REDSToValsDstKey) - copy(key[offset:offset+sdk.AddrLen], delAddr.Bytes()) - copy(key[offset+sdk.AddrLen:offset+2*sdk.AddrLen], valSrcAddr.Bytes()) + key[offset] = byte(len(delAddr)) + copy(key[offset+1:offset+1+len(delAddr)], delAddr.Bytes()) + key[offset+1+len(delAddr)] = byte(len(valSrcAddr)) + copy(key[offset+2+len(delAddr):], valSrcAddr.Bytes()) return key } // GetREDKeyFromValSrcIndexKey rearranges the ValSrcIndexKey to get the REDKey func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte { - // note that first byte is prefix byte - if len(indexKey) != 3*sdk.AddrLen+1 { - panic("unexpected key length") - } + // note that first byte is prefix byte, which we remove + addrs := indexKey[1:] - valSrcAddr := indexKey[1 : sdk.AddrLen+1] - delAddr := indexKey[sdk.AddrLen+1 : 2*sdk.AddrLen+1] - valDstAddr := indexKey[2*sdk.AddrLen+1 : 3*sdk.AddrLen+1] + valSrcAddrLen := addrs[0] + valSrcAddr := addrs[1 : valSrcAddrLen+1] + delAddrLen := addrs[valSrcAddrLen+1] + delAddr := addrs[valSrcAddrLen+2 : valSrcAddrLen+2+delAddrLen] + valDstAddr := addrs[valSrcAddrLen+delAddrLen+3:] return GetREDKey(delAddr, valSrcAddr, valDstAddr) } // GetREDKeyFromValDstIndexKey rearranges the ValDstIndexKey to get the REDKey func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte { - // note that first byte is prefix byte - if len(indexKey) != 3*sdk.AddrLen+1 { - panic("unexpected key length") - } + // note that first byte is prefix byte, which we remove + addrs := indexKey[1:] - valDstAddr := indexKey[1 : sdk.AddrLen+1] - delAddr := indexKey[sdk.AddrLen+1 : 2*sdk.AddrLen+1] - valSrcAddr := indexKey[2*sdk.AddrLen+1 : 3*sdk.AddrLen+1] + valDstAddrLen := addrs[0] + valDstAddr := addrs[1 : valDstAddrLen+1] + delAddrLen := addrs[valDstAddrLen+1] + delAddr := addrs[valDstAddrLen+2 : valDstAddrLen+2+delAddrLen] + valSrcAddr := addrs[valDstAddrLen+delAddrLen+3:] return GetREDKey(delAddr, valSrcAddr, valDstAddr) } @@ -299,25 +308,25 @@ func GetRedelegationTimeKey(timestamp time.Time) []byte { // GetREDsKey returns a key prefix for indexing a redelegation from a delegator // address. func GetREDsKey(delAddr sdk.AccAddress) []byte { - return append(RedelegationKey, delAddr.Bytes()...) + return append(RedelegationKey, address.MustLengthPrefix(delAddr)...) } // GetREDsFromValSrcIndexKey returns a key prefix for indexing a redelegation to // a source validator. func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte { - return append(RedelegationByValSrcIndexKey, valSrcAddr.Bytes()...) + return append(RedelegationByValSrcIndexKey, address.MustLengthPrefix(valSrcAddr)...) } // GetREDsToValDstIndexKey returns a key prefix for indexing a redelegation to a // destination (target) validator. func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte { - return append(RedelegationByValDstIndexKey, valDstAddr.Bytes()...) + return append(RedelegationByValDstIndexKey, address.MustLengthPrefix(valDstAddr)...) } // GetREDsByDelToValDstIndexKey returns a key prefix for indexing a redelegation // from an address to a source validator. func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) []byte { - return append(GetREDsToValDstIndexKey(valDstAddr), delAddr.Bytes()...) + return append(GetREDsToValDstIndexKey(valDstAddr), address.MustLengthPrefix(delAddr)...) } // GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects. diff --git a/x/staking/types/keys_test.go b/x/staking/types/keys_test.go index 0bd7a7c20bb7..35667f949da5 100644 --- a/x/staking/types/keys_test.go +++ b/x/staking/types/keys_test.go @@ -37,10 +37,10 @@ func TestGetValidatorPowerRank(t *testing.T) { validator types.Validator wantHex string }{ - {val1, "2300000000000000009c288ede7df62742fc3b7d0962045a8cef0f79f6"}, - {val2, "2300000000000000019c288ede7df62742fc3b7d0962045a8cef0f79f6"}, - {val3, "23000000000000000a9c288ede7df62742fc3b7d0962045a8cef0f79f6"}, - {val4, "2300000100000000009c288ede7df62742fc3b7d0962045a8cef0f79f6"}, + {val1, "230000000000000000149c288ede7df62742fc3b7d0962045a8cef0f79f6"}, + {val2, "230000000000000001149c288ede7df62742fc3b7d0962045a8cef0f79f6"}, + {val3, "23000000000000000a149c288ede7df62742fc3b7d0962045a8cef0f79f6"}, + {val4, "230000010000000000149c288ede7df62742fc3b7d0962045a8cef0f79f6"}, } for i, tt := range tests { got := hex.EncodeToString(types.GetValidatorsByPowerIndexKey(tt.validator, sdk.DefaultPowerReduction)) @@ -57,11 +57,11 @@ func TestGetREDByValDstIndexKey(t *testing.T) { wantHex string }{ {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr1), - "3663d771218209d8bd03c482f69dfba57310f0860963d771218209d8bd03c482f69dfba57310f0860963d771218209d8bd03c482f69dfba57310f08609"}, + "361463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f08609"}, {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr2), sdk.ValAddress(keysAddr3), - "363ab62f0d93849be495e21e3e9013a517038f45bd63d771218209d8bd03c482f69dfba57310f086095ef3b5f25c54946d4a89fc0d09d2f126614540f2"}, + "36143ab62f0d93849be495e21e3e9013a517038f45bd1463d771218209d8bd03c482f69dfba57310f08609145ef3b5f25c54946d4a89fc0d09d2f126614540f2"}, {sdk.AccAddress(keysAddr2), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr3), - "363ab62f0d93849be495e21e3e9013a517038f45bd5ef3b5f25c54946d4a89fc0d09d2f126614540f263d771218209d8bd03c482f69dfba57310f08609"}, + "36143ab62f0d93849be495e21e3e9013a517038f45bd145ef3b5f25c54946d4a89fc0d09d2f126614540f21463d771218209d8bd03c482f69dfba57310f08609"}, } for i, tt := range tests { got := hex.EncodeToString(types.GetREDByValDstIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) @@ -78,11 +78,11 @@ func TestGetREDByValSrcIndexKey(t *testing.T) { wantHex string }{ {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr1), - "3563d771218209d8bd03c482f69dfba57310f0860963d771218209d8bd03c482f69dfba57310f0860963d771218209d8bd03c482f69dfba57310f08609"}, + "351463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f086091463d771218209d8bd03c482f69dfba57310f08609"}, {sdk.AccAddress(keysAddr1), sdk.ValAddress(keysAddr2), sdk.ValAddress(keysAddr3), - "355ef3b5f25c54946d4a89fc0d09d2f126614540f263d771218209d8bd03c482f69dfba57310f086093ab62f0d93849be495e21e3e9013a517038f45bd"}, + "35145ef3b5f25c54946d4a89fc0d09d2f126614540f21463d771218209d8bd03c482f69dfba57310f08609143ab62f0d93849be495e21e3e9013a517038f45bd"}, {sdk.AccAddress(keysAddr2), sdk.ValAddress(keysAddr1), sdk.ValAddress(keysAddr3), - "3563d771218209d8bd03c482f69dfba57310f086095ef3b5f25c54946d4a89fc0d09d2f126614540f23ab62f0d93849be495e21e3e9013a517038f45bd"}, + "351463d771218209d8bd03c482f69dfba57310f08609145ef3b5f25c54946d4a89fc0d09d2f126614540f2143ab62f0d93849be495e21e3e9013a517038f45bd"}, } for i, tt := range tests { got := hex.EncodeToString(types.GetREDByValSrcIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 81c4caf82145..91f7df583f95 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -135,8 +135,11 @@ func (m *HistoricalInfo) GetValset() []Validator { // CommissionRates defines the initial commission rates to be used for creating // a validator. type CommissionRates struct { - Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` - MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` + // rate is the commission rate charged to delegators, as a fraction. + Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. + MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` + // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` } @@ -174,8 +177,10 @@ var xxx_messageInfo_CommissionRates proto.InternalMessageInfo // Commission defines commission parameters for a given validator. type Commission struct { + // commission_rates defines the initial commission rates to be used for creating a validator. CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` - UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` + // update_time is the last time the commission rate was changed. + UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` } func (m *Commission) Reset() { *m = Commission{} } @@ -219,11 +224,16 @@ func (m *Commission) GetUpdateTime() time.Time { // Description defines a validator description. type Description struct { - Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` - Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + // moniker defines a human-readable name for the validator. + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + // identity defines an optional identity signature (ex. UPort or Keybase). + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + // website defines an optional website link. + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + // security_contact defines an optional email for security contact. SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty" yaml:"security_contact"` - Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` + // details define other optional details. + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` } func (m *Description) Reset() { *m = Description{} } @@ -302,16 +312,27 @@ func (m *Description) GetDetails() string { // exchange rate. Voting power can be calculated as total bonded shares // multiplied by exchange rate. type Validator struct { - OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` - ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` - Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` - Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` - Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` - DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` - Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` - UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` - UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` - Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` + // operator_address defines the address of the validator's operator; bech encoded in JSON. + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` + // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` + // jailed defined whether the validator has been jailed from bonded status or not. + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + // status is the validator status (bonded/unbonding/unbonded). + Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` + // tokens define the delegated tokens (incl. self-delegation). + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` + // delegator_shares defines total shares issued to a validator's delegators. + DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` + // description defines the description terms for the validator. + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` + // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. + UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` + // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. + UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` + // commission defines the commission parameters. + Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` + // min_self_delegation is the validator's self declared minimum self delegation. MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` } @@ -567,9 +588,12 @@ func (m *DVVTriplets) GetTriplets() []DVVTriplet { // owned by one delegator, and is associated with the voting power of one // validator. type Delegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` - Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` + // delegator_address is the bech32-encoded address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + // validator_address is the bech32-encoded address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + // shares define the delegation shares received. + Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` } func (m *Delegation) Reset() { *m = Delegation{} } @@ -607,9 +631,12 @@ var xxx_messageInfo_Delegation proto.InternalMessageInfo // UnbondingDelegation stores all of a single delegator's unbonding bonds // for a single validator in an time-ordered list. type UnbondingDelegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` - Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` + // delegator_address is the bech32-encoded address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + // validator_address is the bech32-encoded address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + // entries are the unbonding delegation entries. + Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` } func (m *UnbondingDelegation) Reset() { *m = UnbondingDelegation{} } @@ -646,10 +673,14 @@ var xxx_messageInfo_UnbondingDelegation proto.InternalMessageInfo // UnbondingDelegationEntry defines an unbonding object with relevant metadata. type UnbondingDelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + // creation_height is the height which the unbonding took place. + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + // completion_time is the unix time for unbonding completion. + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + // initial_balance defines the tokens initially scheduled to receive at completion. InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` + // balance defines the tokens to receive at completion. + Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` } func (m *UnbondingDelegationEntry) Reset() { *m = UnbondingDelegationEntry{} } @@ -700,10 +731,14 @@ func (m *UnbondingDelegationEntry) GetCompletionTime() time.Time { // RedelegationEntry defines a redelegation object with relevant metadata. type RedelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + // creation_height defines the height which the redelegation took place. + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + // completion_time defines the unix time for redelegation completion. + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + // initial_balance defines the initial balance when redelegation started. InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` + // shares_dst is the amount of destination-validator shares created by redelegation. + SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` } func (m *RedelegationEntry) Reset() { *m = RedelegationEntry{} } @@ -755,10 +790,14 @@ func (m *RedelegationEntry) GetCompletionTime() time.Time { // Redelegation contains the list of a particular delegator's redelegating bonds // from a particular source validator to a particular destination validator. type Redelegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` - ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` - Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` + // delegator_address is the bech32-encoded address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + // validator_src_address is the validator redelegation source operator address. + ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` + // validator_dst_address is the validator redelegation destination operator address. + ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` + // entries are the redelegation entries. + Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` } func (m *Redelegation) Reset() { *m = Redelegation{} } diff --git a/x/upgrade/client/cli/query.go b/x/upgrade/client/cli/query.go index 675dba3a9e8d..39674cbc733a 100644 --- a/x/upgrade/client/cli/query.go +++ b/x/upgrade/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "fmt" "github.com/spf13/cobra" @@ -41,7 +40,7 @@ func GetCurrentPlanCmd() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) params := types.QueryCurrentPlanRequest{} - res, err := queryClient.CurrentPlan(context.Background(), ¶ms) + res, err := queryClient.CurrentPlan(cmd.Context(), ¶ms) if err != nil { return err } @@ -74,9 +73,9 @@ func GetAppliedPlanCmd() *cobra.Command { return err } queryClient := types.NewQueryClient(clientCtx) - + ctx := cmd.Context() params := types.QueryAppliedPlanRequest{Name: args[0]} - res, err := queryClient.AppliedPlan(context.Background(), ¶ms) + res, err := queryClient.AppliedPlan(ctx, ¶ms) if err != nil { return err } @@ -90,7 +89,7 @@ func GetAppliedPlanCmd() *cobra.Command { if err != nil { return err } - headers, err := node.BlockchainInfo(context.Background(), res.Height, res.Height) + headers, err := node.BlockchainInfo(ctx, res.Height, res.Height) if err != nil { return err } From 71305449d612bceddfccda809a372131a1160997 Mon Sep 17 00:00:00 2001 From: psaradev Date: Wed, 3 Feb 2021 22:43:27 +1000 Subject: [PATCH 11/23] regen staking.pb.go --- x/staking/types/staking.pb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 2823f4a57576..dfde1551a471 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -844,8 +844,8 @@ type Params struct { HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` // bond_denom defines the bondable coin denomination. BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` - // power_reduction xxx - PowerReduction github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=power_reduction,json=powerReduction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"power_reduction" yaml:"power_reduction"` + // power_reduction is the amount of staking tokens required for 1 unit of consensus-engine power + PowerReduction github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=power_reduction,json=powerReduction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"power_reduction" yaml:"power_reduction"` } func (m *Params) Reset() { *m = Params{} } From 36bc29a993f81c099f5950afe7db1322a76ef592 Mon Sep 17 00:00:00 2001 From: psaradev Date: Wed, 3 Feb 2021 23:06:02 +1000 Subject: [PATCH 12/23] golang-ci lint --- x/staking/legacy/v040/genesis.pb.go | 7 +- x/staking/legacy/v040/staking.pb.go | 102 ++++++++++------------------ x/staking/legacy/v040/validator.go | 8 +-- 3 files changed, 40 insertions(+), 77 deletions(-) diff --git a/x/staking/legacy/v040/genesis.pb.go b/x/staking/legacy/v040/genesis.pb.go index 11649dfde948..2e21644f1747 100644 --- a/x/staking/legacy/v040/genesis.pb.go +++ b/x/staking/legacy/v040/genesis.pb.go @@ -6,13 +6,12 @@ import ( math_bits "math/bits" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" ) // GenesisState defines the staking module's genesis state. type GenesisState struct { - // params defines all the paramaters of related to deposit. + // params defines all the parameters of related to deposit. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // last_total_power tracks the total amounts of bonded tokens recorded during // the previous end block. @@ -281,9 +280,7 @@ func (m *LastValidatorPower) Size() (n int) { func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} + func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/staking/legacy/v040/staking.pb.go b/x/staking/legacy/v040/staking.pb.go index f5bd8fe5e7cd..5d49ab0af2a7 100644 --- a/x/staking/legacy/v040/staking.pb.go +++ b/x/staking/legacy/v040/staking.pb.go @@ -4,19 +4,13 @@ import ( fmt "fmt" io "io" math_bits "math/bits" - reflect "reflect" strings "strings" time "time" types1 "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types2 "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + sdk "github.com/cosmos/cosmos-sdk/types" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/golang/protobuf/ptypes/timestamp" - _ "github.com/regen-network/cosmos-proto" ) // BondStatus is the status of a validator. @@ -33,30 +27,12 @@ const ( Bonded BondStatus = 3 ) -var BondStatus_name = map[int32]string{ - 0: "BOND_STATUS_UNSPECIFIED", - 1: "BOND_STATUS_UNBONDED", - 2: "BOND_STATUS_UNBONDING", - 3: "BOND_STATUS_BONDED", -} - -var BondStatus_value = map[string]int32{ - "BOND_STATUS_UNSPECIFIED": 0, - "BOND_STATUS_UNBONDED": 1, - "BOND_STATUS_UNBONDING": 2, - "BOND_STATUS_BONDED": 3, -} - -func (x BondStatus) String() string { - return proto.EnumName(BondStatus_name, int32(x)) -} - // CommissionRates defines the initial commission rates to be used for creating // a validator. type CommissionRates struct { - Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` - MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` - MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` + Rate sdk.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + MaxRate sdk.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` + MaxChangeRate sdk.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` } func (m *CommissionRates) Reset() { *m = CommissionRates{} } @@ -92,17 +68,17 @@ func (*Description) ProtoMessage() {} // exchange rate. Voting power can be calculated as total bonded shares // multiplied by exchange rate. type Validator struct { - OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` - ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` - Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` - Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` - Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` - DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` - Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` - UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` - UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` - Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` + ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` + Tokens sdk.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` + DelegatorShares sdk.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` + UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` + UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` + Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` + MinSelfDelegation sdk.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` } func (m *Validator) Reset() { *m = Validator{} } @@ -120,9 +96,9 @@ func (*ValAddresses) ProtoMessage() {} // owned by one delegator, and is associated with the voting power of one // validator. type Delegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` - Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Shares sdk.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` } func (m *Delegation) Reset() { *m = Delegation{} } @@ -141,10 +117,10 @@ func (*UnbondingDelegation) ProtoMessage() {} // UnbondingDelegationEntry defines an unbonding object with relevant metadata. type UnbondingDelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` - InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + InitialBalance sdk.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + Balance sdk.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` } func (m *UnbondingDelegationEntry) Reset() { *m = UnbondingDelegationEntry{} } @@ -152,10 +128,10 @@ func (*UnbondingDelegationEntry) ProtoMessage() {} // RedelegationEntry defines a redelegation object with relevant metadata. type RedelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` - InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + InitialBalance sdk.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + SharesDst sdk.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` } func (m *RedelegationEntry) Reset() { *m = RedelegationEntry{} } @@ -188,15 +164,15 @@ func (*Params) ProtoMessage() {} // DelegationResponse is equivalent to Delegation except that it contains a // balance in addition to shares which is more suitable for client responses. type DelegationResponse struct { - Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` - Balance types2.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` + Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` + Balance sdk.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` } // Pool is used for tracking bonded and not-bonded token supply of the bond // denomination. type Pool struct { - NotBondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` - BondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens" yaml:"bonded_tokens"` + NotBondedTokens sdk.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` + BondedTokens sdk.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens" yaml:"bonded_tokens"` } func (m *Pool) Reset() { *m = Pool{} } @@ -1141,27 +1117,17 @@ func (m *Pool) Size() (n int) { func sovStaking(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozStaking(x uint64) (n int) { - return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ValAddresses) String() string { - if this == nil { + +func (m *ValAddresses) String() string { + if m == nil { return "nil" } s := strings.Join([]string{`&ValAddresses{`, - `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `Addresses:` + fmt.Sprintf("%v", m.Addresses) + `,`, `}`, }, "") return s } -func valueToStringStaking(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *CommissionRates) Unmarshal(dAtA []byte) error { l := len(dAtA) diff --git a/x/staking/legacy/v040/validator.go b/x/staking/legacy/v040/validator.go index e68b3b6dd913..d43de847145b 100644 --- a/x/staking/legacy/v040/validator.go +++ b/x/staking/legacy/v040/validator.go @@ -7,10 +7,10 @@ import ( ) var ( - BondStatusUnspecified = BondStatus_name[int32(Unspecified)] - BondStatusUnbonded = BondStatus_name[int32(Unbonded)] - BondStatusUnbonding = BondStatus_name[int32(Unbonding)] - BondStatusBonded = BondStatus_name[int32(Bonded)] + BondStatusUnspecified = "BOND_STATUS_UNSPECIFIED" + BondStatusUnbonded = "BOND_STATUS_UNBONDED" + BondStatusUnbonding = "BOND_STATUS_UNBONDING" + BondStatusBonded = "BOND_STATUS_BONDED" ) // String implements the Stringer interface for a Validator object. From 2a43a2d8a4ebaf76276fbb3c199dd573f004298d Mon Sep 17 00:00:00 2001 From: psaradev Date: Wed, 3 Feb 2021 23:15:42 +1000 Subject: [PATCH 13/23] reduce legacy code --- x/staking/legacy/v040/staking.pb.go | 160 ++-------------------------- x/staking/legacy/v040/validator.go | 8 +- 2 files changed, 15 insertions(+), 153 deletions(-) diff --git a/x/staking/legacy/v040/staking.pb.go b/x/staking/legacy/v040/staking.pb.go index 5d49ab0af2a7..0146313d6d0c 100644 --- a/x/staking/legacy/v040/staking.pb.go +++ b/x/staking/legacy/v040/staking.pb.go @@ -4,7 +4,6 @@ import ( fmt "fmt" io "io" math_bits "math/bits" - strings "strings" time "time" types1 "github.com/cosmos/cosmos-sdk/codec/types" @@ -27,6 +26,17 @@ const ( Bonded BondStatus = 3 ) +var BondStatusName = map[int32]string{ + 0: "BOND_STATUS_UNSPECIFIED", + 1: "BOND_STATUS_UNBONDED", + 2: "BOND_STATUS_UNBONDING", + 3: "BOND_STATUS_BONDED", +} + +func (x BondStatus) String() string { + return proto.EnumName(BondStatusName, int32(x)) +} + // CommissionRates defines the initial commission rates to be used for creating // a validator. type CommissionRates struct { @@ -84,14 +94,6 @@ type Validator struct { func (m *Validator) Reset() { *m = Validator{} } func (*Validator) ProtoMessage() {} -// ValAddresses defines a repeated set of validator addresses. -type ValAddresses struct { - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` -} - -func (m *ValAddresses) Reset() { *m = ValAddresses{} } -func (*ValAddresses) ProtoMessage() {} - // Delegation represents the bond with tokens held by an account. It is // owned by one delegator, and is associated with the voting power of one // validator. @@ -451,38 +453,6 @@ func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ValAddresses) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValAddresses) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *Delegation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -956,21 +926,6 @@ func (m *Validator) Size() (n int) { return n } -func (m *ValAddresses) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - func (m *Delegation) Size() (n int) { if m == nil { return 0 @@ -1118,17 +1073,6 @@ func sovStaking(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func (m *ValAddresses) String() string { - if m == nil { - return "nil" - } - s := strings.Join([]string{`&ValAddresses{`, - `Addresses:` + fmt.Sprintf("%v", m.Addresses) + `,`, - `}`, - }, "") - return s -} - func (m *CommissionRates) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1984,88 +1928,6 @@ func (m *Validator) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValAddresses) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValAddresses: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValAddresses: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Delegation) Unmarshal(dAtA []byte) error { l := len(dAtA) diff --git a/x/staking/legacy/v040/validator.go b/x/staking/legacy/v040/validator.go index d43de847145b..9b4d569e850f 100644 --- a/x/staking/legacy/v040/validator.go +++ b/x/staking/legacy/v040/validator.go @@ -7,10 +7,10 @@ import ( ) var ( - BondStatusUnspecified = "BOND_STATUS_UNSPECIFIED" - BondStatusUnbonded = "BOND_STATUS_UNBONDED" - BondStatusUnbonding = "BOND_STATUS_UNBONDING" - BondStatusBonded = "BOND_STATUS_BONDED" + BondStatusUnspecified = BondStatusName[int32(Unspecified)] + BondStatusUnbonded = BondStatusName[int32(Unbonded)] + BondStatusUnbonding = BondStatusName[int32(Unbonding)] + BondStatusBonded = BondStatusName[int32(Bonded)] ) // String implements the Stringer interface for a Validator object. From be27ec1d297ee00cefb1693f75aefa03b8b6d479 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Sun, 21 Mar 2021 18:33:14 -0400 Subject: [PATCH 14/23] started fixing merge conflicts --- docs/core/proto-docs.md | 1 + x/ibc/core/02-client/keeper/keeper_test.go | 389 --- x/ibc/testing/chain.go | 910 ------ x/staking/keeper/delegation_test.go | 6 +- x/staking/legacy/v040/commission.go | 17 - x/staking/legacy/v040/delegation.go | 100 - x/staking/legacy/v040/genesis.pb.go | 774 ----- x/staking/legacy/v040/keys.go | 325 ++ x/staking/legacy/v040/migrate.go | 49 +- x/staking/legacy/v040/params.go | 11 - x/staking/legacy/v040/staking.pb.go | 3121 -------------------- x/staking/legacy/v040/validator.go | 43 - x/staking/legacy/v042/migrate.go | 117 - x/staking/legacy/v042/migrate_test.go | 101 - x/staking/legacy/v042/types.go | 5 - x/staking/types/staking.pb.go | 1815 ++++-------- 16 files changed, 958 insertions(+), 6826 deletions(-) delete mode 100644 x/ibc/core/02-client/keeper/keeper_test.go delete mode 100644 x/ibc/testing/chain.go delete mode 100644 x/staking/legacy/v040/commission.go delete mode 100644 x/staking/legacy/v040/delegation.go delete mode 100644 x/staking/legacy/v040/genesis.pb.go delete mode 100644 x/staking/legacy/v040/params.go delete mode 100644 x/staking/legacy/v040/staking.pb.go delete mode 100644 x/staking/legacy/v040/validator.go delete mode 100644 x/staking/legacy/v042/migrate.go delete mode 100644 x/staking/legacy/v042/migrate_test.go delete mode 100644 x/staking/legacy/v042/types.go diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 4da3e3dd3758..7a2f00ef89a2 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -5901,6 +5901,7 @@ Params defines the parameters for the staking module. | `max_entries` | [uint32](#uint32) | | max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). | | `historical_entries` | [uint32](#uint32) | | historical_entries is the number of historical entries to persist. | | `bond_denom` | [string](#string) | | bond_denom defines the bondable coin denomination. | +| `power_reduction` | [string](#string) | | power_reduction is the amount of staking tokens required for 1 unit of consensus-engine power | diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go deleted file mode 100644 index 364a505c5044..000000000000 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ /dev/null @@ -1,389 +0,0 @@ -package keeper_test - -import ( - "math/rand" - "testing" - "time" - - "github.com/stretchr/testify/suite" - tmbytes "github.com/tendermint/tendermint/libs/bytes" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/keeper" - "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" - commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" - "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" - ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" - localhosttypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/09-localhost/types" - ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" - ibctestingmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -const ( - testChainID = "gaiahub-0" - testChainIDRevision1 = "gaiahub-1" - - testClientID = "tendermint-0" - testClientID2 = "tendermint-1" - testClientID3 = "tendermint-2" - - height = 5 - - trustingPeriod time.Duration = time.Hour * 24 * 7 * 2 - ubdPeriod time.Duration = time.Hour * 24 * 7 * 3 - maxClockDrift time.Duration = time.Second * 10 -) - -var ( - testClientHeight = types.NewHeight(0, 5) - testClientHeightRevision1 = types.NewHeight(1, 5) - newClientHeight = types.NewHeight(1, 1) -) - -type KeeperTestSuite struct { - suite.Suite - - coordinator *ibctesting.Coordinator - - chainA *ibctesting.TestChain - chainB *ibctesting.TestChain - - cdc codec.Marshaler - ctx sdk.Context - keeper *keeper.Keeper - consensusState *ibctmtypes.ConsensusState - header *ibctmtypes.Header - valSet *tmtypes.ValidatorSet - valSetHash tmbytes.HexBytes - privVal tmtypes.PrivValidator - now time.Time - past time.Time - - queryClient types.QueryClient -} - -func (suite *KeeperTestSuite) SetupTest() { - suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) - - suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0)) - suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1)) - - isCheckTx := false - suite.now = time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC) - suite.past = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) - now2 := suite.now.Add(time.Hour) - app := simapp.Setup(isCheckTx) - - suite.cdc = app.AppCodec() - suite.ctx = app.BaseApp.NewContext(isCheckTx, tmproto.Header{Height: height, ChainID: testClientID, Time: now2}) - suite.keeper = &app.IBCKeeper.ClientKeeper - suite.privVal = ibctestingmock.NewPV() - - pubKey, err := suite.privVal.GetPubKey() - suite.Require().NoError(err) - - testClientHeightMinus1 := types.NewHeight(0, height-1) - - validator := tmtypes.NewValidator(pubKey, 1) - suite.valSet = tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) - suite.valSetHash = suite.valSet.Hash() - suite.header = suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeightMinus1, now2, suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) - suite.consensusState = ibctmtypes.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot([]byte("hash")), suite.valSetHash) - - var validators stakingtypes.Validators - for i := 1; i < 11; i++ { - privVal := ibctestingmock.NewPV() - tmPk, err := privVal.GetPubKey() - suite.Require().NoError(err) - pk, err := cryptocodec.FromTmPubKeyInterface(tmPk) - suite.Require().NoError(err) - val, err := stakingtypes.NewValidator(sdk.ValAddress(pk.Address()), pk, stakingtypes.Description{}) - suite.Require().NoError(err) - - val.Status = stakingtypes.Bonded - val.Tokens = sdk.NewInt(rand.Int63()) - validators = append(validators, val) - - hi := stakingtypes.NewHistoricalInfo(suite.ctx.BlockHeader(), validators, app.StakingKeeper.PowerReduction(suite.ctx)) - app.StakingKeeper.SetHistoricalInfo(suite.ctx, int64(i), &hi) - } - - // add localhost client - revision := types.ParseChainID(suite.chainA.ChainID) - localHostClient := localhosttypes.NewClientState( - suite.chainA.ChainID, types.NewHeight(revision, uint64(suite.chainA.GetContext().BlockHeight())), - ) - suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), exported.Localhost, localHostClient) - - queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, app.InterfaceRegistry()) - types.RegisterQueryServer(queryHelper, app.IBCKeeper.ClientKeeper) - suite.queryClient = types.NewQueryClient(queryHelper) -} - -func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) -} - -func (suite *KeeperTestSuite) TestSetClientState() { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - suite.keeper.SetClientState(suite.ctx, testClientID, clientState) - - retrievedState, found := suite.keeper.GetClientState(suite.ctx, testClientID) - suite.Require().True(found, "GetClientState failed") - suite.Require().Equal(clientState, retrievedState, "Client states are not equal") -} - -func (suite *KeeperTestSuite) TestSetClientConsensusState() { - suite.keeper.SetClientConsensusState(suite.ctx, testClientID, testClientHeight, suite.consensusState) - - retrievedConsState, found := suite.keeper.GetClientConsensusState(suite.ctx, testClientID, testClientHeight) - suite.Require().True(found, "GetConsensusState failed") - - tmConsState, ok := retrievedConsState.(*ibctmtypes.ConsensusState) - suite.Require().True(ok) - suite.Require().Equal(suite.consensusState, tmConsState, "ConsensusState not stored correctly") -} - -func (suite *KeeperTestSuite) TestValidateSelfClient() { - testClientHeight := types.NewHeight(0, uint64(suite.chainA.GetContext().BlockHeight()-1)) - - testCases := []struct { - name string - clientState exported.ClientState - expPass bool - }{ - { - "success", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - true, - }, - { - "success with nil UpgradePath", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), nil, false, false), - true, - }, - { - "invalid client type", - localhosttypes.NewClientState(suite.chainA.ChainID, testClientHeight), - false, - }, - { - "frozen client", - &ibctmtypes.ClientState{suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false}, - false, - }, - { - "incorrect chainID", - ibctmtypes.NewClientState("gaiatestnet", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - false, - }, - { - "invalid client height", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, uint64(suite.chainA.GetContext().BlockHeight())), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - false, - }, - { - "invalid client revision", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeightRevision1, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - false, - }, - { - "invalid proof specs", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, nil, ibctesting.UpgradePath, false, false), - false, - }, - { - "invalid trust level", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.Fraction{0, 1}, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - false, - }, - { - "invalid unbonding period", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+10, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - false, - }, - { - "invalid trusting period", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ubdPeriod+10, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - false, - }, - { - "invalid upgrade path", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), []string{"bad", "upgrade", "path"}, false, false), - false, - }, - } - - for _, tc := range testCases { - err := suite.chainA.App.IBCKeeper.ClientKeeper.ValidateSelfClient(suite.chainA.GetContext(), tc.clientState) - if tc.expPass { - suite.Require().NoError(err, "expected valid client for case: %s", tc.name) - } else { - suite.Require().Error(err, "expected invalid client for case: %s", tc.name) - } - } -} - -func (suite KeeperTestSuite) TestGetAllGenesisClients() { - clientIDs := []string{ - testClientID2, testClientID3, testClientID, - } - expClients := []exported.ClientState{ - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - } - - expGenClients := make(types.IdentifiedClientStates, len(expClients)) - - for i := range expClients { - suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientIDs[i], expClients[i]) - expGenClients[i] = types.NewIdentifiedClientState(clientIDs[i], expClients[i]) - } - - // add localhost client - localHostClient, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), exported.Localhost) - suite.Require().True(found) - expGenClients = append(expGenClients, types.NewIdentifiedClientState(exported.Localhost, localHostClient)) - - genClients := suite.chainA.App.IBCKeeper.ClientKeeper.GetAllGenesisClients(suite.chainA.GetContext()) - - suite.Require().Equal(expGenClients.Sort(), genClients) -} - -func (suite KeeperTestSuite) TestGetAllGenesisMetadata() { - expectedGenMetadata := []types.IdentifiedGenesisMetadata{ - types.NewIdentifiedGenesisMetadata( - "clientA", - []types.GenesisMetadata{ - types.NewGenesisMetadata(ibctmtypes.ProcessedTimeKey(types.NewHeight(0, 1)), []byte("foo")), - types.NewGenesisMetadata(ibctmtypes.ProcessedTimeKey(types.NewHeight(0, 2)), []byte("bar")), - types.NewGenesisMetadata(ibctmtypes.ProcessedTimeKey(types.NewHeight(0, 3)), []byte("baz")), - }, - ), - types.NewIdentifiedGenesisMetadata( - "clientB", - []types.GenesisMetadata{ - types.NewGenesisMetadata(ibctmtypes.ProcessedTimeKey(types.NewHeight(1, 100)), []byte("val1")), - types.NewGenesisMetadata(ibctmtypes.ProcessedTimeKey(types.NewHeight(2, 300)), []byte("val2")), - }, - ), - } - - genClients := []types.IdentifiedClientState{ - types.NewIdentifiedClientState("clientA", &ibctmtypes.ClientState{}), types.NewIdentifiedClientState("clientB", &ibctmtypes.ClientState{}), - types.NewIdentifiedClientState("clientC", &ibctmtypes.ClientState{}), types.NewIdentifiedClientState("clientD", &localhosttypes.ClientState{}), - } - - suite.chainA.App.IBCKeeper.ClientKeeper.SetAllClientMetadata(suite.chainA.GetContext(), expectedGenMetadata) - - actualGenMetadata, err := suite.chainA.App.IBCKeeper.ClientKeeper.GetAllClientMetadata(suite.chainA.GetContext(), genClients) - suite.Require().NoError(err, "get client metadata returned error unexpectedly") - suite.Require().Equal(expectedGenMetadata, actualGenMetadata, "retrieved metadata is unexpected") -} - -func (suite KeeperTestSuite) TestGetConsensusState() { - suite.ctx = suite.ctx.WithBlockHeight(10) - cases := []struct { - name string - height types.Height - expPass bool - }{ - {"zero height", types.ZeroHeight(), false}, - {"height > latest height", types.NewHeight(0, uint64(suite.ctx.BlockHeight())+1), false}, - {"latest height - 1", types.NewHeight(0, uint64(suite.ctx.BlockHeight())-1), true}, - {"latest height", types.GetSelfHeight(suite.ctx), true}, - } - - for i, tc := range cases { - tc := tc - cs, found := suite.keeper.GetSelfConsensusState(suite.ctx, tc.height) - if tc.expPass { - suite.Require().True(found, "Case %d should have passed: %s", i, tc.name) - suite.Require().NotNil(cs, "Case %d should have passed: %s", i, tc.name) - } else { - suite.Require().False(found, "Case %d should have failed: %s", i, tc.name) - suite.Require().Nil(cs, "Case %d should have failed: %s", i, tc.name) - } - } -} - -func (suite KeeperTestSuite) TestConsensusStateHelpers() { - // initial setup - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - - suite.keeper.SetClientState(suite.ctx, testClientID, clientState) - suite.keeper.SetClientConsensusState(suite.ctx, testClientID, testClientHeight, suite.consensusState) - - nextState := ibctmtypes.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot([]byte("next")), suite.valSetHash) - - testClientHeightPlus5 := types.NewHeight(0, height+5) - - header := suite.chainA.CreateTMClientHeader(testClientID, int64(testClientHeightPlus5.RevisionHeight), testClientHeight, suite.header.Header.Time.Add(time.Minute), - suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) - - // mock update functionality - clientState.LatestHeight = header.GetHeight().(types.Height) - suite.keeper.SetClientConsensusState(suite.ctx, testClientID, header.GetHeight(), nextState) - suite.keeper.SetClientState(suite.ctx, testClientID, clientState) - - latest, ok := suite.keeper.GetLatestClientConsensusState(suite.ctx, testClientID) - suite.Require().True(ok) - suite.Require().Equal(nextState, latest, "Latest client not returned correctly") -} - -// 2 clients in total are created on chainA. The first client is updated so it contains an initial consensus state -// and a consensus state at the update height. -func (suite KeeperTestSuite) TestGetAllConsensusStates() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) - - clientState := suite.chainA.GetClientState(clientA) - expConsensusHeight0 := clientState.GetLatestHeight() - consensusState0, ok := suite.chainA.GetConsensusState(clientA, expConsensusHeight0) - suite.Require().True(ok) - - // update client to create a second consensus state - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) - suite.Require().NoError(err) - - clientState = suite.chainA.GetClientState(clientA) - expConsensusHeight1 := clientState.GetLatestHeight() - suite.Require().True(expConsensusHeight1.GT(expConsensusHeight0)) - consensusState1, ok := suite.chainA.GetConsensusState(clientA, expConsensusHeight1) - suite.Require().True(ok) - - expConsensus := []exported.ConsensusState{ - consensusState0, - consensusState1, - } - - // create second client on chainA - clientA2, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) - clientState = suite.chainA.GetClientState(clientA2) - - expConsensusHeight2 := clientState.GetLatestHeight() - consensusState2, ok := suite.chainA.GetConsensusState(clientA2, expConsensusHeight2) - suite.Require().True(ok) - - expConsensus2 := []exported.ConsensusState{consensusState2} - - expConsensusStates := types.ClientsConsensusStates{ - types.NewClientConsensusStates(clientA, []types.ConsensusStateWithHeight{ - types.NewConsensusStateWithHeight(expConsensusHeight0.(types.Height), expConsensus[0]), - types.NewConsensusStateWithHeight(expConsensusHeight1.(types.Height), expConsensus[1]), - }), - types.NewClientConsensusStates(clientA2, []types.ConsensusStateWithHeight{ - types.NewConsensusStateWithHeight(expConsensusHeight2.(types.Height), expConsensus2[0]), - }), - }.Sort() - - consStates := suite.chainA.App.IBCKeeper.ClientKeeper.GetAllConsensusStates(suite.chainA.GetContext()) - suite.Require().Equal(expConsensusStates, consStates, "%s \n\n%s", expConsensusStates, consStates) -} diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go deleted file mode 100644 index edf77a7f2456..000000000000 --- a/x/ibc/testing/chain.go +++ /dev/null @@ -1,910 +0,0 @@ -package ibctesting - -import ( - "bytes" - "fmt" - "strconv" - "testing" - "time" - - "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto/tmhash" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmprotoversion "github.com/tendermint/tendermint/proto/tendermint/version" - tmtypes "github.com/tendermint/tendermint/types" - tmversion "github.com/tendermint/tendermint/version" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - ibctransfertypes "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" - clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" - connectiontypes "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types" - channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" - commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" - "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" - "github.com/cosmos/cosmos-sdk/x/ibc/core/types" - ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" - "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" - "github.com/cosmos/cosmos-sdk/x/staking/teststaking" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -const ( - // Default params constants used to create a TM client - TrustingPeriod time.Duration = time.Hour * 24 * 7 * 2 - UnbondingPeriod time.Duration = time.Hour * 24 * 7 * 3 - MaxClockDrift time.Duration = time.Second * 10 - DefaultDelayPeriod uint64 = 0 - - DefaultChannelVersion = ibctransfertypes.Version - InvalidID = "IDisInvalid" - - ConnectionIDPrefix = "conn" - ChannelIDPrefix = "chan" - - TransferPort = ibctransfertypes.ModuleName - MockPort = mock.ModuleName - - // used for testing UpdateClientProposal - Title = "title" - Description = "description" -) - -var ( - DefaultOpenInitVersion *connectiontypes.Version - - // Default params variables used to create a TM client - DefaultTrustLevel ibctmtypes.Fraction = ibctmtypes.DefaultTrustLevel - TestHash = tmhash.Sum([]byte("TESTING HASH")) - TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) - - UpgradePath = []string{"upgrade", "upgradedIBCState"} - - ConnectionVersion = connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())[0] - - MockAcknowledgement = mock.MockAcknowledgement - MockCommitment = mock.MockCommitment -) - -// TestChain is a testing struct that wraps a simapp with the last TM Header, the current ABCI -// header and the validators of the TestChain. It also contains a field called ChainID. This -// is the clientID that *other* chains use to refer to this TestChain. The SenderAccount -// is used for delivering transactions through the application state. -// NOTE: the actual application uses an empty chain-id for ease of testing. -type TestChain struct { - t *testing.T - - App *simapp.SimApp - ChainID string - LastHeader *ibctmtypes.Header // header for last block height committed - CurrentHeader tmproto.Header // header for current block height - QueryServer types.QueryServer - TxConfig client.TxConfig - Codec codec.BinaryMarshaler - - Vals *tmtypes.ValidatorSet - Signers []tmtypes.PrivValidator - - senderPrivKey cryptotypes.PrivKey - SenderAccount authtypes.AccountI - - // IBC specific helpers - ClientIDs []string // ClientID's used on this chain - Connections []*TestConnection // track connectionID's created for this chain -} - -// NewTestChain initializes a new TestChain instance with a single validator set using a -// generated private key. It also creates a sender account to be used for delivering transactions. -// -// The first block height is committed to state in order to allow for client creations on -// counterparty chains. The TestChain will return with a block height starting at 2. -// -// Time management is handled by the Coordinator in order to ensure synchrony between chains. -// Each update of any chain increments the block header time for all chains by 5 seconds. -func NewTestChain(t *testing.T, chainID string) *TestChain { - // generate validator private/public key - privVal := mock.NewPV() - pubKey, err := privVal.GetPubKey() - require.NoError(t, err) - - // create validator set with single validator - validator := tmtypes.NewValidator(pubKey, 1) - valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) - signers := []tmtypes.PrivValidator{privVal} - - // generate genesis account - senderPrivKey := secp256k1.GenPrivKey() - acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) - balance := banktypes.Balance{ - Address: acc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), - } - - app := simapp.SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance) - - // create current header and call begin block - header := tmproto.Header{ - ChainID: chainID, - Height: 1, - Time: globalStartTime, - } - - txConfig := simapp.MakeTestEncodingConfig().TxConfig - - // create an account to send transactions from - chain := &TestChain{ - t: t, - ChainID: chainID, - App: app, - CurrentHeader: header, - QueryServer: app.IBCKeeper, - TxConfig: txConfig, - Codec: app.AppCodec(), - Vals: valSet, - Signers: signers, - senderPrivKey: senderPrivKey, - SenderAccount: acc, - ClientIDs: make([]string, 0), - Connections: make([]*TestConnection, 0), - } - - cap := chain.App.IBCKeeper.PortKeeper.BindPort(chain.GetContext(), MockPort) - err = chain.App.ScopedIBCMockKeeper.ClaimCapability(chain.GetContext(), cap, host.PortPath(MockPort)) - require.NoError(t, err) - - chain.NextBlock() - - return chain -} - -// GetContext returns the current context for the application. -func (chain *TestChain) GetContext() sdk.Context { - return chain.App.BaseApp.NewContext(false, chain.CurrentHeader) -} - -// QueryProof performs an abci query with the given key and returns the proto encoded merkle proof -// for the query and the height at which the proof will succeed on a tendermint verifier. -func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { - res := chain.App.Query(abci.RequestQuery{ - Path: fmt.Sprintf("store/%s/key", host.StoreKey), - Height: chain.App.LastBlockHeight() - 1, - Data: key, - Prove: true, - }) - - merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) - require.NoError(chain.t, err) - - proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof) - require.NoError(chain.t, err) - - revision := 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(revision, uint64(res.Height)+1) -} - -// QueryUpgradeProof performs an abci query with the given key and returns the proto encoded merkle proof -// for the query and the height at which the proof will succeed on a tendermint verifier. -func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, clienttypes.Height) { - res := chain.App.Query(abci.RequestQuery{ - Path: "store/upgrade/key", - Height: int64(height - 1), - Data: key, - Prove: true, - }) - - merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) - require.NoError(chain.t, err) - - proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof) - require.NoError(chain.t, err) - - revision := 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(revision, uint64(res.Height+1)) -} - -// QueryClientStateProof performs and abci query for a client state -// stored with a given clientID and returns the ClientState along with the proof -func (chain *TestChain) QueryClientStateProof(clientID string) (exported.ClientState, []byte) { - // retrieve client state to provide proof for - clientState, found := chain.App.IBCKeeper.ClientKeeper.GetClientState(chain.GetContext(), clientID) - require.True(chain.t, found) - - clientKey := host.FullClientStateKey(clientID) - proofClient, _ := chain.QueryProof(clientKey) - - return clientState, proofClient -} - -// QueryConsensusStateProof performs an abci query for a consensus state -// stored on the given clientID. The proof and consensusHeight are returned. -func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) { - clientState := chain.GetClientState(clientID) - - consensusHeight := clientState.GetLatestHeight().(clienttypes.Height) - consensusKey := host.FullConsensusStateKey(clientID, consensusHeight) - proofConsensus, _ := chain.QueryProof(consensusKey) - - return proofConsensus, consensusHeight -} - -// NextBlock sets the last header to the current header and increments the current header to be -// at the next block height. It does not update the time as that is handled by the Coordinator. -// -// CONTRACT: this function must only be called after app.Commit() occurs -func (chain *TestChain) NextBlock() { - // set the last header to the current header - // use nil trusted fields - chain.LastHeader = chain.CurrentTMClientHeader() - - // increment the current header - chain.CurrentHeader = tmproto.Header{ - ChainID: chain.ChainID, - Height: chain.App.LastBlockHeight() + 1, - AppHash: chain.App.LastCommitID().Hash, - // NOTE: the time is increased by the coordinator to maintain time synchrony amongst - // chains. - Time: chain.CurrentHeader.Time, - ValidatorsHash: chain.Vals.Hash(), - NextValidatorsHash: chain.Vals.Hash(), - } - - chain.App.BeginBlock(abci.RequestBeginBlock{Header: chain.CurrentHeader}) - -} - -// sendMsgs delivers a transaction through the application without returning the result. -func (chain *TestChain) sendMsgs(msgs ...sdk.Msg) error { - _, err := chain.SendMsgs(msgs...) - return err -} - -// SendMsgs delivers a transaction through the application. It updates the senders sequence -// number and updates the TestChain's headers. It returns the result and error if one -// occurred. -func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { - _, r, err := simapp.SignCheckDeliver( - chain.t, - chain.TxConfig, - chain.App.BaseApp, - chain.GetContext().BlockHeader(), - msgs, - chain.ChainID, - []uint64{chain.SenderAccount.GetAccountNumber()}, - []uint64{chain.SenderAccount.GetSequence()}, - true, true, chain.senderPrivKey, - ) - if err != nil { - return nil, err - } - - // SignCheckDeliver calls app.Commit() - chain.NextBlock() - - // increment sequence for successful transaction execution - chain.SenderAccount.SetSequence(chain.SenderAccount.GetSequence() + 1) - - return r, nil -} - -// GetClientState retrieves the client state for the provided clientID. The client is -// expected to exist otherwise testing will fail. -func (chain *TestChain) GetClientState(clientID string) exported.ClientState { - clientState, found := chain.App.IBCKeeper.ClientKeeper.GetClientState(chain.GetContext(), clientID) - require.True(chain.t, found) - - return clientState -} - -// GetConsensusState retrieves the consensus state for the provided clientID and height. -// It will return a success boolean depending on if consensus state exists or not. -func (chain *TestChain) GetConsensusState(clientID string, height exported.Height) (exported.ConsensusState, bool) { - return chain.App.IBCKeeper.ClientKeeper.GetClientConsensusState(chain.GetContext(), clientID, height) -} - -// GetValsAtHeight will return the validator set of the chain at a given height. It will return -// a success boolean depending on if the validator set exists or not at that height. -func (chain *TestChain) GetValsAtHeight(height int64) (*tmtypes.ValidatorSet, bool) { - histInfo, ok := chain.App.StakingKeeper.GetHistoricalInfo(chain.GetContext(), height) - if !ok { - return nil, false - } - - valSet := stakingtypes.Validators(histInfo.Valset) - - tmValidators, err := teststaking.ToTmValidators(valSet, sdk.DefaultPowerReduction) - if err != nil { - panic(err) - } - return tmtypes.NewValidatorSet(tmValidators), true -} - -// GetConnection retrieves an IBC Connection for the provided TestConnection. The -// connection is expected to exist otherwise testing will fail. -func (chain *TestChain) GetConnection(testConnection *TestConnection) connectiontypes.ConnectionEnd { - connection, found := chain.App.IBCKeeper.ConnectionKeeper.GetConnection(chain.GetContext(), testConnection.ID) - require.True(chain.t, found) - - return connection -} - -// GetChannel retrieves an IBC Channel for the provided TestChannel. The channel -// is expected to exist otherwise testing will fail. -func (chain *TestChain) GetChannel(testChannel TestChannel) channeltypes.Channel { - channel, found := chain.App.IBCKeeper.ChannelKeeper.GetChannel(chain.GetContext(), testChannel.PortID, testChannel.ID) - require.True(chain.t, found) - - return channel -} - -// GetAcknowledgement retrieves an acknowledgement for the provided packet. If the -// acknowledgement does not exist then testing will fail. -func (chain *TestChain) GetAcknowledgement(packet exported.PacketI) []byte { - ack, found := chain.App.IBCKeeper.ChannelKeeper.GetPacketAcknowledgement(chain.GetContext(), packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) - require.True(chain.t, found) - - return ack -} - -// GetPrefix returns the prefix for used by a chain in connection creation -func (chain *TestChain) GetPrefix() commitmenttypes.MerklePrefix { - return commitmenttypes.NewMerklePrefix(chain.App.IBCKeeper.ConnectionKeeper.GetCommitmentPrefix().Bytes()) -} - -// NewClientID appends a new clientID string in the format: -// ClientFor -func (chain *TestChain) NewClientID(clientType string) string { - clientID := fmt.Sprintf("%s-%s", clientType, strconv.Itoa(len(chain.ClientIDs))) - chain.ClientIDs = append(chain.ClientIDs, clientID) - return clientID -} - -// AddTestConnection appends a new TestConnection which contains references -// to the connection id, client id and counterparty client id. -func (chain *TestChain) AddTestConnection(clientID, counterpartyClientID string) *TestConnection { - conn := chain.ConstructNextTestConnection(clientID, counterpartyClientID) - - chain.Connections = append(chain.Connections, conn) - return conn -} - -// ConstructNextTestConnection constructs the next test connection to be -// created given a clientID and counterparty clientID. The connection id -// format: -conn -func (chain *TestChain) ConstructNextTestConnection(clientID, counterpartyClientID string) *TestConnection { - connectionID := connectiontypes.FormatConnectionIdentifier(uint64(len(chain.Connections))) - return &TestConnection{ - ID: connectionID, - ClientID: clientID, - NextChannelVersion: DefaultChannelVersion, - CounterpartyClientID: counterpartyClientID, - } -} - -// GetFirstTestConnection returns the first test connection for a given clientID. -// The connection may or may not exist in the chain state. -func (chain *TestChain) GetFirstTestConnection(clientID, counterpartyClientID string) *TestConnection { - if len(chain.Connections) > 0 { - return chain.Connections[0] - } - - return chain.ConstructNextTestConnection(clientID, counterpartyClientID) -} - -// AddTestChannel appends a new TestChannel which contains references to the port and channel ID -// used for channel creation and interaction. See 'NextTestChannel' for channel ID naming format. -func (chain *TestChain) AddTestChannel(conn *TestConnection, portID string) TestChannel { - channel := chain.NextTestChannel(conn, portID) - conn.Channels = append(conn.Channels, channel) - return channel -} - -// NextTestChannel returns the next test channel to be created on this connection, but does not -// add it to the list of created channels. This function is expected to be used when the caller -// has not created the associated channel in app state, but would still like to refer to the -// non-existent channel usually to test for its non-existence. -// -// channel ID format: -chan -// -// The port is passed in by the caller. -func (chain *TestChain) NextTestChannel(conn *TestConnection, portID string) TestChannel { - nextChanSeq := chain.App.IBCKeeper.ChannelKeeper.GetNextChannelSequence(chain.GetContext()) - channelID := channeltypes.FormatChannelIdentifier(nextChanSeq) - return TestChannel{ - PortID: portID, - ID: channelID, - ClientID: conn.ClientID, - CounterpartyClientID: conn.CounterpartyClientID, - Version: conn.NextChannelVersion, - } -} - -// ConstructMsgCreateClient constructs a message to create a new client state (tendermint or solomachine). -// NOTE: a solo machine client will be created with an empty diversifier. -func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, clientID string, clientType string) *clienttypes.MsgCreateClient { - var ( - clientState exported.ClientState - consensusState exported.ConsensusState - ) - - switch clientType { - case exported.Tendermint: - height := counterparty.LastHeader.GetHeight().(clienttypes.Height) - clientState = ibctmtypes.NewClientState( - counterparty.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, - height, commitmenttypes.GetSDKSpecs(), UpgradePath, false, false, - ) - consensusState = counterparty.LastHeader.ConsensusState() - case exported.Solomachine: - solo := NewSolomachine(chain.t, chain.Codec, clientID, "", 1) - clientState = solo.ClientState() - consensusState = solo.ConsensusState() - default: - chain.t.Fatalf("unsupported client state type %s", clientType) - } - - msg, err := clienttypes.NewMsgCreateClient( - clientState, consensusState, chain.SenderAccount.GetAddress(), - ) - require.NoError(chain.t, err) - return msg -} - -// CreateTMClient will construct and execute a 07-tendermint MsgCreateClient. A counterparty -// client will be created on the (target) chain. -func (chain *TestChain) CreateTMClient(counterparty *TestChain, clientID string) error { - // construct MsgCreateClient using counterparty - msg := chain.ConstructMsgCreateClient(counterparty, clientID, exported.Tendermint) - return chain.sendMsgs(msg) -} - -// UpdateTMClient will construct and execute a 07-tendermint MsgUpdateClient. The counterparty -// client will be updated on the (target) chain. UpdateTMClient mocks the relayer flow -// necessary for updating a Tendermint client. -func (chain *TestChain) UpdateTMClient(counterparty *TestChain, clientID string) error { - header, err := chain.ConstructUpdateTMClientHeader(counterparty, clientID) - require.NoError(chain.t, err) - - msg, err := clienttypes.NewMsgUpdateClient( - clientID, header, - chain.SenderAccount.GetAddress(), - ) - require.NoError(chain.t, err) - - return chain.sendMsgs(msg) -} - -// ConstructUpdateTMClientHeader will construct a valid 07-tendermint Header to update the -// light client on the source chain. -func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, clientID string) (*ibctmtypes.Header, error) { - header := counterparty.LastHeader - // Relayer must query for LatestHeight on client to get TrustedHeight - trustedHeight := chain.GetClientState(clientID).GetLatestHeight().(clienttypes.Height) - var ( - tmTrustedVals *tmtypes.ValidatorSet - ok bool - ) - // Once we get TrustedHeight from client, we must query the validators from the counterparty chain - // If the LatestHeight == LastHeader.Height, then TrustedValidators are current validators - // If LatestHeight < LastHeader.Height, we can query the historical validator set from HistoricalInfo - if trustedHeight == counterparty.LastHeader.GetHeight() { - tmTrustedVals = counterparty.Vals - } else { - // NOTE: We need to get validators from counterparty at height: trustedHeight+1 - // 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.RevisionHeight + 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 revision number is 0 - header.TrustedHeight = trustedHeight - - trustedVals, err := tmTrustedVals.ToProto() - if err != nil { - return nil, err - } - header.TrustedValidators = trustedVals - - return header, nil - -} - -// ExpireClient fast forwards the chain's block time by the provided amount of time which will -// expire any clients with a trusting period less than or equal to this amount of time. -func (chain *TestChain) ExpireClient(amount time.Duration) { - chain.CurrentHeader.Time = chain.CurrentHeader.Time.Add(amount) -} - -// CurrentTMClientHeader creates a TM header using the current header parameters -// on the chain. The trusted fields in the header are set to nil. -func (chain *TestChain) CurrentTMClientHeader() *ibctmtypes.Header { - return chain.CreateTMClientHeader(chain.ChainID, chain.CurrentHeader.Height, clienttypes.Height{}, chain.CurrentHeader.Time, chain.Vals, nil, chain.Signers) -} - -// CreateTMClientHeader creates a TM header to update the TM client. Args are passed in to allow -// caller flexibility to use params that differ from the chain. -func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, timestamp time.Time, tmValSet, tmTrustedVals *tmtypes.ValidatorSet, signers []tmtypes.PrivValidator) *ibctmtypes.Header { - var ( - valSet *tmproto.ValidatorSet - trustedVals *tmproto.ValidatorSet - ) - require.NotNil(chain.t, tmValSet) - - vsetHash := tmValSet.Hash() - - tmHeader := tmtypes.Header{ - Version: tmprotoversion.Consensus{Block: tmversion.BlockProtocol, App: 2}, - ChainID: chainID, - Height: blockHeight, - Time: timestamp, - LastBlockID: MakeBlockID(make([]byte, tmhash.Size), 10_000, make([]byte, tmhash.Size)), - LastCommitHash: chain.App.LastCommitID().Hash, - DataHash: tmhash.Sum([]byte("data_hash")), - ValidatorsHash: vsetHash, - NextValidatorsHash: vsetHash, - ConsensusHash: tmhash.Sum([]byte("consensus_hash")), - AppHash: chain.CurrentHeader.AppHash, - LastResultsHash: tmhash.Sum([]byte("last_results_hash")), - EvidenceHash: tmhash.Sum([]byte("evidence_hash")), - ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck - } - hhash := tmHeader.Hash() - blockID := MakeBlockID(hhash, 3, tmhash.Sum([]byte("part_set"))) - voteSet := tmtypes.NewVoteSet(chainID, blockHeight, 1, tmproto.PrecommitType, tmValSet) - - commit, err := tmtypes.MakeCommit(blockID, blockHeight, 1, voteSet, signers, timestamp) - require.NoError(chain.t, err) - - signedHeader := &tmproto.SignedHeader{ - Header: tmHeader.ToProto(), - Commit: commit.ToProto(), - } - - if tmValSet != nil { - valSet, err = tmValSet.ToProto() - if err != nil { - panic(err) - } - } - - if tmTrustedVals != nil { - trustedVals, err = tmTrustedVals.ToProto() - if err != nil { - panic(err) - } - } - - // The trusted fields may be nil. They may be filled before relaying messages to a client. - // The relayer is responsible for querying client and injecting appropriate trusted fields. - return &ibctmtypes.Header{ - SignedHeader: signedHeader, - ValidatorSet: valSet, - TrustedHeight: trustedHeight, - TrustedValidators: trustedVals, - } -} - -// MakeBlockID copied unimported test functions from tmtypes to use them here -func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) tmtypes.BlockID { - return tmtypes.BlockID{ - Hash: hash, - PartSetHeader: tmtypes.PartSetHeader{ - Total: partSetSize, - Hash: partSetHash, - }, - } -} - -// CreateSortedSignerArray takes two PrivValidators, and the corresponding Validator structs -// (including voting power). It returns a signer array of PrivValidators that matches the -// sorting of ValidatorSet. -// The sorting is first by .VotingPower (descending), with secondary index of .Address (ascending). -func CreateSortedSignerArray(altPrivVal, suitePrivVal tmtypes.PrivValidator, - altVal, suiteVal *tmtypes.Validator) []tmtypes.PrivValidator { - - switch { - case altVal.VotingPower > suiteVal.VotingPower: - return []tmtypes.PrivValidator{altPrivVal, suitePrivVal} - case altVal.VotingPower < suiteVal.VotingPower: - return []tmtypes.PrivValidator{suitePrivVal, altPrivVal} - default: - if bytes.Compare(altVal.Address, suiteVal.Address) == -1 { - return []tmtypes.PrivValidator{altPrivVal, suitePrivVal} - } - return []tmtypes.PrivValidator{suitePrivVal, altPrivVal} - } -} - -// ConnectionOpenInit will construct and execute a MsgConnectionOpenInit. -func (chain *TestChain) ConnectionOpenInit( - counterparty *TestChain, - connection, counterpartyConnection *TestConnection, -) error { - msg := connectiontypes.NewMsgConnectionOpenInit( - connection.ClientID, - connection.CounterpartyClientID, - counterparty.GetPrefix(), DefaultOpenInitVersion, DefaultDelayPeriod, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// ConnectionOpenTry will construct and execute a MsgConnectionOpenTry. -func (chain *TestChain) ConnectionOpenTry( - counterparty *TestChain, - connection, counterpartyConnection *TestConnection, -) error { - counterpartyClient, proofClient := counterparty.QueryClientStateProof(counterpartyConnection.ClientID) - - connectionKey := host.ConnectionKey(counterpartyConnection.ID) - proofInit, proofHeight := counterparty.QueryProof(connectionKey) - - proofConsensus, consensusHeight := counterparty.QueryConsensusStateProof(counterpartyConnection.ClientID) - - msg := connectiontypes.NewMsgConnectionOpenTry( - "", connection.ClientID, // does not support handshake continuation - counterpartyConnection.ID, counterpartyConnection.ClientID, - counterpartyClient, counterparty.GetPrefix(), []*connectiontypes.Version{ConnectionVersion}, DefaultDelayPeriod, - proofInit, proofClient, proofConsensus, - proofHeight, consensusHeight, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// ConnectionOpenAck will construct and execute a MsgConnectionOpenAck. -func (chain *TestChain) ConnectionOpenAck( - counterparty *TestChain, - connection, counterpartyConnection *TestConnection, -) error { - counterpartyClient, proofClient := counterparty.QueryClientStateProof(counterpartyConnection.ClientID) - - connectionKey := host.ConnectionKey(counterpartyConnection.ID) - proofTry, proofHeight := counterparty.QueryProof(connectionKey) - - proofConsensus, consensusHeight := counterparty.QueryConsensusStateProof(counterpartyConnection.ClientID) - - msg := connectiontypes.NewMsgConnectionOpenAck( - connection.ID, counterpartyConnection.ID, counterpartyClient, // testing doesn't use flexible selection - proofTry, proofClient, proofConsensus, - proofHeight, consensusHeight, - ConnectionVersion, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// ConnectionOpenConfirm will construct and execute a MsgConnectionOpenConfirm. -func (chain *TestChain) ConnectionOpenConfirm( - counterparty *TestChain, - connection, counterpartyConnection *TestConnection, -) error { - connectionKey := host.ConnectionKey(counterpartyConnection.ID) - proof, height := counterparty.QueryProof(connectionKey) - - msg := connectiontypes.NewMsgConnectionOpenConfirm( - connection.ID, - proof, height, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// CreatePortCapability binds and claims a capability for the given portID if it does not -// already exist. This function will fail testing on any resulting error. -// NOTE: only creation of a capbility for a transfer or mock port is supported -// Other applications must bind to the port in InitGenesis or modify this code. -func (chain *TestChain) CreatePortCapability(portID string) { - // check if the portId is already binded, if not bind it - _, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.PortPath(portID)) - if !ok { - // create capability using the IBC capability keeper - cap, err := chain.App.ScopedIBCKeeper.NewCapability(chain.GetContext(), host.PortPath(portID)) - require.NoError(chain.t, err) - - switch portID { - case MockPort: - // claim capability using the mock capability keeper - err = chain.App.ScopedIBCMockKeeper.ClaimCapability(chain.GetContext(), cap, host.PortPath(portID)) - require.NoError(chain.t, err) - case TransferPort: - // claim capability using the transfer capability keeper - err = chain.App.ScopedTransferKeeper.ClaimCapability(chain.GetContext(), cap, host.PortPath(portID)) - require.NoError(chain.t, err) - default: - panic(fmt.Sprintf("unsupported ibc testing package port ID %s", portID)) - } - } - - chain.App.Commit() - - chain.NextBlock() -} - -// GetPortCapability returns the port capability for the given portID. The capability must -// exist, otherwise testing will fail. -func (chain *TestChain) GetPortCapability(portID string) *capabilitytypes.Capability { - cap, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.PortPath(portID)) - require.True(chain.t, ok) - - return cap -} - -// CreateChannelCapability binds and claims a capability for the given portID and channelID -// if it does not already exist. This function will fail testing on any resulting error. -func (chain *TestChain) CreateChannelCapability(portID, channelID string) { - capName := host.ChannelCapabilityPath(portID, channelID) - // check if the portId is already binded, if not bind it - _, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), capName) - if !ok { - cap, err := chain.App.ScopedIBCKeeper.NewCapability(chain.GetContext(), capName) - require.NoError(chain.t, err) - err = chain.App.ScopedTransferKeeper.ClaimCapability(chain.GetContext(), cap, capName) - require.NoError(chain.t, err) - } - - chain.App.Commit() - - chain.NextBlock() -} - -// GetChannelCapability returns the channel capability for the given portID and channelID. -// The capability must exist, otherwise testing will fail. -func (chain *TestChain) GetChannelCapability(portID, channelID string) *capabilitytypes.Capability { - cap, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.ChannelCapabilityPath(portID, channelID)) - require.True(chain.t, ok) - - return cap -} - -// ChanOpenInit will construct and execute a MsgChannelOpenInit. -func (chain *TestChain) ChanOpenInit( - ch, counterparty TestChannel, - order channeltypes.Order, - connectionID string, -) error { - msg := channeltypes.NewMsgChannelOpenInit( - ch.PortID, - ch.Version, order, []string{connectionID}, - counterparty.PortID, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// ChanOpenTry will construct and execute a MsgChannelOpenTry. -func (chain *TestChain) ChanOpenTry( - counterparty *TestChain, - ch, counterpartyCh TestChannel, - order channeltypes.Order, - connectionID string, -) error { - proof, height := counterparty.QueryProof(host.ChannelKey(counterpartyCh.PortID, counterpartyCh.ID)) - - msg := channeltypes.NewMsgChannelOpenTry( - ch.PortID, "", // does not support handshake continuation - ch.Version, order, []string{connectionID}, - counterpartyCh.PortID, counterpartyCh.ID, counterpartyCh.Version, - proof, height, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// ChanOpenAck will construct and execute a MsgChannelOpenAck. -func (chain *TestChain) ChanOpenAck( - counterparty *TestChain, - ch, counterpartyCh TestChannel, -) error { - proof, height := counterparty.QueryProof(host.ChannelKey(counterpartyCh.PortID, counterpartyCh.ID)) - - msg := channeltypes.NewMsgChannelOpenAck( - ch.PortID, ch.ID, - counterpartyCh.ID, counterpartyCh.Version, // testing doesn't use flexible selection - proof, height, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// ChanOpenConfirm will construct and execute a MsgChannelOpenConfirm. -func (chain *TestChain) ChanOpenConfirm( - counterparty *TestChain, - ch, counterpartyCh TestChannel, -) error { - proof, height := counterparty.QueryProof(host.ChannelKey(counterpartyCh.PortID, counterpartyCh.ID)) - - msg := channeltypes.NewMsgChannelOpenConfirm( - ch.PortID, ch.ID, - proof, height, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// ChanCloseInit will construct and execute a MsgChannelCloseInit. -// -// NOTE: does not work with ibc-transfer module -func (chain *TestChain) ChanCloseInit( - counterparty *TestChain, - channel TestChannel, -) error { - msg := channeltypes.NewMsgChannelCloseInit( - channel.PortID, channel.ID, - chain.SenderAccount.GetAddress(), - ) - return chain.sendMsgs(msg) -} - -// GetPacketData returns a ibc-transfer marshalled packet to be used for -// callback testing. -func (chain *TestChain) GetPacketData(counterparty *TestChain) []byte { - packet := ibctransfertypes.FungibleTokenPacketData{ - Denom: TestCoin.Denom, - Amount: TestCoin.Amount.Uint64(), - Sender: chain.SenderAccount.GetAddress().String(), - Receiver: counterparty.SenderAccount.GetAddress().String(), - } - - return packet.GetBytes() -} - -// SendPacket simulates sending a packet through the channel keeper. No message needs to be -// passed since this call is made from a module. -func (chain *TestChain) SendPacket( - packet exported.PacketI, -) error { - channelCap := chain.GetChannelCapability(packet.GetSourcePort(), packet.GetSourceChannel()) - - // no need to send message, acting as a module - err := chain.App.IBCKeeper.ChannelKeeper.SendPacket(chain.GetContext(), channelCap, packet) - if err != nil { - return err - } - - // commit changes - chain.App.Commit() - chain.NextBlock() - - return nil -} - -// WriteAcknowledgement simulates writing an acknowledgement to the chain. -func (chain *TestChain) WriteAcknowledgement( - packet exported.PacketI, -) error { - channelCap := chain.GetChannelCapability(packet.GetDestPort(), packet.GetDestChannel()) - - // no need to send message, acting as a handler - err := chain.App.IBCKeeper.ChannelKeeper.WriteAcknowledgement(chain.GetContext(), channelCap, packet, TestHash) - if err != nil { - return err - } - - // commit changes - chain.App.Commit() - chain.NextBlock() - - return nil -} diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 0d48777dc248..46635cacb944 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -345,11 +345,7 @@ func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { app.StakingKeeper.SetDelegation(ctx, delegation) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) -<<<<<<< HEAD - _, err = app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], app.StakingKeeper.TokensFromConsensusPower(ctx, 6).ToDec()) -======= - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], sdk.TokensFromConsensusPower(6).ToDec()) ->>>>>>> upstream/master + _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], app.StakingKeeper.TokensFromConsensusPower(ctx, 6).ToDec()) require.NoError(t, err) // end block diff --git a/x/staking/legacy/v040/commission.go b/x/staking/legacy/v040/commission.go deleted file mode 100644 index c7d4044a213d..000000000000 --- a/x/staking/legacy/v040/commission.go +++ /dev/null @@ -1,17 +0,0 @@ -package v040 - -import ( - yaml "gopkg.in/yaml.v2" -) - -// String implements the Stringer interface for a Commission object. -func (c Commission) String() string { - out, _ := yaml.Marshal(c) - return string(out) -} - -// String implements the Stringer interface for a CommissionRates object. -func (cr CommissionRates) String() string { - out, _ := yaml.Marshal(cr) - return string(out) -} diff --git a/x/staking/legacy/v040/delegation.go b/x/staking/legacy/v040/delegation.go deleted file mode 100644 index 8c3f99874cee..000000000000 --- a/x/staking/legacy/v040/delegation.go +++ /dev/null @@ -1,100 +0,0 @@ -package v040 - -import ( - "fmt" - "strings" - - yaml "gopkg.in/yaml.v2" -) - -// String returns a human readable string representation of a Delegation. -func (d Delegation) String() string { - out, _ := yaml.Marshal(d) - return string(out) -} - -// Delegations is a collection of delegations -type Delegations []Delegation - -func (d Delegations) String() (out string) { - for _, del := range d { - out += del.String() + "\n" - } - - return strings.TrimSpace(out) -} - -// String implements the stringer interface for a UnbondingDelegationEntry. -func (e UnbondingDelegationEntry) String() string { - out, _ := yaml.Marshal(e) - return string(out) -} - -// String returns a human readable string representation of an UnbondingDelegation. -func (ubd UnbondingDelegation) String() string { - out := fmt.Sprintf(`Unbonding Delegations between: - Delegator: %s - Validator: %s - Entries:`, ubd.DelegatorAddress, ubd.ValidatorAddress) - for i, entry := range ubd.Entries { - out += fmt.Sprintf(` Unbonding Delegation %d: - Creation Height: %v - Min time to unbond (unix): %v - Expected balance: %s`, i, entry.CreationHeight, - entry.CompletionTime, entry.Balance) - } - - return out -} - -// UnbondingDelegations is a collection of UnbondingDelegation -type UnbondingDelegations []UnbondingDelegation - -func (ubds UnbondingDelegations) String() (out string) { - for _, u := range ubds { - out += u.String() + "\n" - } - - return strings.TrimSpace(out) -} - -// String implements the Stringer interface for a RedelegationEntry object. -func (e RedelegationEntry) String() string { - out, _ := yaml.Marshal(e) - return string(out) -} - -// String returns a human readable string representation of a Redelegation. -func (red Redelegation) String() string { - out := fmt.Sprintf(`Redelegations between: - Delegator: %s - Source Validator: %s - Destination Validator: %s - Entries: -`, - red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress, - ) - - for i, entry := range red.Entries { - out += fmt.Sprintf(` Redelegation Entry #%d: - Creation height: %v - Min time to unbond (unix): %v - Dest Shares: %s -`, - i, entry.CreationHeight, entry.CompletionTime, entry.SharesDst, - ) - } - - return strings.TrimRight(out, "\n") -} - -// Redelegations are a collection of Redelegation -type Redelegations []Redelegation - -func (d Redelegations) String() (out string) { - for _, red := range d { - out += red.String() + "\n" - } - - return strings.TrimSpace(out) -} diff --git a/x/staking/legacy/v040/genesis.pb.go b/x/staking/legacy/v040/genesis.pb.go deleted file mode 100644 index 2e21644f1747..000000000000 --- a/x/staking/legacy/v040/genesis.pb.go +++ /dev/null @@ -1,774 +0,0 @@ -package v040 - -import ( - fmt "fmt" - io "io" - math_bits "math/bits" - - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - proto "github.com/gogo/protobuf/proto" -) - -// GenesisState defines the staking module's genesis state. -type GenesisState struct { - // params defines all the parameters of related to deposit. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - // last_total_power tracks the total amounts of bonded tokens recorded during - // the previous end block. - LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_total_power" yaml:"last_total_power"` - // last_validator_powers is a special index that provides a historical list - // of the last-block's bonded validators. - LastValidatorPowers []LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers" yaml:"last_validator_powers"` - // delegations defines the validator set at genesis. - Validators []Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"` - // delegations defines the delegations active at genesis. - Delegations []Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations"` - // unbonding_delegations defines the unbonding delegations active at genesis. - UnbondingDelegations []UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations" yaml:"unbonding_delegations"` - // redelegations defines the redelegations active at genesis. - Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"` - Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} - -// LastValidatorPower required for validator set update logic. -type LastValidatorPower struct { - // address is the address of the validator. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // power defines the power of the validator. - Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` -} - -func (m *LastValidatorPower) Reset() { *m = LastValidatorPower{} } -func (m *LastValidatorPower) String() string { return proto.CompactTextString(m) } -func (*LastValidatorPower) ProtoMessage() {} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Exported { - i-- - if m.Exported { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.Redelegations) > 0 { - for iNdEx := len(m.Redelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Redelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.UnbondingDelegations) > 0 { - for iNdEx := len(m.UnbondingDelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnbondingDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Delegations) > 0 { - for iNdEx := len(m.Delegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Delegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.LastValidatorPowers) > 0 { - for iNdEx := len(m.LastValidatorPowers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LastValidatorPowers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - { - size := m.LastTotalPower.Size() - i -= size - if _, err := m.LastTotalPower.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LastValidatorPower) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LastValidatorPower) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LastValidatorPower) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Power != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Power)) - i-- - dAtA[i] = 0x10 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.LastTotalPower.Size() - n += 1 + l + sovGenesis(uint64(l)) - if len(m.LastValidatorPowers) > 0 { - for _, e := range m.LastValidatorPowers { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Delegations) > 0 { - for _, e := range m.Delegations { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.UnbondingDelegations) > 0 { - for _, e := range m.UnbondingDelegations { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Redelegations) > 0 { - for _, e := range m.Redelegations { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.Exported { - n += 2 - } - return n -} - -func (m *LastValidatorPower) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Power != 0 { - n += 1 + sovGenesis(uint64(m.Power)) - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTotalPower", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTotalPower.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastValidatorPowers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastValidatorPowers = append(m.LastValidatorPowers, LastValidatorPower{}) - if err := m.LastValidatorPowers[len(m.LastValidatorPowers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Delegations = append(m.Delegations, Delegation{}) - if err := m.Delegations[len(m.Delegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnbondingDelegations = append(m.UnbondingDelegations, UnbondingDelegation{}) - if err := m.UnbondingDelegations[len(m.UnbondingDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Redelegations = append(m.Redelegations, Redelegation{}) - if err := m.Redelegations[len(m.Redelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exported", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exported = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LastValidatorPower: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LastValidatorPower: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - m.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Power |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/staking/legacy/v040/keys.go b/x/staking/legacy/v040/keys.go index 6ad280e277e5..c01c41a417e3 100644 --- a/x/staking/legacy/v040/keys.go +++ b/x/staking/legacy/v040/keys.go @@ -1,5 +1,330 @@ +// Package v040 is copy-pasted from: +// https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/staking/types/keys.go package v040 +import ( + "bytes" + "encoding/binary" + "fmt" + "strconv" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + v040auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v040" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + const ( + // ModuleName is the name of the staking module ModuleName = "staking" + + // StoreKey is the string store representation + StoreKey = ModuleName + + // QuerierRoute is the querier route for the staking module + QuerierRoute = ModuleName + + // RouterKey is the msg router key for the staking module + RouterKey = ModuleName +) + +var ( + // Keys for store prefixes + // Last* values are constant during a block. + LastValidatorPowerKey = []byte{0x11} // prefix for each key to a validator index, for bonded validators + LastTotalPowerKey = []byte{0x12} // prefix for the total power + + ValidatorsKey = []byte{0x21} // prefix for each key to a validator + ValidatorsByConsAddrKey = []byte{0x22} // prefix for each key to a validator index, by pubkey + ValidatorsByPowerIndexKey = []byte{0x23} // prefix for each key to a validator index, sorted by power + + DelegationKey = []byte{0x31} // key for a delegation + UnbondingDelegationKey = []byte{0x32} // key for an unbonding-delegation + UnbondingDelegationByValIndexKey = []byte{0x33} // prefix for each key for an unbonding-delegation, by validator operator + RedelegationKey = []byte{0x34} // key for a redelegation + RedelegationByValSrcIndexKey = []byte{0x35} // prefix for each key for an redelegation, by source validator operator + RedelegationByValDstIndexKey = []byte{0x36} // prefix for each key for an redelegation, by destination validator operator + + UnbondingQueueKey = []byte{0x41} // prefix for the timestamps in unbonding queue + RedelegationQueueKey = []byte{0x42} // prefix for the timestamps in redelegations queue + ValidatorQueueKey = []byte{0x43} // prefix for the timestamps in validator queue + + HistoricalInfoKey = []byte{0x50} // prefix for the historical info ) + +// gets the key for the validator with address +// VALUE: staking/Validator +func GetValidatorKey(operatorAddr sdk.ValAddress) []byte { + return append(ValidatorsKey, operatorAddr.Bytes()...) +} + +// gets the key for the validator with pubkey +// VALUE: validator operator address ([]byte) +func GetValidatorByConsAddrKey(addr sdk.ConsAddress) []byte { + return append(ValidatorsByConsAddrKey, addr.Bytes()...) +} + +// Get the validator operator address from LastValidatorPowerKey +func AddressFromLastValidatorPowerKey(key []byte) []byte { + return key[1:] // remove prefix bytes +} + +// get the validator by power index. +// Power index is the key used in the power-store, and represents the relative +// power ranking of the validator. +// VALUE: validator operator address ([]byte) +func GetValidatorsByPowerIndexKey(validator types.Validator) []byte { + // NOTE the address doesn't need to be stored because counter bytes must always be different + // NOTE the larger values are of higher value + + consensusPower := sdk.TokensToConsensusPower(validator.Tokens, sdk.DefaultPowerReduction) + consensusPowerBytes := make([]byte, 8) + binary.BigEndian.PutUint64(consensusPowerBytes, uint64(consensusPower)) + + powerBytes := consensusPowerBytes + powerBytesLen := len(powerBytes) // 8 + + // key is of format prefix || powerbytes || addrBytes + key := make([]byte, 1+powerBytesLen+v040auth.AddrLen) + + key[0] = ValidatorsByPowerIndexKey[0] + copy(key[1:powerBytesLen+1], powerBytes) + addr, err := sdk.ValAddressFromBech32(validator.OperatorAddress) + if err != nil { + panic(err) + } + operAddrInvr := sdk.CopyBytes(addr) + + for i, b := range operAddrInvr { + operAddrInvr[i] = ^b + } + + copy(key[powerBytesLen+1:], operAddrInvr) + + return key +} + +// get the bonded validator index key for an operator address +func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte { + return append(LastValidatorPowerKey, operator...) +} + +// parse the validators operator address from power rank key +func ParseValidatorPowerRankKey(key []byte) (operAddr []byte) { + powerBytesLen := 8 + if len(key) != 1+powerBytesLen+v040auth.AddrLen { + panic("Invalid validator power rank key length") + } + + operAddr = sdk.CopyBytes(key[powerBytesLen+1:]) + + for i, b := range operAddr { + operAddr[i] = ^b + } + + return operAddr +} + +// GetValidatorQueueKey returns the prefix key used for getting a set of unbonding +// validators whose unbonding completion occurs at the given time and height. +func GetValidatorQueueKey(timestamp time.Time, height int64) []byte { + heightBz := sdk.Uint64ToBigEndian(uint64(height)) + timeBz := sdk.FormatTimeBytes(timestamp) + timeBzL := len(timeBz) + prefixL := len(ValidatorQueueKey) + + bz := make([]byte, prefixL+8+timeBzL+8) + + // copy the prefix + copy(bz[:prefixL], ValidatorQueueKey) + + // copy the encoded time bytes length + copy(bz[prefixL:prefixL+8], sdk.Uint64ToBigEndian(uint64(timeBzL))) + + // copy the encoded time bytes + copy(bz[prefixL+8:prefixL+8+timeBzL], timeBz) + + // copy the encoded height + copy(bz[prefixL+8+timeBzL:], heightBz) + + return bz +} + +// ParseValidatorQueueKey returns the encoded time and height from a key created +// from GetValidatorQueueKey. +func ParseValidatorQueueKey(bz []byte) (time.Time, int64, error) { + prefixL := len(ValidatorQueueKey) + if prefix := bz[:prefixL]; !bytes.Equal(prefix, ValidatorQueueKey) { + return time.Time{}, 0, fmt.Errorf("invalid prefix; expected: %X, got: %X", ValidatorQueueKey, prefix) + } + + timeBzL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) + ts, err := sdk.ParseTimeBytes(bz[prefixL+8 : prefixL+8+int(timeBzL)]) + if err != nil { + return time.Time{}, 0, err + } + + height := sdk.BigEndianToUint64(bz[prefixL+8+int(timeBzL):]) + + return ts, int64(height), nil +} + +// gets the key for delegator bond with validator +// VALUE: staking/Delegation +func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { + return append(GetDelegationsKey(delAddr), valAddr.Bytes()...) +} + +// gets the prefix for a delegator for all validators +func GetDelegationsKey(delAddr sdk.AccAddress) []byte { + return append(DelegationKey, delAddr.Bytes()...) +} + +// gets the key for an unbonding delegation by delegator and validator addr +// VALUE: staking/UnbondingDelegation +func GetUBDKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { + return append( + GetUBDsKey(delAddr.Bytes()), + valAddr.Bytes()...) +} + +// gets the index-key for an unbonding delegation, stored by validator-index +// VALUE: none (key rearrangement used) +func GetUBDByValIndexKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { + return append(GetUBDsByValIndexKey(valAddr), delAddr.Bytes()...) +} + +// rearranges the ValIndexKey to get the UBDKey +func GetUBDKeyFromValIndexKey(indexKey []byte) []byte { + addrs := indexKey[1:] // remove prefix bytes + if len(addrs) != 2*v040auth.AddrLen { + panic("unexpected key length") + } + + valAddr := addrs[:v040auth.AddrLen] + delAddr := addrs[v040auth.AddrLen:] + + return GetUBDKey(delAddr, valAddr) +} + +// gets the prefix for all unbonding delegations from a delegator +func GetUBDsKey(delAddr sdk.AccAddress) []byte { + return append(UnbondingDelegationKey, delAddr.Bytes()...) +} + +// gets the prefix keyspace for the indexes of unbonding delegations for a validator +func GetUBDsByValIndexKey(valAddr sdk.ValAddress) []byte { + return append(UnbondingDelegationByValIndexKey, valAddr.Bytes()...) +} + +// gets the prefix for all unbonding delegations from a delegator +func GetUnbondingDelegationTimeKey(timestamp time.Time) []byte { + bz := sdk.FormatTimeBytes(timestamp) + return append(UnbondingQueueKey, bz...) +} + +// GetREDKey returns a key prefix for indexing a redelegation from a delegator +// and source validator to a destination validator. +func GetREDKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + key := make([]byte, 1+v040auth.AddrLen*3) + + copy(key[0:v040auth.AddrLen+1], GetREDsKey(delAddr.Bytes())) + copy(key[v040auth.AddrLen+1:2*v040auth.AddrLen+1], valSrcAddr.Bytes()) + copy(key[2*v040auth.AddrLen+1:3*v040auth.AddrLen+1], valDstAddr.Bytes()) + + return key +} + +// gets the index-key for a redelegation, stored by source-validator-index +// VALUE: none (key rearrangement used) +func GetREDByValSrcIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + REDSFromValsSrcKey := GetREDsFromValSrcIndexKey(valSrcAddr) + offset := len(REDSFromValsSrcKey) + + // key is of the form REDSFromValsSrcKey || delAddr || valDstAddr + key := make([]byte, len(REDSFromValsSrcKey)+2*v040auth.AddrLen) + copy(key[0:offset], REDSFromValsSrcKey) + copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) + copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valDstAddr.Bytes()) + + return key +} + +// gets the index-key for a redelegation, stored by destination-validator-index +// VALUE: none (key rearrangement used) +func GetREDByValDstIndexKey(delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) []byte { + REDSToValsDstKey := GetREDsToValDstIndexKey(valDstAddr) + offset := len(REDSToValsDstKey) + + // key is of the form REDSToValsDstKey || delAddr || valSrcAddr + key := make([]byte, len(REDSToValsDstKey)+2*v040auth.AddrLen) + copy(key[0:offset], REDSToValsDstKey) + copy(key[offset:offset+v040auth.AddrLen], delAddr.Bytes()) + copy(key[offset+v040auth.AddrLen:offset+2*v040auth.AddrLen], valSrcAddr.Bytes()) + + return key +} + +// GetREDKeyFromValSrcIndexKey rearranges the ValSrcIndexKey to get the REDKey +func GetREDKeyFromValSrcIndexKey(indexKey []byte) []byte { + // note that first byte is prefix byte + if len(indexKey) != 3*v040auth.AddrLen+1 { + panic("unexpected key length") + } + + valSrcAddr := indexKey[1 : v040auth.AddrLen+1] + delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] + valDstAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] + + return GetREDKey(delAddr, valSrcAddr, valDstAddr) +} + +// GetREDKeyFromValDstIndexKey rearranges the ValDstIndexKey to get the REDKey +func GetREDKeyFromValDstIndexKey(indexKey []byte) []byte { + // note that first byte is prefix byte + if len(indexKey) != 3*v040auth.AddrLen+1 { + panic("unexpected key length") + } + + valDstAddr := indexKey[1 : v040auth.AddrLen+1] + delAddr := indexKey[v040auth.AddrLen+1 : 2*v040auth.AddrLen+1] + valSrcAddr := indexKey[2*v040auth.AddrLen+1 : 3*v040auth.AddrLen+1] + + return GetREDKey(delAddr, valSrcAddr, valDstAddr) +} + +// GetRedelegationTimeKey returns a key prefix for indexing an unbonding +// redelegation based on a completion time. +func GetRedelegationTimeKey(timestamp time.Time) []byte { + bz := sdk.FormatTimeBytes(timestamp) + return append(RedelegationQueueKey, bz...) +} + +// GetREDsKey returns a key prefix for indexing a redelegation from a delegator +// address. +func GetREDsKey(delAddr sdk.AccAddress) []byte { + return append(RedelegationKey, delAddr.Bytes()...) +} + +// GetREDsFromValSrcIndexKey returns a key prefix for indexing a redelegation to +// a source validator. +func GetREDsFromValSrcIndexKey(valSrcAddr sdk.ValAddress) []byte { + return append(RedelegationByValSrcIndexKey, valSrcAddr.Bytes()...) +} + +// GetREDsToValDstIndexKey returns a key prefix for indexing a redelegation to a +// destination (target) validator. +func GetREDsToValDstIndexKey(valDstAddr sdk.ValAddress) []byte { + return append(RedelegationByValDstIndexKey, valDstAddr.Bytes()...) +} + +// GetREDsByDelToValDstIndexKey returns a key prefix for indexing a redelegation +// from an address to a source validator. +func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) []byte { + return append(GetREDsToValDstIndexKey(valDstAddr), delAddr.Bytes()...) +} + +// GetHistoricalInfoKey returns a key prefix for indexing HistoricalInfo objects. +func GetHistoricalInfoKey(height int64) []byte { + return append(HistoricalInfoKey, []byte(strconv.FormatInt(height, 10))...) +} diff --git a/x/staking/legacy/v040/migrate.go b/x/staking/legacy/v040/migrate.go index a0d9b4c90378..b0746fa363a4 100644 --- a/x/staking/legacy/v040/migrate.go +++ b/x/staking/legacy/v040/migrate.go @@ -6,18 +6,19 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func migrateBondStatus(oldStatus v034staking.BondStatus) BondStatus { +func migrateBondStatus(oldStatus v034staking.BondStatus) v040staking.BondStatus { switch oldStatus { case v034staking.Unbonded: - return Unbonded + return v040staking.Unbonded case v034staking.Unbonding: - return Unbonding + return v040staking.Unbonding case v034staking.Bonded: - return Bonded + return v040staking.Bonded default: panic(fmt.Errorf("invalid bond status %d", oldStatus)) @@ -30,29 +31,29 @@ func migrateBondStatus(oldStatus v034staking.BondStatus) BondStatus { // - Convert addresses from bytes to bech32 strings. // - Update BondStatus staking constants. // - Re-encode in v0.40 GenesisState. -func Migrate(stakingState v038staking.GenesisState) *GenesisState { - newLastValidatorPowers := make([]LastValidatorPower, len(stakingState.LastValidatorPowers)) +func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { + newLastValidatorPowers := make([]v040staking.LastValidatorPower, len(stakingState.LastValidatorPowers)) for i, oldLastValidatorPower := range stakingState.LastValidatorPowers { - newLastValidatorPowers[i] = LastValidatorPower{ + newLastValidatorPowers[i] = v040staking.LastValidatorPower{ Address: oldLastValidatorPower.Address.String(), Power: oldLastValidatorPower.Power, } } - newValidators := make([]Validator, len(stakingState.Validators)) + newValidators := make([]v040staking.Validator, len(stakingState.Validators)) for i, oldValidator := range stakingState.Validators { pkAny, err := codectypes.NewAnyWithValue(oldValidator.ConsPubKey) if err != nil { panic(fmt.Sprintf("Can't pack validator consensus PK as Any: %s", err)) } - newValidators[i] = Validator{ + newValidators[i] = v040staking.Validator{ OperatorAddress: oldValidator.OperatorAddress.String(), ConsensusPubkey: pkAny, Jailed: oldValidator.Jailed, Status: migrateBondStatus(oldValidator.Status), Tokens: oldValidator.Tokens, DelegatorShares: oldValidator.DelegatorShares, - Description: Description{ + Description: v040staking.Description{ Moniker: oldValidator.Description.Moniker, Identity: oldValidator.Description.Identity, Website: oldValidator.Description.Website, @@ -61,8 +62,8 @@ func Migrate(stakingState v038staking.GenesisState) *GenesisState { }, UnbondingHeight: oldValidator.UnbondingHeight, UnbondingTime: oldValidator.UnbondingCompletionTime, - Commission: Commission{ - CommissionRates: CommissionRates{ + Commission: v040staking.Commission{ + CommissionRates: v040staking.CommissionRates{ Rate: oldValidator.Commission.Rate, MaxRate: oldValidator.Commission.MaxRate, MaxChangeRate: oldValidator.Commission.MaxChangeRate, @@ -73,20 +74,20 @@ func Migrate(stakingState v038staking.GenesisState) *GenesisState { } } - newDelegations := make([]Delegation, len(stakingState.Delegations)) + newDelegations := make([]v040staking.Delegation, len(stakingState.Delegations)) for i, oldDelegation := range stakingState.Delegations { - newDelegations[i] = Delegation{ + newDelegations[i] = v040staking.Delegation{ DelegatorAddress: oldDelegation.DelegatorAddress.String(), ValidatorAddress: oldDelegation.ValidatorAddress.String(), Shares: oldDelegation.Shares, } } - newUnbondingDelegations := make([]UnbondingDelegation, len(stakingState.UnbondingDelegations)) + newUnbondingDelegations := make([]v040staking.UnbondingDelegation, len(stakingState.UnbondingDelegations)) for i, oldUnbondingDelegation := range stakingState.UnbondingDelegations { - newEntries := make([]UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) + newEntries := make([]v040staking.UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) for j, oldEntry := range oldUnbondingDelegation.Entries { - newEntries[j] = UnbondingDelegationEntry{ + newEntries[j] = v040staking.UnbondingDelegationEntry{ CreationHeight: oldEntry.CreationHeight, CompletionTime: oldEntry.CompletionTime, InitialBalance: oldEntry.InitialBalance, @@ -94,18 +95,18 @@ func Migrate(stakingState v038staking.GenesisState) *GenesisState { } } - newUnbondingDelegations[i] = UnbondingDelegation{ + newUnbondingDelegations[i] = v040staking.UnbondingDelegation{ DelegatorAddress: oldUnbondingDelegation.DelegatorAddress.String(), ValidatorAddress: oldUnbondingDelegation.ValidatorAddress.String(), Entries: newEntries, } } - newRedelegations := make([]Redelegation, len(stakingState.Redelegations)) + newRedelegations := make([]v040staking.Redelegation, len(stakingState.Redelegations)) for i, oldRedelegation := range stakingState.Redelegations { - newEntries := make([]RedelegationEntry, len(oldRedelegation.Entries)) + newEntries := make([]v040staking.RedelegationEntry, len(oldRedelegation.Entries)) for j, oldEntry := range oldRedelegation.Entries { - newEntries[j] = RedelegationEntry{ + newEntries[j] = v040staking.RedelegationEntry{ CreationHeight: oldEntry.CreationHeight, CompletionTime: oldEntry.CompletionTime, InitialBalance: oldEntry.InitialBalance, @@ -113,7 +114,7 @@ func Migrate(stakingState v038staking.GenesisState) *GenesisState { } } - newRedelegations[i] = Redelegation{ + newRedelegations[i] = v040staking.Redelegation{ DelegatorAddress: oldRedelegation.DelegatorAddress.String(), ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress.String(), ValidatorDstAddress: oldRedelegation.ValidatorDstAddress.String(), @@ -121,8 +122,8 @@ func Migrate(stakingState v038staking.GenesisState) *GenesisState { } } - return &GenesisState{ - Params: Params{ + return &v040staking.GenesisState{ + Params: v040staking.Params{ UnbondingTime: stakingState.Params.UnbondingTime, MaxValidators: uint32(stakingState.Params.MaxValidators), MaxEntries: uint32(stakingState.Params.MaxEntries), diff --git a/x/staking/legacy/v040/params.go b/x/staking/legacy/v040/params.go deleted file mode 100644 index 32ad0c72ebba..000000000000 --- a/x/staking/legacy/v040/params.go +++ /dev/null @@ -1,11 +0,0 @@ -package v040 - -import ( - yaml "gopkg.in/yaml.v2" -) - -// String returns a human readable string representation of the parameters. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} diff --git a/x/staking/legacy/v040/staking.pb.go b/x/staking/legacy/v040/staking.pb.go deleted file mode 100644 index 0146313d6d0c..000000000000 --- a/x/staking/legacy/v040/staking.pb.go +++ /dev/null @@ -1,3121 +0,0 @@ -package v040 - -import ( - fmt "fmt" - io "io" - math_bits "math/bits" - time "time" - - types1 "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" -) - -// BondStatus is the status of a validator. -type BondStatus int32 - -const ( - // UNSPECIFIED defines an invalid validator status. - Unspecified BondStatus = 0 - // UNBONDED defines a validator that is not bonded. - Unbonded BondStatus = 1 - // UNBONDING defines a validator that is unbonding. - Unbonding BondStatus = 2 - // BONDED defines a validator that is bonded. - Bonded BondStatus = 3 -) - -var BondStatusName = map[int32]string{ - 0: "BOND_STATUS_UNSPECIFIED", - 1: "BOND_STATUS_UNBONDED", - 2: "BOND_STATUS_UNBONDING", - 3: "BOND_STATUS_BONDED", -} - -func (x BondStatus) String() string { - return proto.EnumName(BondStatusName, int32(x)) -} - -// CommissionRates defines the initial commission rates to be used for creating -// a validator. -type CommissionRates struct { - Rate sdk.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` - MaxRate sdk.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` - MaxChangeRate sdk.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` -} - -func (m *CommissionRates) Reset() { *m = CommissionRates{} } -func (*CommissionRates) ProtoMessage() {} - -// Commission defines commission parameters for a given validator. -type Commission struct { - CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` - UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` -} - -func (m *Commission) Reset() { *m = Commission{} } -func (*Commission) ProtoMessage() {} - -// Description defines a validator description. -type Description struct { - Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` - Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` - Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` - SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty" yaml:"security_contact"` - Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` -} - -func (m *Description) Reset() { *m = Description{} } -func (*Description) ProtoMessage() {} - -// Validator defines a validator, together with the total amount of the -// Validator's bond shares and their exchange rate to coins. Slashing results in -// a decrease in the exchange rate, allowing correct calculation of future -// undelegations without iterating over delegators. When coins are delegated to -// this validator, the validator is credited with a delegation whose number of -// bond shares is based on the amount of coins delegated divided by the current -// exchange rate. Voting power can be calculated as total bonded shares -// multiplied by exchange rate. -type Validator struct { - OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` - ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` - Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` - Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` - Tokens sdk.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` - DelegatorShares sdk.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` - Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` - UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` - UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` - Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` - MinSelfDelegation sdk.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` -} - -func (m *Validator) Reset() { *m = Validator{} } -func (*Validator) ProtoMessage() {} - -// Delegation represents the bond with tokens held by an account. It is -// owned by one delegator, and is associated with the voting power of one -// validator. -type Delegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` - Shares sdk.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` -} - -func (m *Delegation) Reset() { *m = Delegation{} } -func (*Delegation) ProtoMessage() {} - -// UnbondingDelegation stores all of a single delegator's unbonding bonds -// for a single validator in an time-ordered list. -type UnbondingDelegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` - Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` -} - -func (m *UnbondingDelegation) Reset() { *m = UnbondingDelegation{} } -func (*UnbondingDelegation) ProtoMessage() {} - -// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -type UnbondingDelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` - InitialBalance sdk.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - Balance sdk.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` -} - -func (m *UnbondingDelegationEntry) Reset() { *m = UnbondingDelegationEntry{} } -func (*UnbondingDelegationEntry) ProtoMessage() {} - -// RedelegationEntry defines a redelegation object with relevant metadata. -type RedelegationEntry struct { - CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` - CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` - InitialBalance sdk.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` - SharesDst sdk.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` -} - -func (m *RedelegationEntry) Reset() { *m = RedelegationEntry{} } -func (*RedelegationEntry) ProtoMessage() {} - -// Redelegation contains the list of a particular delegator's redelegating bonds -// from a particular source validator to a particular destination validator. -type Redelegation struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` - ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` - Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` -} - -func (m *Redelegation) Reset() { *m = Redelegation{} } -func (*Redelegation) ProtoMessage() {} - -// Params defines the parameters for the staking module. -type Params struct { - UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` - MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` - MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` - HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` - BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} - -// DelegationResponse is equivalent to Delegation except that it contains a -// balance in addition to shares which is more suitable for client responses. -type DelegationResponse struct { - Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` - Balance sdk.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` -} - -// Pool is used for tracking bonded and not-bonded token supply of the bond -// denomination. -type Pool struct { - NotBondedTokens sdk.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` - BondedTokens sdk.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens" yaml:"bonded_tokens"` -} - -func (m *Pool) Reset() { *m = Pool{} } -func (m *Pool) String() string { return proto.CompactTextString(m) } -func (*Pool) ProtoMessage() {} - -func (m *CommissionRates) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommissionRates) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommissionRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxChangeRate.Size() - i -= size - if _, err := m.MaxChangeRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.MaxRate.Size() - i -= size - if _, err := m.MaxRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.Rate.Size() - i -= size - if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Commission) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Commission) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Commission) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintStaking(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x12 - { - size, err := m.CommissionRates.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Description) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Description) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Details) > 0 { - i -= len(m.Details) - copy(dAtA[i:], m.Details) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Details))) - i-- - dAtA[i] = 0x2a - } - if len(m.SecurityContact) > 0 { - i -= len(m.SecurityContact) - copy(dAtA[i:], m.SecurityContact) - i = encodeVarintStaking(dAtA, i, uint64(len(m.SecurityContact))) - i-- - dAtA[i] = 0x22 - } - if len(m.Website) > 0 { - i -= len(m.Website) - copy(dAtA[i:], m.Website) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Website))) - i-- - dAtA[i] = 0x1a - } - if len(m.Identity) > 0 { - i -= len(m.Identity) - copy(dAtA[i:], m.Identity) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Identity))) - i-- - dAtA[i] = 0x12 - } - if len(m.Moniker) > 0 { - i -= len(m.Moniker) - copy(dAtA[i:], m.Moniker) - i = encodeVarintStaking(dAtA, i, uint64(len(m.Moniker))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Validator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Validator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MinSelfDelegation.Size() - i -= size - if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - { - size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintStaking(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x4a - if m.UnbondingHeight != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.UnbondingHeight)) - i-- - dAtA[i] = 0x40 - } - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size := m.DelegatorShares.Size() - i -= size - if _, err := m.DelegatorShares.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.Tokens.Size() - i -= size - if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.Status != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x20 - } - if m.Jailed { - i-- - if m.Jailed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.ConsensusPubkey != nil { - { - size, err := m.ConsensusPubkey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.OperatorAddress) > 0 { - i -= len(m.OperatorAddress) - copy(dAtA[i:], m.OperatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.OperatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Delegation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Delegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Shares.Size() - i -= size - if _, err := m.Shares.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnbondingDelegation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UnbondingDelegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondingDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Entries) > 0 { - for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnbondingDelegationEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UnbondingDelegationEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondingDelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Balance.Size() - i -= size - if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.InitialBalance.Size() - i -= size - if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err8 != nil { - return 0, err8 - } - i -= n8 - i = encodeVarintStaking(dAtA, i, uint64(n8)) - i-- - dAtA[i] = 0x12 - if m.CreationHeight != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RedelegationEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedelegationEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.SharesDst.Size() - i -= size - if _, err := m.SharesDst.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.InitialBalance.Size() - i -= size - if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err9 != nil { - return 0, err9 - } - i -= n9 - i = encodeVarintStaking(dAtA, i, uint64(n9)) - i-- - dAtA[i] = 0x12 - if m.CreationHeight != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Redelegation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Redelegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Redelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Entries) > 0 { - for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.ValidatorDstAddress) > 0 { - i -= len(m.ValidatorDstAddress) - copy(dAtA[i:], m.ValidatorDstAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorSrcAddress) > 0 { - i -= len(m.ValidatorSrcAddress) - copy(dAtA[i:], m.ValidatorSrcAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - dAtA[i] = 0x32 - if len(m.BondDenom) > 0 { - i -= len(m.BondDenom) - copy(dAtA[i:], m.BondDenom) - i = encodeVarintStaking(dAtA, i, uint64(len(m.BondDenom))) - i-- - dAtA[i] = 0x2a - } - if m.HistoricalEntries != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.HistoricalEntries)) - i-- - dAtA[i] = 0x20 - } - if m.MaxEntries != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.MaxEntries)) - i-- - dAtA[i] = 0x18 - } - if m.MaxValidators != 0 { - i = encodeVarintStaking(dAtA, i, uint64(m.MaxValidators)) - i-- - dAtA[i] = 0x10 - } - n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintStaking(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Pool) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Pool) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.BondedTokens.Size() - i -= size - if _, err := m.BondedTokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.NotBondedTokens.Size() - i -= size - if _, err := m.NotBondedTokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStaking(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintStaking(dAtA []byte, offset int, v uint64) int { - offset -= sovStaking(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *CommissionRates) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Rate.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.MaxRate.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.MaxChangeRate.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Commission) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.CommissionRates.Size() - n += 1 + l + sovStaking(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime) - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Description) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Moniker) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.Identity) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.Website) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.SecurityContact) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.Details) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - return n -} - -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OperatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - if m.ConsensusPubkey != nil { - l = m.ConsensusPubkey.Size() - n += 1 + l + sovStaking(uint64(l)) - } - if m.Jailed { - n += 2 - } - if m.Status != 0 { - n += 1 + sovStaking(uint64(m.Status)) - } - l = m.Tokens.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.DelegatorShares.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.Description.Size() - n += 1 + l + sovStaking(uint64(l)) - if m.UnbondingHeight != 0 { - n += 1 + sovStaking(uint64(m.UnbondingHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime) - n += 1 + l + sovStaking(uint64(l)) - l = m.Commission.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.MinSelfDelegation.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Delegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = m.Shares.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *UnbondingDelegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *UnbondingDelegationEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreationHeight != 0 { - n += 1 + sovStaking(uint64(m.CreationHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) - n += 1 + l + sovStaking(uint64(l)) - l = m.InitialBalance.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.Balance.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *RedelegationEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreationHeight != 0 { - n += 1 + sovStaking(uint64(m.CreationHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) - n += 1 + l + sovStaking(uint64(l)) - l = m.InitialBalance.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.SharesDst.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Redelegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorSrcAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - l = len(m.ValidatorDstAddress) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovStaking(uint64(l)) - } - } - return n -} - -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime) - n += 1 + l + sovStaking(uint64(l)) - if m.MaxValidators != 0 { - n += 1 + sovStaking(uint64(m.MaxValidators)) - } - if m.MaxEntries != 0 { - n += 1 + sovStaking(uint64(m.MaxEntries)) - } - if m.HistoricalEntries != 0 { - n += 1 + sovStaking(uint64(m.HistoricalEntries)) - } - l = len(m.BondDenom) - if l > 0 { - n += 1 + l + sovStaking(uint64(l)) - } - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func (m *Pool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.NotBondedTokens.Size() - n += 1 + l + sovStaking(uint64(l)) - l = m.BondedTokens.Size() - n += 1 + l + sovStaking(uint64(l)) - return n -} - -func sovStaking(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func (m *CommissionRates) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommissionRates: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommissionRates: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxChangeRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxChangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Commission) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Commission: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Commission: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommissionRates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommissionRates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Description) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Description: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Moniker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Website = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SecurityContact = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Details = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Validator) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusPubkey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConsensusPubkey == nil { - m.ConsensusPubkey = &types1.Any{} - } - if err := m.ConsensusPubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Jailed = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= BondStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorShares", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DelegatorShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingHeight", wireType) - } - m.UnbondingHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func (m *Delegation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Delegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Delegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Shares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbondingDelegation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnbondingDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbondingDelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entries = append(m.Entries, UnbondingDelegationEntry{}) - if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbondingDelegationEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnbondingDelegationEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbondingDelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) - } - m.CreationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreationHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedelegationEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedelegationEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) - } - m.CreationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreationHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SharesDst", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SharesDst.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Redelegation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Redelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Redelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entries = append(m.Entries, RedelegationEntry{}) - if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) - } - m.MaxValidators = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxValidators |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) - } - m.MaxEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) - } - m.HistoricalEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HistoricalEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BondDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Pool) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Pool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotBondedTokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.NotBondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondedTokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStaking - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStaking - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStaking - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStaking(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStaking - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStaking(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStaking - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStaking - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStaking - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStaking - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupStaking - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthStaking - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthStaking = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStaking = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupStaking = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/staking/legacy/v040/validator.go b/x/staking/legacy/v040/validator.go deleted file mode 100644 index 9b4d569e850f..000000000000 --- a/x/staking/legacy/v040/validator.go +++ /dev/null @@ -1,43 +0,0 @@ -package v040 - -import ( - "strings" - - "gopkg.in/yaml.v2" -) - -var ( - BondStatusUnspecified = BondStatusName[int32(Unspecified)] - BondStatusUnbonded = BondStatusName[int32(Unbonded)] - BondStatusUnbonding = BondStatusName[int32(Unbonding)] - BondStatusBonded = BondStatusName[int32(Bonded)] -) - -// String implements the Stringer interface for a Validator object. -func (v Validator) String() string { - out, _ := yaml.Marshal(v) - return string(out) -} - -// Validators is a collection of Validator -type Validators []Validator - -func (v Validators) String() (out string) { - for _, val := range v { - out += val.String() + "\n" - } - - return strings.TrimSpace(out) -} - -// ValidatorsByVotingPower implements sort.Interface for []Validator based on -// the VotingPower and Address fields. -// The validators are sorted first by their voting power (descending). Secondary index - Address (ascending). -// Copied from tendermint/types/validator_set.go -type ValidatorsByVotingPower []Validator - -// String implements the Stringer interface for a Description object. -func (d Description) String() string { - out, _ := yaml.Marshal(d) - return string(out) -} diff --git a/x/staking/legacy/v042/migrate.go b/x/staking/legacy/v042/migrate.go deleted file mode 100644 index 8e3a0eacc1cb..000000000000 --- a/x/staking/legacy/v042/migrate.go +++ /dev/null @@ -1,117 +0,0 @@ -package v042 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" - v042staking "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -// Migrate accepts exported v0.40 x/staking genesis state and migrates it to -// v0.42 x/staking genesis state. The migration includes: -// -// - Adding power reduction on-chain param -func Migrate(stakingState v040staking.GenesisState) *v042staking.GenesisState { - newLastValidatorPowers := make([]v042staking.LastValidatorPower, len(stakingState.LastValidatorPowers)) - for i, oldLastValidatorPower := range stakingState.LastValidatorPowers { - newLastValidatorPowers[i] = v042staking.LastValidatorPower{ - Address: oldLastValidatorPower.Address, - Power: oldLastValidatorPower.Power, - } - } - - newValidators := make([]v042staking.Validator, len(stakingState.Validators)) - for i, oldValidator := range stakingState.Validators { - newValidators[i] = v042staking.Validator{ - OperatorAddress: oldValidator.OperatorAddress, - ConsensusPubkey: oldValidator.ConsensusPubkey, - Jailed: oldValidator.Jailed, - Status: v042staking.BondStatus(oldValidator.Status), - Tokens: oldValidator.Tokens, - DelegatorShares: oldValidator.DelegatorShares, - Description: v042staking.Description{ - Moniker: oldValidator.Description.Moniker, - Identity: oldValidator.Description.Identity, - Website: oldValidator.Description.Website, - SecurityContact: oldValidator.Description.SecurityContact, - Details: oldValidator.Description.Details, - }, - UnbondingHeight: oldValidator.UnbondingHeight, - UnbondingTime: oldValidator.UnbondingTime, - Commission: v042staking.Commission{ - CommissionRates: v042staking.CommissionRates{ - Rate: oldValidator.Commission.Rate, - MaxRate: oldValidator.Commission.MaxRate, - MaxChangeRate: oldValidator.Commission.MaxChangeRate, - }, - UpdateTime: oldValidator.Commission.UpdateTime, - }, - MinSelfDelegation: oldValidator.MinSelfDelegation, - } - } - - newDelegations := make([]v042staking.Delegation, len(stakingState.Delegations)) - for i, oldDelegation := range stakingState.Delegations { - newDelegations[i] = v042staking.Delegation{ - DelegatorAddress: oldDelegation.DelegatorAddress, - ValidatorAddress: oldDelegation.ValidatorAddress, - Shares: oldDelegation.Shares, - } - } - - newUnbondingDelegations := make([]v042staking.UnbondingDelegation, len(stakingState.UnbondingDelegations)) - for i, oldUnbondingDelegation := range stakingState.UnbondingDelegations { - newEntries := make([]v042staking.UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) - for j, oldEntry := range oldUnbondingDelegation.Entries { - newEntries[j] = v042staking.UnbondingDelegationEntry{ - CreationHeight: oldEntry.CreationHeight, - CompletionTime: oldEntry.CompletionTime, - InitialBalance: oldEntry.InitialBalance, - Balance: oldEntry.Balance, - } - } - - newUnbondingDelegations[i] = v042staking.UnbondingDelegation{ - DelegatorAddress: oldUnbondingDelegation.DelegatorAddress, - ValidatorAddress: oldUnbondingDelegation.ValidatorAddress, - Entries: newEntries, - } - } - - newRedelegations := make([]v042staking.Redelegation, len(stakingState.Redelegations)) - for i, oldRedelegation := range stakingState.Redelegations { - newEntries := make([]v042staking.RedelegationEntry, len(oldRedelegation.Entries)) - for j, oldEntry := range oldRedelegation.Entries { - newEntries[j] = v042staking.RedelegationEntry{ - CreationHeight: oldEntry.CreationHeight, - CompletionTime: oldEntry.CompletionTime, - InitialBalance: oldEntry.InitialBalance, - SharesDst: oldEntry.SharesDst, - } - } - - newRedelegations[i] = v042staking.Redelegation{ - DelegatorAddress: oldRedelegation.DelegatorAddress, - ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress, - ValidatorDstAddress: oldRedelegation.ValidatorDstAddress, - Entries: newEntries, - } - } - - return &v042staking.GenesisState{ - Params: v042staking.Params{ - UnbondingTime: stakingState.Params.UnbondingTime, - MaxValidators: stakingState.Params.MaxValidators, - MaxEntries: stakingState.Params.MaxEntries, - HistoricalEntries: stakingState.Params.HistoricalEntries, - BondDenom: stakingState.Params.BondDenom, - PowerReduction: sdk.DefaultPowerReduction, - }, - LastTotalPower: stakingState.LastTotalPower, - LastValidatorPowers: newLastValidatorPowers, - Validators: newValidators, - Delegations: newDelegations, - UnbondingDelegations: newUnbondingDelegations, - Redelegations: newRedelegations, - Exported: stakingState.Exported, - } -} diff --git a/x/staking/legacy/v042/migrate_test.go b/x/staking/legacy/v042/migrate_test.go deleted file mode 100644 index 8bd00fd4db07..000000000000 --- a/x/staking/legacy/v042/migrate_test.go +++ /dev/null @@ -1,101 +0,0 @@ -package v042_test - -import ( - "encoding/json" - "fmt" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/client" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/cosmos/cosmos-sdk/simapp" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" - v042staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v042" -) - -func TestMigrate(t *testing.T) { - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}. - WithInterfaceRegistry(encodingConfig.InterfaceRegistry). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithJSONMarshaler(encodingConfig.Marshaler) - - consPubKey := ed25519.GenPrivKeyFromSecret([]byte("val0")).PubKey() - pkAny, err := codectypes.NewAnyWithValue(consPubKey) - if err != nil { - panic(fmt.Sprintf("Can't pack validator consensus PK as Any: %s", err)) - } - stakingGenState := v040staking.GenesisState{ - Validators: v040staking.Validators{v040staking.Validator{ - ConsensusPubkey: pkAny, - Status: v040staking.Unbonded, - }}, - } - - migrated := v042staking.Migrate(stakingGenState) - bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) - require.NoError(t, err) - - // Indent the JSON bz correctly. - var jsonObj map[string]interface{} - err = json.Unmarshal(bz, &jsonObj) - require.NoError(t, err) - indentedBz, err := json.MarshalIndent(jsonObj, "", " ") - require.NoError(t, err) - - // Make sure about: - // - consensus_pubkey: should be an any - // - validator's status should be 1 (new unbonded) - expected := `{ - "delegations": [], - "exported": false, - "last_total_power": "0", - "last_validator_powers": [], - "params": { - "bond_denom": "", - "historical_entries": 0, - "max_entries": 0, - "max_validators": 0, - "power_reduction": "1000000", - "unbonding_time": "0s" - }, - "redelegations": [], - "unbonding_delegations": [], - "validators": [ - { - "commission": { - "commission_rates": { - "max_change_rate": "0", - "max_rate": "0", - "rate": "0" - }, - "update_time": "0001-01-01T00:00:00Z" - }, - "consensus_pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "KTeVrjP7NJIufvgMJsQRxZjfFyD+Exda6O7x+oxIvmA=" - }, - "delegator_shares": "0", - "description": { - "details": "", - "identity": "", - "moniker": "", - "security_contact": "", - "website": "" - }, - "jailed": false, - "min_self_delegation": "0", - "operator_address": "", - "status": "BOND_STATUS_UNBONDED", - "tokens": "0", - "unbonding_height": "0", - "unbonding_time": "0001-01-01T00:00:00Z" - } - ] -}` - - require.Equal(t, expected, string(indentedBz)) -} diff --git a/x/staking/legacy/v042/types.go b/x/staking/legacy/v042/types.go deleted file mode 100644 index 0a7df2a327d0..000000000000 --- a/x/staking/legacy/v042/types.go +++ /dev/null @@ -1,5 +0,0 @@ -package v042 - -const ( - ModuleName = "staking" -) diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 387dadf2e8f6..f8d7bf9dab22 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -1263,1226 +1263,623 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ -<<<<<<< HEAD - // 9630 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x5c, 0xd7, - 0x75, 0x18, 0xdf, 0xee, 0x02, 0xd8, 0x3d, 0x58, 0x00, 0x8b, 0x0b, 0x90, 0x5c, 0xae, 0x28, 0x00, - 0x7a, 0xfa, 0xa2, 0x28, 0x09, 0x94, 0x28, 0x91, 0x92, 0x96, 0xb6, 0x64, 0x2c, 0xb0, 0x04, 0x21, - 0xe2, 0x4b, 0x0f, 0x00, 0x25, 0x7f, 0xa4, 0x3b, 0x0f, 0x6f, 0x2f, 0x16, 0x4f, 0xd8, 0x7d, 0xef, - 0xe9, 0xbd, 0xb7, 0x24, 0x21, 0xdb, 0x33, 0x8a, 0xed, 0xba, 0x36, 0xd3, 0xd4, 0x76, 0x9d, 0x49, - 0x6d, 0xc5, 0x74, 0xed, 0x38, 0xad, 0x53, 0xc7, 0x6d, 0x3e, 0xec, 0xba, 0x4d, 0xdb, 0x99, 0xda, - 0x6d, 0xd3, 0xd8, 0xee, 0x34, 0x63, 0x4f, 0x33, 0x6d, 0x9a, 0x69, 0x99, 0x54, 0xf6, 0xb8, 0x8a, - 0xeb, 0x36, 0x0e, 0xeb, 0x4c, 0xd3, 0xf1, 0x74, 0xda, 0xb9, 0x5f, 0xef, 0x6b, 0x3f, 0xde, 0x2e, - 0x4c, 0x5a, 0x4e, 0x93, 0x5f, 0xd8, 0x7b, 0xee, 0x39, 0xe7, 0x9e, 0x7b, 0xee, 0xb9, 0xe7, 0x9c, - 0xfb, 0xf5, 0x00, 0xff, 0xf2, 0x1c, 0xcc, 0xd4, 0x4c, 0xb3, 0x56, 0xc7, 0xa7, 0x2c, 0xdb, 0x74, - 0xcd, 0xed, 0xe6, 0xce, 0xa9, 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 0x6c, 0xbd, 0x3c, 0xb7, 0x59, 0x5e, 0xc8, 0x25, 0x65, 0x0d, - 0x26, 0xdb, 0x39, 0xd4, 0xb6, 0x53, 0x28, 0x60, 0x0b, 0x89, 0x0e, 0xb6, 0x40, 0x79, 0x45, 0x6d, - 0x41, 0xfe, 0x56, 0x02, 0x26, 0xda, 0x04, 0x95, 0xb6, 0x8d, 0x3c, 0x03, 0x03, 0xcc, 0x96, 0x59, - 0x98, 0x7d, 0xa0, 0x6d, 0x74, 0xa2, 0x96, 0xdd, 0x12, 0x6a, 0x29, 0x5d, 0x30, 0xd5, 0x48, 0x76, - 0x48, 0x35, 0x08, 0x8b, 0x16, 0x83, 0xfd, 0xa9, 0x16, 0xe7, 0xcf, 0xe2, 0xe3, 0xd9, 0x5e, 0xe2, - 0x23, 0x85, 0xf5, 0x17, 0x04, 0x06, 0xda, 0x04, 0x81, 0x73, 0x30, 0xde, 0xc2, 0xa8, 0x67, 0x67, - 0xfc, 0x5e, 0x09, 0xf2, 0x9d, 0x94, 0x13, 0xe3, 0x12, 0x13, 0x21, 0x97, 0x78, 0x2e, 0xaa, 0xc1, - 0xbb, 0x3a, 0x0f, 0x42, 0xcb, 0x58, 0x7f, 0x56, 0x82, 0x23, 0xed, 0x53, 0xca, 0xb6, 0x32, 0x3c, - 0x0d, 0x83, 0x0d, 0xec, 0xee, 0x9a, 0x22, 0xad, 0xba, 0xaf, 0x4d, 0xb0, 0x26, 0xd5, 0xd1, 0xc1, - 0xe6, 0x54, 0xc1, 0x68, 0x9f, 0xec, 0x94, 0x17, 0x32, 0x69, 0x5a, 0x24, 0xfd, 0x60, 0x02, 0x0e, - 0xb7, 0x65, 0xde, 0x56, 0xd0, 0x3b, 0x01, 0x74, 0xc3, 0x6a, 0xba, 0x2c, 0x75, 0x62, 0x9e, 0x38, - 0x43, 0x21, 0xd4, 0x79, 0x11, 0x2f, 0xdb, 0x74, 0xbd, 0xfa, 0x24, 0xad, 0x07, 0x06, 0xa2, 0x08,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5, 0x71, 0x6d, 0xdd, 0xa8, 0x55, 0xb4, 0x5d, 0xac, - 0xed, 0x55, 0x9a, 0xee, 0xce, 0x93, 0xf9, 0x3b, 0x82, 0xed, 0x53, 0x09, 0x37, 0x28, 0xce, 0x3c, - 0x41, 0xd9, 0x72, 0x77, 0x9e, 0x44, 0x1b, 0x90, 0x25, 0x83, 0xd1, 0xd0, 0x5f, 0xc6, 0x95, 0x1d, - 0xd3, 0xa6, 0x31, 0x74, 0xb4, 0x8d, 0x6b, 0x0a, 0x68, 0x70, 0x76, 0x8d, 0x13, 0xac, 0x98, 0x55, - 0x5c, 0x1c, 0xd8, 0x58, 0x2f, 0x97, 0x17, 0x94, 0x61, 0xc1, 0xe5, 0xbc, 0x69, 0x13, 0x83, 0xaa, - 0x99, 0x9e, 0x82, 0x87, 0x99, 0x41, 0xd5, 0x4c, 0xa1, 0xde, 0x33, 0x30, 0xa1, 0x69, 0xac, 0xcf, - 0xba, 0x56, 0xe1, 0x8b, 0x31, 0x27, 0x9f, 0x0b, 0x29, 0x4b, 0xd3, 0x16, 0x19, 0x02, 0xb7, 0x71, - 0x07, 0x3d, 0x05, 0x87, 0x7d, 0x65, 0x05, 0x09, 0xc7, 0x5b, 0x7a, 0x19, 0x25, 0x3d, 0x03, 0x13, - 0xd6, 0x7e, 0x2b, 0x21, 0x0a, 0xb5, 0x68, 0xed, 0x47, 0xc9, 0x9e, 0x80, 0x49, 0x6b, 0xd7, 0x6a, - 0xa5, 0x3b, 0x19, 0xa4, 0x43, 0xd6, 0xae, 0x15, 0x25, 0xbc, 0x97, 0xae, 0xcc, 0x6d, 0xac, 0xa9, - 0x2e, 0xae, 0xe6, 0x8f, 0x06, 0xd1, 0x03, 0x15, 0x68, 0x16, 0x72, 0x9a, 0x56, 0xc1, 0x86, 0xba, - 0x5d, 0xc7, 0x15, 0xd5, 0xc6, 0x86, 0xea, 0xe4, 0xa7, 0x29, 0x72, 0xca, 0xb5, 0x9b, 0x58, 0x19, - 0xd5, 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 0xb9, 0x65, - 0x85, 0x93, 0xa3, 0x63, 0x90, 0xaa, 0xab, 0x2f, 0xef, 0x87, 0x83, 0x1e, 0x05, 0xf5, 0x3a, 0x08, - 0xc7, 0x20, 0x75, 0x05, 0xab, 0x7b, 0xe1, 0x50, 0x43, 0x41, 0xb7, 0x71, 0x32, 0x9c, 0x82, 0x01, - 0xaa, 0x2f, 0x04, 0xc0, 0x35, 0x96, 0x3b, 0x84, 0xd2, 0x90, 0x9a, 0x5f, 0x53, 0xc8, 0x84, 0xc8, - 0x41, 0x96, 0x41, 0x2b, 0xeb, 0x4b, 0xe5, 0xf9, 0x72, 0x2e, 0x21, 0x9f, 0x81, 0x41, 0xa6, 0x04, - 0x32, 0x59, 0x3c, 0x35, 0xe4, 0x0e, 0xf1, 0x22, 0xe7, 0x21, 0x89, 0xda, 0xad, 0x95, 0x52, 0x59, - 0xc9, 0x25, 0xc2, 0x43, 0x9d, 0xca, 0x0d, 0xc8, 0x0e, 0x64, 0x83, 0x79, 0xf8, 0x8f, 0x67, 0x31, - 0xfe, 0x65, 0x09, 0x86, 0x03, 0x79, 0x35, 0x49, 0x88, 0xd4, 0x7a, 0xdd, 0xbc, 0x52, 0x51, 0xeb, - 0xba, 0xea, 0x70, 0xd3, 0x00, 0x0a, 0x9a, 0x23, 0x90, 0x5e, 0x87, 0xee, 0xc7, 0x34, 0x45, 0x06, - 0x72, 0x83, 0xf2, 0x27, 0x25, 0xc8, 0x45, 0x13, 0xdb, 0x88, 0x98, 0xd2, 0x1b, 0x29, 0xa6, 0xfc, - 0x09, 0x09, 0x46, 0xc3, 0xd9, 0x6c, 0x44, 0xbc, 0xbb, 0xde, 0x50, 0xf1, 0xfe, 0x30, 0x01, 0x23, - 0xa1, 0x1c, 0xb6, 0x57, 0xe9, 0x5e, 0x82, 0x71, 0xbd, 0x8a, 0x1b, 0x96, 0xe9, 0x62, 0x43, 0xdb, - 0xaf, 0xd4, 0xf1, 0x65, 0x5c, 0xcf, 0xcb, 0xd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 0x10, 0x34, - 0x9c, 0x85, 0x48, 0x18, 0x7a, 0x60, 0xf1, 0x8f, 0x04, 0x0b, 0x41, 0x43, 0x58, 0x3c, 0xe7, 0x07, - 0x5a, 0x1b, 0xd7, 0x74, 0xc7, 0xb5, 0x59, 0x9a, 0xdc, 0x9d, 0xd5, 0x3f, 0xfe, 0x5e, 0x38, 0x09, - 0x53, 0x02, 0xa4, 0xc4, 0x13, 0xf1, 0x6d, 0x57, 0xba, 0x8a, 0x8a, 0x17, 0xec, 0x37, 0x85, 0x27, - 0x0a, 0x90, 0x11, 0xd9, 0x02, 0x19, 0x22, 0x51, 0xbb, 0x46, 0xd6, 0x0e, 0x3d, 0xb0, 0xfb, 0x27, - 0x11, 0xe1, 0x36, 0x04, 0x2d, 0xe1, 0x19, 0xc8, 0x7f, 0x9a, 0xc6, 0x1e, 0xde, 0xef, 0xc9, 0x3a, - 0xff, 0x69, 0x24, 0xff, 0xd9, 0x62, 0x94, 0xcc, 0x87, 0x8c, 0x45, 0xf2, 0x29, 0x14, 0x77, 0xcf, - 0x28, 0xff, 0xd3, 0x3f, 0xe0, 0xfd, 0x0d, 0xa7, 0x53, 0xc5, 0x65, 0x62, 0xe4, 0xe1, 0xa4, 0x27, - 0x9e, 0xd9, 0x7b, 0x7f, 0xe0, 0xd9, 0x79, 0x28, 0xe7, 0x29, 0x9e, 0x87, 0x91, 0x50, 0xc2, 0x13, - 0xcf, 0xea, 0x7d, 0x9c, 0x55, 0x36, 0x98, 0xef, 0x14, 0xcf, 0x40, 0x8a, 0x24, 0x2f, 0xf1, 0xe4, - 0x7f, 0x95, 0x93, 0x53, 0xf4, 0xe2, 0x9b, 0x21, 0x2d, 0x92, 0x96, 0x78, 0xd2, 0xf7, 0x73, 0x52, - 0x8f, 0x84, 0x90, 0x8b, 0x84, 0x25, 0x9e, 0xfc, 0xaf, 0x09, 0x72, 0x41, 0x42, 0xc8, 0x7b, 0x57, - 0xe1, 0x97, 0x7f, 0x26, 0xc5, 0x83,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x18, 0x25, 0xcb, - 0xe1, 0xc0, 0x15, 0x06, 0xa2, 0xed, 0x91, 0xd2, 0x31, 0x9f, 0x4b, 0xb8, 0x9e, 0xad, 0x96, 0x2f, - 0x05, 0xef, 0x30, 0x0c, 0x13, 0x0c, 0xdf, 0x31, 0x13, 0xf2, 0x23, 0xfe, 0xb2, 0x34, 0x50, 0x29, - 0x2b, 0xd0, 0x50, 0xaf, 0x96, 0x59, 0x01, 0x2d, 0x03, 0xda, 0xf5, 0x76, 0x46, 0x2a, 0xbe, 0x3a, - 0x09, 0xfd, 0x9d, 0x37, 0x6f, 0x4c, 0x1f, 0x63, 0xf4, 0xad, 0x38, 0xb2, 0x32, 0xee, 0x03, 0x05, - 0xb7, 0xc7, 0x01, 0x48, 0xbf, 0x2a, 0xec, 0xfa, 0x1c, 0x5b, 0xee, 0x1c, 0xbe, 0x79, 0x63, 0x7a, - 0x9c, 0x71, 0xf1, 0xeb, 0x64, 0x25, 0x43, 0x0a, 0x0b, 0xf4, 0x66, 0xdd, 0x4b, 0x30, 0x46, 0xef, - 0x04, 0x54, 0x6c, 0x5c, 0x6d, 0xd2, 0x0f, 0x56, 0xf0, 0x75, 0xcd, 0x81, 0xe7, 0x66, 0x84, 0x9d, - 0xac, 0x8c, 0x52, 0x88, 0x22, 0x00, 0x81, 0xc9, 0xf4, 0x19, 0x09, 0x90, 0x1f, 0x65, 0x14, 0xec, - 0x58, 0x64, 0x49, 0x48, 0x72, 0xff, 0x40, 0xa2, 0x2e, 0x75, 0xcf, 0xfd, 0x7d, 0x7a, 0x91, 0xfb, - 0x07, 0x26, 0xe7, 0x53, 0xbe, 0x47, 0x4e, 0x70, 0xd3, 0x69, 0x73, 0xbd, 0x71, 0x76, 0xde, 0xd4, - 0x05, 0x75, 0x8b, 0x0b, 0x3e, 0x24, 0xff, 0x1b, 0x09, 0x8e, 0xb5, 0x18, 0xb1, 0x27, 0xec, 0x5f, - 0x01, 0x64, 0x07, 0x2a, 0xf9, 0x27, 0xe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, 0x8c, 0xcb, 0xa7, 0xc4, 0x37, 0x27, 0x9a, 0x06, - 0x9b, 0x71, 0xf2, 0x33, 0x90, 0x65, 0xed, 0xf1, 0x88, 0x7b, 0x0c, 0xd2, 0xf4, 0x06, 0x97, 0xdf, - 0xea, 0x10, 0x29, 0x5f, 0x64, 0x77, 0xe0, 0x19, 0x17, 0xd6, 0x30, 0x2b, 0x94, 0x4a, 0x1d, 0x55, - 0x79, 0x22, 0xde, 0x35, 0x30, 0x45, 0x79, 0x6a, 0xfc, 0xad, 0x01, 0x38, 0xcc, 0x0f, 0x05, 0x55, - 0x4b, 0x3f, 0xb5, 0xeb, 0xba, 0xe2, 0x61, 0x12, 0xf0, 0xec, 0x5a, 0xb5, 0x74, 0x79, 0x1f, 0x52, - 0x17, 0x5c, 0xd7, 0x42, 0x27, 0x61, 0xc0, 0x6e, 0xd6, 0xb1, 0xd8, 0x64, 0xf2, 0x8e, 0x01, 0x54, - 0x4b, 0x9f, 0x25, 0x08, 0x4a, 0xb3, 0x8e, 0x15, 0x86, 0x82, 0xca, 0x30, 0xbd, 0xd3, 0xac, 0xd7, - 0xf7, 0x2b, 0x55, 0x4c, 0xff, 0x5d, 0x90, 0xf7, 0xc1, 0x7d, 0x7c, 0xd5, 0x52, 0xc5, 0x67, 0xfb, - 0x88, 0x6e, 0x8e, 0x53, 0xb4, 0x05, 0x8a, 0x25, 0x3e, 0xb6, 0x5f, 0x16, 0x38, 0xf2, 0xef, 0x27, - 0x20, 0x2d, 0x58, 0xd3, 0x4b, 0xe9, 0xb8, 0x8e, 0x35, 0xd7, 0x14, 0x87, 0x34, 0x5e, 0x19, 0x21, - 0x48, 0xd6, 0xf8, 0x10, 0x65, 0x2e, 0x1c, 0x52, 0x48, 0x81, 0xc0, 0xbc, 0xa7, 0x02, 0x04, 0x66, - 0x35, 0xc9, 0xa8, 0xa5, 0x2c, 0x53, 0xac, 0x06, 0x2f, 0x1c, 0x52, 0x68, 0x09, 0xe5, 0x61, 0x90, - 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x2c, - 0x12, 0xff, 0x45, 0x7d, 0xd0, 0xe1, 0xeb, 0x39, 0x75, 0x50, 0x3d, 0xef, 0x51, 0x07, 0x11, 0xd1, - 0xa7, 0xb7, 0xf1, 0xb5, 0xd2, 0xfa, 0xdc, 0x48, 0xea, 0xe3, 0x4b, 0x3e, 0x91, 0x47, 0x45, 0xf2, - 0xeb, 0x12, 0x8c, 0xac, 0x38, 0xb5, 0x2d, 0xa3, 0xfa, 0xff, 0xbd, 0xfd, 0xee, 0xc0, 0xe1, 0x50, - 0x4f, 0x6f, 0x93, 0x4a, 0x4f, 0xbf, 0x9a, 0x82, 0xe4, 0x8a, 0x53, 0x43, 0x2f, 0xc1, 0x58, 0x34, - 0x69, 0xe8, 0x98, 0x0b, 0xb6, 0x46, 0x84, 0xce, 0xeb, 0xb5, 0xce, 0xd1, 0x03, 0xed, 0xc1, 0x48, - 0x38, 0x72, 0x9c, 0xe8, 0xc2, 0x24, 0x84, 0x59, 0x78, 0xa4, 0x57, 0x4c, 0xaf, 0xb1, 0x77, 0x40, - 0xda, 0x73, 0x7a, 0x77, 0x77, 0xa1, 0x16, 0x48, 0x9d, 0xb3, 0xdb, 0x36, 0x6e, 0x85, 0x68, 0x2f, - 0xea, 0x52, 0xba, 0x69, 0x2f, 0x82, 0xdb, 0x55, 0x7b, 0x9d, 0xa6, 0xd6, 0x36, 0x40, 0x60, 0x1e, - 0xdc, 0xdb, 0x85, 0x83, 0x8f, 0x56, 0x78, 0xb8, 0x27, 0x34, 0xef, 0xd0, 0xe9, 0x16, 0x27, 0xe3, - 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x2a, 0x2c, 0x38, 0xdd, 0x94, 0x00, 0x00, -======= - // 9808 bytes of a gzipped FileDescriptorSet + // 9849 bytes of a gzipped FileDescriptorSet 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x5c, 0xd7, 0x75, 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xec, 0x65, 0xa2, 0x33, 0xd1, 0x93, 0x49, 0xc5, 0x07, 0x41, 0x0f, 0xc2, 0xb8, 0xd9, 0xdc, + 0xaf, 0xec, 0x65, 0xa2, 0x33, 0xd1, 0x93, 0x49, 0xc5, 0x07, 0x41, 0xf7, 0xc3, 0xb8, 0xd9, 0xdc, 0xac, 0x6b, 0x95, 0xb2, 0x0f, 0x0d, 0x66, 0xa2, 0x27, 0xe3, 0x4a, 0x9a, 0x55, 0x14, 0x3d, 0xe4, - 0xfb, 0x61, 0xec, 0x2a, 0x56, 0x77, 0xfc, 0xa8, 0xc3, 0x14, 0x75, 0x94, 0x80, 0x7d, 0x88, 0x73, - 0x90, 0x6a, 0x60, 0xdb, 0x56, 0x6b, 0xb8, 0xec, 0xec, 0x99, 0x38, 0x13, 0xa3, 0xda, 0xcf, 0xb4, - 0x68, 0x1f, 0xd6, 0x7c, 0x98, 0x53, 0xad, 0xef, 0x99, 0x18, 0xe5, 0x21, 0x89, 0xf5, 0x66, 0x83, - 0x71, 0x88, 0x77, 0xb0, 0x5f, 0x49, 0x6f, 0x36, 0xc2, 0x5c, 0x12, 0x84, 0x8c, 0xb3, 0x18, 0xb2, - 0xb1, 0x75, 0x45, 0xab, 0xe0, 0xcc, 0x20, 0x65, 0x70, 0x7f, 0x0b, 0x83, 0x35, 0x56, 0x1f, 0xe6, - 0x21, 0xe8, 0xd0, 0x1c, 0x24, 0xf1, 0xae, 0x83, 0x75, 0x5b, 0x33, 0xf4, 0xcc, 0x10, 0x65, 0x72, - 0x6f, 0x9b, 0x5e, 0xc4, 0xf5, 0x6a, 0x98, 0x85, 0x47, 0x87, 0xce, 0xc1, 0x90, 0x61, 0x3a, 0x9a, - 0xa1, 0xdb, 0x99, 0xc4, 0x8c, 0x74, 0x72, 0xf8, 0xcc, 0xf1, 0xb6, 0x8e, 0xb0, 0xc2, 0x70, 0x14, - 0x81, 0x8c, 0x16, 0x20, 0x6d, 0x1b, 0x4d, 0xab, 0x82, 0xcb, 0x15, 0xa3, 0x8a, 0xcb, 0x9a, 0xbe, - 0x65, 0x64, 0x92, 0x94, 0xc1, 0x74, 0xab, 0x22, 0x14, 0x71, 0xce, 0xa8, 0xe2, 0x05, 0x7d, 0xcb, - 0x50, 0x46, 0xed, 0x40, 0x19, 0x1d, 0x86, 0x41, 0x7b, 0x4f, 0x77, 0xd4, 0xdd, 0x4c, 0x8a, 0x7a, - 0x08, 0x2f, 0xc9, 0xbf, 0x3e, 0x08, 0x63, 0xfd, 0xb8, 0xd8, 0x79, 0x88, 0x6f, 0x11, 0x2d, 0x33, - 0x91, 0xfd, 0xd8, 0x80, 0xd1, 0x04, 0x8d, 0x38, 0x78, 0x40, 0x23, 0xe6, 0x61, 0x58, 0xc7, 0xb6, - 0x83, 0xab, 0xcc, 0x23, 0xa2, 0x7d, 0xfa, 0x14, 0x30, 0xa2, 0x56, 0x97, 0x8a, 0x1d, 0xc8, 0xa5, - 0x9e, 0x87, 0x31, 0x57, 0xa4, 0xb2, 0xa5, 0xea, 0x35, 0xe1, 0x9b, 0xa7, 0x7b, 0x49, 0x32, 0x5b, - 0x12, 0x74, 0x0a, 0x21, 0x53, 0x46, 0x71, 0xa0, 0x8c, 0x8a, 0x00, 0x86, 0x8e, 0x8d, 0xad, 0x72, - 0x15, 0x57, 0xea, 0x99, 0x44, 0x07, 0x2b, 0xad, 0x10, 0x94, 0x16, 0x2b, 0x19, 0x0c, 0x5a, 0xa9, - 0xa3, 0xa7, 0x3c, 0x57, 0x1b, 0xea, 0xe0, 0x29, 0x4b, 0x6c, 0x90, 0xb5, 0x78, 0xdb, 0x06, 0x8c, - 0x5a, 0x98, 0xf8, 0x3d, 0xae, 0x72, 0xcd, 0x92, 0x54, 0x88, 0xd9, 0x9e, 0x9a, 0x29, 0x9c, 0x8c, - 0x29, 0x36, 0x62, 0xf9, 0x8b, 0xe8, 0x6e, 0x70, 0x01, 0x65, 0xea, 0x56, 0x40, 0xa3, 0x50, 0x4a, - 0x00, 0x97, 0x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, 0x87, 0xf1, 0x16, 0x46, 0x7d, 0x07, 0xe3, 0xf7, 0x4a, 0x90, 0xe9, - 0x64, 0x9c, 0x1e, 0x21, 0x31, 0x12, 0x08, 0x89, 0xe7, 0xc3, 0x16, 0xbc, 0xab, 0x73, 0x27, 0xb4, - 0xf4, 0xf5, 0x67, 0x25, 0x38, 0xdc, 0x3e, 0xa5, 0x6c, 0x2b, 0xc3, 0x5b, 0x60, 0xb0, 0x81, 0x9d, - 0x6d, 0x43, 0xa4, 0x55, 0xf7, 0xb5, 0x99, 0xac, 0x49, 0x75, 0xb8, 0xb3, 0x39, 0x95, 0x7f, 0xb6, - 0x8f, 0x76, 0xca, 0x0b, 0x99, 0x34, 0x2d, 0x92, 0x7e, 0x30, 0x02, 0x87, 0xda, 0x32, 0x6f, 0x2b, - 0xe8, 0x09, 0x00, 0x4d, 0x37, 0x9b, 0x0e, 0x4b, 0x9d, 0x58, 0x24, 0x4e, 0x52, 0x08, 0x0d, 0x5e, - 0x24, 0xca, 0x36, 0x1d, 0xb7, 0x3e, 0x4a, 0xeb, 0x81, 0x81, 0x28, 0xc2, 0x93, 0x9e, 0xa0, 0x31, - 0x2a, 0xe8, 0x54, 0x07, 0x4d, 0x5b, 0x1c, 0xf3, 0x11, 0x48, 0x57, 0xea, 0x1a, 0xd6, 0x9d, 0xb2, - 0xed, 0x58, 0x58, 0x6d, 0x68, 0x7a, 0x8d, 0x4e, 0x35, 0x89, 0x5c, 0x7c, 0x4b, 0xad, 0xdb, 0x58, - 0x19, 0x63, 0xd5, 0x6b, 0xa2, 0x96, 0x50, 0x50, 0x07, 0xb2, 0x7c, 0x14, 0x83, 0x01, 0x0a, 0x56, - 0xed, 0x52, 0xc8, 0x1f, 0x4e, 0xc2, 0xb0, 0x2f, 0x01, 0x47, 0x77, 0x41, 0xea, 0x45, 0xf5, 0x8a, - 0x5a, 0x16, 0x8b, 0x2a, 0x66, 0x89, 0x61, 0x02, 0x5b, 0xe5, 0x0b, 0xab, 0x47, 0x60, 0x92, 0xa2, - 0x18, 0x4d, 0x07, 0x5b, 0xe5, 0x4a, 0x5d, 0xb5, 0x6d, 0x6a, 0xb4, 0x04, 0x45, 0x45, 0xa4, 0x6e, - 0x85, 0x54, 0xcd, 0x89, 0x1a, 0x74, 0x16, 0x26, 0x28, 0x45, 0xa3, 0x59, 0x77, 0x34, 0xb3, 0x8e, - 0xcb, 0x64, 0x99, 0x67, 0xd3, 0x29, 0xc7, 0x95, 0x6c, 0x9c, 0x60, 0x2c, 0x71, 0x04, 0x22, 0x91, - 0x8d, 0x8a, 0x70, 0x82, 0x92, 0xd5, 0xb0, 0x8e, 0x2d, 0xd5, 0xc1, 0x65, 0xfc, 0x52, 0x53, 0xad, - 0xdb, 0x65, 0x55, 0xaf, 0x96, 0xb7, 0x55, 0x7b, 0x3b, 0x33, 0x49, 0x18, 0x14, 0x22, 0x19, 0x49, - 0x39, 0x4a, 0x10, 0xe7, 0x39, 0x5e, 0x89, 0xa2, 0xe5, 0xf5, 0xea, 0x45, 0xd5, 0xde, 0x46, 0x39, - 0x38, 0x4c, 0xb9, 0xd8, 0x8e, 0xa5, 0xe9, 0xb5, 0x72, 0x65, 0x1b, 0x57, 0x76, 0xca, 0x4d, 0x67, - 0xeb, 0xc9, 0xcc, 0x31, 0x7f, 0xfb, 0x54, 0xc2, 0x35, 0x8a, 0x33, 0x47, 0x50, 0x36, 0x9c, 0xad, - 0x27, 0xd1, 0x1a, 0xa4, 0x48, 0x67, 0x34, 0xb4, 0x6b, 0xb8, 0xbc, 0x65, 0x58, 0x74, 0x0e, 0x1d, - 0x6d, 0x13, 0x9a, 0x7c, 0x16, 0x9c, 0x5d, 0xe1, 0x04, 0x4b, 0x46, 0x15, 0xe7, 0xe2, 0x6b, 0xab, - 0xa5, 0x52, 0x51, 0x19, 0x16, 0x5c, 0x2e, 0x18, 0x16, 0x71, 0xa8, 0x9a, 0xe1, 0x1a, 0x78, 0x98, - 0x39, 0x54, 0xcd, 0x10, 0xe6, 0x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21, 0xf7, 0x8d, 0x76, 0x72, 0xdf, 0x63, 0x90, 0x6c, 0xa8, 0x66, 0x19, 0xeb, 0x8e, 0xb5, - 0x47, 0xf3, 0xf3, 0x84, 0x92, 0x68, 0xa8, 0x66, 0x89, 0x94, 0x7f, 0x2c, 0xcb, 0xa4, 0x67, 0x62, - 0x89, 0x44, 0x3a, 0xf9, 0x4c, 0x2c, 0x91, 0x4c, 0x83, 0xfc, 0x6a, 0x14, 0x52, 0xfe, 0x7c, 0x9d, - 0x2c, 0x7f, 0x2a, 0x74, 0xc6, 0x92, 0x68, 0x4c, 0xbb, 0xbb, 0x6b, 0x76, 0x3f, 0x3b, 0x47, 0xa6, - 0xb2, 0xdc, 0x20, 0x4b, 0x8e, 0x15, 0x46, 0x49, 0xd2, 0x08, 0xe2, 0x6c, 0x98, 0x25, 0x23, 0x09, - 0x85, 0x97, 0xd0, 0x3c, 0x0c, 0xbe, 0x68, 0x53, 0xde, 0x83, 0x94, 0xf7, 0x3d, 0xdd, 0x79, 0x3f, - 0xb3, 0x46, 0x99, 0x27, 0x9f, 0x59, 0x2b, 0x2f, 0xaf, 0x28, 0x4b, 0xf9, 0x45, 0x85, 0x93, 0xa3, - 0xa3, 0x10, 0xab, 0xab, 0xd7, 0xf6, 0x82, 0x93, 0x1e, 0x05, 0xf5, 0xdb, 0x09, 0x47, 0x21, 0x76, - 0x15, 0xab, 0x3b, 0xc1, 0xa9, 0x86, 0x82, 0xee, 0xe0, 0x60, 0x38, 0x0d, 0x71, 0x6a, 0x2f, 0x04, - 0xc0, 0x2d, 0x96, 0x1e, 0x40, 0x09, 0x88, 0xcd, 0xad, 0x28, 0x64, 0x40, 0xa4, 0x21, 0xc5, 0xa0, - 0xe5, 0xd5, 0x85, 0xd2, 0x5c, 0x29, 0x1d, 0x91, 0xcf, 0xc2, 0x20, 0x33, 0x02, 0x19, 0x2c, 0xae, - 0x19, 0xd2, 0x03, 0xbc, 0xc8, 0x79, 0x48, 0xa2, 0x76, 0x63,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4f, 0x9b, 0x02, 0x46, 0xd4, 0x6a, 0x52, 0xb1, 0x03, 0x99, + 0xd4, 0xb3, 0x30, 0xe6, 0x8a, 0x54, 0xb6, 0x54, 0xbd, 0x26, 0x6c, 0xf3, 0x74, 0x2f, 0x49, 0x66, + 0x4b, 0x82, 0x4e, 0x21, 0x64, 0xca, 0x28, 0x0e, 0x94, 0x51, 0x11, 0xc0, 0xd0, 0xb1, 0xb1, 0x55, + 0xae, 0xe2, 0x4a, 0x3d, 0x93, 0xe8, 0xa0, 0xa5, 0x15, 0x82, 0xd2, 0xa2, 0x25, 0x83, 0x41, 0x2b, + 0x75, 0xf4, 0x84, 0x67, 0x6a, 0x43, 0x1d, 0x2c, 0x65, 0x89, 0x39, 0x59, 0x8b, 0xb5, 0x6d, 0xc0, + 0xa8, 0x85, 0x89, 0xdd, 0xe3, 0x2a, 0xef, 0x59, 0x92, 0x0a, 0x31, 0xdb, 0xb3, 0x67, 0x0a, 0x27, + 0x63, 0x1d, 0x1b, 0xb1, 0xfc, 0x45, 0x74, 0x27, 0xb8, 0x80, 0x32, 0x35, 0x2b, 0xa0, 0x51, 0x28, + 0x25, 0x80, 0xcb, 0x6a, 0x03, 0x67, 0x5f, 0x84, 0xd1, 0xa0, 0x7a, 0xd0, 0x24, 0xc4, 0x6d, 0x47, + 0xb5, 0x1c, 0x6a, 0x85, 0x71, 0x85, 0x15, 0x50, 0x1a, 0xa2, 0x58, 0xaf, 0xd2, 0x28, 0x17, 0x57, + 0xc8, 0x4f, 0xf4, 0x56, 0xaf, 0xc3, 0x51, 0xda, 0xe1, 0x7b, 0x5a, 0x47, 0x34, 0xc0, 0x39, 0xdc, + 0xef, 0xec, 0x63, 0x30, 0x12, 0xe8, 0x40, 0xbf, 0x4d, 0xcb, 0xef, 0x82, 0x43, 0x6d, 0x59, 0xa3, + 0x67, 0x61, 0xb2, 0xa9, 0x6b, 0xba, 0x83, 0x2d, 0xd3, 0xc2, 0xc4, 0x62, 0x59, 0x53, 0x99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d, 0x0d, 0x61, 0x93, 0x60, 0x1e, 0x55, - 0xd2, 0xa2, 0xc6, 0xc5, 0xbe, 0x0b, 0x52, 0x55, 0xa3, 0x49, 0x72, 0x3d, 0x86, 0x47, 0xe6, 0x0e, - 0x49, 0x19, 0x66, 0x30, 0x17, 0x85, 0x67, 0xf1, 0xde, 0xae, 0x57, 0x4a, 0x19, 0x66, 0x30, 0x86, - 0x72, 0x3f, 0x8c, 0xa9, 0xb5, 0x9a, 0x45, 0x98, 0x0b, 0x46, 0x6c, 0x5d, 0x32, 0xea, 0x82, 0x29, - 0x62, 0xf6, 0x19, 0x48, 0x08, 0x3b, 0x90, 0xa9, 0x9a, 0x58, 0xa2, 0x6c, 0xb2, 0xc5, 0x76, 0xe4, - 0x64, 0x52, 0x49, 0xe8, 0xa2, 0xf2, 0x2e, 0x48, 0x69, 0x76, 0xd9, 0xdb, 0xc4, 0x8f, 0xcc, 0x44, - 0x4e, 0x26, 0x94, 0x61, 0xcd, 0x76, 0x37, 0x40, 0xe5, 0xcf, 0x46, 0x60, 0x34, 0x78, 0x08, 0x81, - 0x8a, 0x90, 0xa8, 0x1b, 0x15, 0x95, 0xba, 0x16, 0x3b, 0x01, 0x3b, 0xd9, 0xe3, 0xdc, 0x62, 0x76, - 0x91, 0xe3, 0x2b, 0x2e, 0x65, 0xf6, 0xb7, 0x25, 0x48, 0x08, 0x30, 0x3a, 0x0c, 0x31, 0x53, 0x75, - 0xb6, 0x29, 0xbb, 0x78, 0x21, 0x92, 0x96, 0x14, 0x5a, 0x26, 0x70, 0xdb, 0x54, 0x75, 0xea, 0x02, - 0x1c, 0x4e, 0xca, 0xa4, 0x5f, 0xeb, 0x58, 0xad, 0xd2, 0x45, 0x8f, 0xd1, 0x68, 0x60, 0xdd, 0xb1, - 0x45, 0xbf, 0x72, 0xf8, 0x1c, 0x07, 0xa3, 0x07, 0x61, 0xdc, 0xb1, 0x54, 0xad, 0x1e, 0xc0, 0x8d, - 0x51, 0xdc, 0xb4, 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 0x04, 0x43, 0xfc, 0x10, 0x19, - 0xa5, 0x21, 0xba, 0x83, 0xf7, 0x68, 0x3b, 0x29, 0x85, 0xfc, 0x44, 0xb3, 0x10, 0xa7, 0xc2, 0xf3, - 0x49, 0x23, 0x33, 0xdb, 0x22, 0xfd, 0x2c, 0x15, 0x52, 0x61, 0x68, 0xf2, 0x33, 0x90, 0x28, 0x1a, - 0x0d, 0x4d, 0x37, 0x82, 0xdc, 0x92, 0x8c, 0x1b, 0x95, 0xd9, 0x6c, 0xf2, 0x1c, 0x43, 0x61, 0x05, - 0x74, 0x18, 0x06, 0xd9, 0x9b, 0x08, 0x7e, 0x05, 0x85, 0x97, 0xe4, 0x39, 0x18, 0xa2, 0xbc, 0x57, - 0x4c, 0x84, 0xf8, 0x6b, 0x3a, 0xfe, 0xf8, 0x82, 0xa6, 0xa3, 0x9c, 0x7d, 0xc4, 0x13, 0x16, 0x41, - 0xac, 0xaa, 0x3a, 0x2a, 0xd7, 0x9b, 0xfe, 0x96, 0xdf, 0x02, 0x09, 0xce, 0xc4, 0x46, 0x67, 0x20, - 0x6a, 0x98, 0x36, 0xbf, 0x44, 0x92, 0xed, 0xa4, 0xca, 0x8a, 0x59, 0x88, 0x91, 0xec, 0x44, 0x21, - 0xc8, 0x05, 0xa5, 0x63, 0x20, 0x7d, 0xd2, 0x17, 0x48, 0x7d, 0x5d, 0xee, 0xfb, 0xc9, 0xba, 0xb4, - 0xc5, 0x1d, 0x5c, 0x67, 0xf9, 0x74, 0x04, 0xa6, 0x7c, 0xb5, 0x57, 0xb0, 0x65, 0x6b, 0x86, 0xce, - 0xe7, 0x70, 0xe6, 0x2d, 0xc8, 0x27, 0x24, 0xaf, 0xef, 0xe0, 0x2e, 0x6f, 0x86, 0x68, 0xde, 0x34, - 0x51, 0x16, 0x12, 0xb4, 0x5c, 0x31, 0x98, 0xbf, 0xc4, 0x14, 0xb7, 0x4c, 0xea, 0x6c, 0x63, 0xcb, - 0xb9, 0xaa, 0x5a, 0x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24, 0xa4, 0x29, 0x93, 0x8a, 0xd1, 0x68, 0x68, 0x0e, - 0xcb, 0xad, 0x06, 0xa9, 0xdd, 0x47, 0x09, 0x7c, 0x8e, 0x82, 0x69, 0x86, 0x75, 0x0c, 0x92, 0xf4, - 0x59, 0x16, 0x45, 0x61, 0x57, 0x90, 0x13, 0x04, 0x40, 0x2b, 0xef, 0x87, 0x31, 0x2f, 0x3e, 0x32, - 0x94, 0x04, 0xe3, 0xe2, 0x81, 0x29, 0xe2, 0x23, 0x30, 0xa9, 0xe3, 0x5d, 0x7a, 0x29, 0x3a, 0x80, - 0x9d, 0xa4, 0xd8, 0x88, 0xd4, 0x5d, 0x0e, 0x52, 0xdc, 0x0b, 0xa3, 0x15, 0x61, 0x7c, 0x86, 0x0b, - 0x14, 0x77, 0xc4, 0x85, 0x52, 0xb4, 0xa3, 0x90, 0x50, 0x4d, 0x93, 0x21, 0x0c, 0xf3, 0xf8, 0x68, - 0x9a, 0xb4, 0xea, 0x14, 0x8c, 0x53, 0x1d, 0x2d, 0x6c, 0x37, 0xeb, 0x0e, 0x67, 0x92, 0xa2, 0x38, - 0x63, 0xa4, 0x42, 0x61, 0x70, 0x8a, 0x7b, 0x37, 0x8c, 0xe0, 0x2b, 0x5a, 0x15, 0xeb, 0x15, 0xcc, - 0xf0, 0x46, 0x28, 0x5e, 0x4a, 0x00, 0x29, 0xd2, 0x03, 0xe0, 0xc6, 0xbd, 0xb2, 0x88, 0xc9, 0xa3, - 0x8c, 0x9f, 0x80, 0xe7, 0x19, 0x58, 0xce, 0x40, 0xac, 0xa8, 0x3a, 0x2a, 0x49, 0x30, 0x9c, 0x5d, - 0x36, 0xd1, 0xa4, 0x14, 0xf2, 0x53, 0x7e, 0x2d, 0x02, 0xb1, 0xcb, 0x86, 0x83, 0xd1, 0x63, 0xbe, - 0x04, 0x70, 0xb4, 0x9d, 0x3f, 0xaf, 0x69, 0x35, 0x1d, 0x57, 0x97, 0xec, 0x9a, 0xef, 0x1b, 0x0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0, 0x4b, 0x30, 0x16, - 0x4e, 0x1a, 0x3a, 0xe6, 0x82, 0xad, 0x33, 0x42, 0xe7, 0xf5, 0x5a, 0xe7, 0xd9, 0x03, 0xed, 0xc0, - 0x48, 0x70, 0xe6, 0x38, 0xd9, 0x85, 0x49, 0x00, 0x33, 0xfb, 0x48, 0xbf, 0x98, 0x6e, 0x63, 0xef, - 0x80, 0x84, 0x1b, 0xf4, 0xee, 0xee, 0x42, 0x2d, 0x90, 0x3a, 0x67, 0xb7, 0x6d, 0xc2, 0x0a, 0xb1, - 0x5e, 0x38, 0xa4, 0x74, 0xb3, 0x5e, 0x08, 0xb7, 0xab, 0xf5, 0x3a, 0x0d, 0xad, 0x4d, 0x00, 0xdf, - 0x38, 0xb8, 0xb7, 0x0b, 0x07, 0x0f, 0x2d, 0xfb, 0x70, 0x5f, 0x68, 0xee, 0xa1, 0xd3, 0x6d, 0x4e, - 0xc6, 0xff, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x8f, 0xbc, 0xb2, 0xb6, 0x97, 0x00, 0x00, ->>>>>>> upstream/master + 0x0c, 0xea, 0xba, 0x87, 0x96, 0xf9, 0xe2, 0xf7, 0xe8, 0xf4, 0xad, 0x8c, 0x73, 0x52, 0x52, 0xc7, + 0x56, 0x3a, 0x39, 0x05, 0x0e, 0x05, 0xf8, 0x31, 0x27, 0xc5, 0x56, 0x0f, 0x8e, 0xbf, 0xc5, 0x39, + 0x4e, 0xf8, 0x38, 0xae, 0x71, 0xd2, 0xdc, 0x1c, 0x8c, 0xec, 0x87, 0xd7, 0xbf, 0xe4, 0xbc, 0x52, + 0xd8, 0xcf, 0x64, 0x1e, 0xc6, 0x28, 0x93, 0x4a, 0xd3, 0x76, 0x8c, 0x06, 0x8d, 0x80, 0xdd, 0xd9, + 0xfc, 0xf6, 0xf7, 0x98, 0xd7, 0x8c, 0x12, 0xb2, 0x39, 0x97, 0x2a, 0x97, 0x03, 0x7a, 0x36, 0x56, + 0xc5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2d, 0x5c, 0xc3, 0xfa, 0x83, 0x3a, + 0x76, 0xae, 0x1a, 0xd6, 0x0e, 0x57, 0xef, 0x83, 0xac, 0xa9, 0x41, 0x76, 0x83, 0x19, 0xde, 0x1f, + 0x85, 0x29, 0x56, 0x71, 0x7a, 0x53, 0xb5, 0xf1, 0xe9, 0x2b, 0x0f, 0x6f, 0x62, 0x47, 0x7d, 0xf8, + 0x74, 0xc5, 0xd0, 0x74, 0x3e, 0x12, 0x13, 0x7c, 0x5c, 0x48, 0xfd, 0x2c, 0xaf, 0xcf, 0xb6, 0xdd, + 0xa6, 0x97, 0xe7, 0x21, 0x36, 0x67, 0x68, 0x3a, 0x9a, 0x84, 0x78, 0x15, 0xeb, 0x46, 0x83, 0xdf, + 0xb9, 0x63, 0x05, 0x74, 0x27, 0x0c, 0xaa, 0x0d, 0xa3, 0xa9, 0x3b, 0xec, 0x84, 0xa2, 0x30, 0xfc, + 0xf5, 0x1b, 0xd3, 0x03, 0x7f, 0x70, 0x63, 0x3a, 0xba, 0xa0, 0x3b, 0x0a, 0xaf, 0xca, 0xc5, 0x5e, + 0x7b, 0x65, 0x5a, 0x92, 0x9f, 0x82, 0xa1, 0x22, 0xae, 0x1c, 0x84, 0x57, 0x11, 0x57, 0x42, 0xbc, + 0xee, 0x83, 0xc4, 0x82, 0xee, 0xb0, 0x5b, 0x91, 0x27, 0x20, 0xaa, 0xe9, 0xec, 0xa2, 0x4d, 0xa8, + 0x7d, 0x02, 0x27, 0xa8, 0x45, 0x5c, 0x71, 0x51, 0xab, 0xb8, 0x12, 0x46, 0x25, 0xec, 0x09, 0xbc, + 0x50, 0xfc, 0xfd, 0xff, 0x34, 0x35, 0xf0, 0xd2, 0xab, 0x53, 0x03, 0x1d, 0x47, 0xc2, 0xef, 0x03, + 0x5c, 0xc5, 0x7c, 0x08, 0xec, 0xea, 0x0e, 0x3b, 0x23, 0x71, 0x87, 0xe1, 0x77, 0x06, 0x41, 0xe6, + 0x38, 0xb6, 0xa3,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0x8f, 0x52, 0x87, 0x4a, 0x10, 0x00, 0xbd, 0xfa, 0x3e, 0x09, 0x71, 0xb5, 0xc9, + 0xae, 0x72, 0x44, 0x89, 0xa7, 0xd1, 0x82, 0x7c, 0x09, 0x86, 0xf8, 0x81, 0x32, 0x4a, 0x43, 0x74, + 0x07, 0xef, 0xd1, 0x76, 0x52, 0x0a, 0xf9, 0x89, 0x66, 0x21, 0x4e, 0x85, 0xe7, 0x13, 0x48, 0x66, + 0xb6, 0x45, 0xfa, 0x59, 0x2a, 0xa4, 0xc2, 0xd0, 0xe4, 0xa7, 0x20, 0x51, 0x34, 0x1a, 0x9a, 0x6e, + 0x04, 0xb9, 0x25, 0x19, 0x37, 0x2a, 0xb3, 0xd9, 0xe4, 0xf9, 0x86, 0xc2, 0x0a, 0xe8, 0x30, 0x0c, + 0xb2, 0xf7, 0x11, 0xfc, 0x3a, 0x0a, 0x2f, 0xc9, 0x73, 0x30, 0x44, 0x79, 0xaf, 0x98, 0x08, 0xf1, + 0x97, 0x75, 0xfc, 0x21, 0x06, 0x4d, 0x4d, 0x39, 0xfb, 0x88, 0x27, 0x2c, 0x82, 0x58, 0x55, 0x75, + 0x54, 0xde, 0x6f, 0xfa, 0x5b, 0x7e, 0x0b, 0x24, 0x38, 0x13, 0x1b, 0x9d, 0x81, 0xa8, 0x61, 0xda, + 0xfc, 0x42, 0x49, 0xb6, 0x53, 0x57, 0x56, 0xcc, 0x42, 0x8c, 0x64, 0x2a, 0x0a, 0x41, 0x2e, 0x28, + 0x1d, 0x83, 0xea, 0xe3, 0xbe, 0xa0, 0xea, 0x1b, 0x72, 0xdf, 0x4f, 0x36, 0xa4, 0x2d, 0xe6, 0xe0, + 0x1a, 0xcb, 0xa7, 0x23, 0x30, 0xe5, 0xab, 0xbd, 0x82, 0x2d, 0x5b, 0x33, 0x74, 0x3e, 0x9f, 0x33, + 0x6b, 0x41, 0x3e, 0x21, 0x79, 0x7d, 0x07, 0x73, 0x79, 0x33, 0x44, 0xf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6a, 0x3b, 0x65, + 0x3a, 0x83, 0x91, 0xe6, 0xe3, 0x7c, 0xbd, 0xdd, 0xa2, 0x10, 0xae, 0x58, 0x2e, 0xfa, 0x30, 0xa1, + 0x62, 0xa0, 0x2a, 0x3a, 0x09, 0x69, 0xca, 0xa4, 0x62, 0x34, 0x1a, 0x9a, 0xc3, 0x72, 0xab, 0x41, + 0xaa, 0xf7, 0x51, 0x02, 0x9f, 0xa3, 0x60, 0x9a, 0x61, 0x1d, 0x83, 0x24, 0x7d, 0xa2, 0x45, 0x51, + 0xd8, 0x75, 0xe4, 0x04, 0x01, 0xd0, 0xca, 0x7b, 0x61, 0xcc, 0x8b, 0x8f, 0x0c, 0x25, 0xc1, 0xb8, + 0x78, 0x60, 0x8a, 0xf8, 0x10, 0x4c, 0xea, 0x78, 0x97, 0x5e, 0x90, 0x0e, 0x60, 0x27, 0x29, 0x36, + 0x22, 0x75, 0x97, 0x83, 0x14, 0x77, 0xc3, 0x68, 0x45, 0x28, 0x9f, 0xe1, 0x02, 0xc5, 0x1d, 0x71, + 0xa1, 0x14, 0xed, 0x28, 0x24, 0x54, 0xd3, 0x64, 0x08, 0xc3, 0x3c, 0x3e, 0x9a, 0x26, 0xad, 0x3a, + 0x05, 0xe3, 0xb4, 0x8f, 0x16, 0xb6, 0x9b, 0x75, 0x87, 0x33, 0x49, 0x51, 0x9c, 0x31, 0x52, 0xa1, + 0x30, 0x38, 0xc5, 0xbd, 0x13, 0x46, 0xf0, 0x15, 0xad, 0x8a, 0xf5, 0x0a, 0x66, 0x78, 0x23, 0x14, + 0x2f, 0x25, 0x80, 0x14, 0xe9, 0x3e, 0x70, 0xe3, 0x5e, 0x59, 0xc4, 0xe4, 0x51, 0xc6, 0x4f, 0xc0, + 0xf3, 0x0c, 0x2c, 0x67, 0x20, 0x56, 0x54, 0x1d, 0x95, 0x24, 0x18, 0xce, 0x2e, 0x9b, 0x68, 0x52, + 0x0a, 0xf9, 0x29, 0xbf, 0x16, 0x81, 0xd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, 0x76, 0x9b, 0x3e, 0xd1, 0x8f, 0x48, 0x89, 0x4d, 0x77, + 0xce, 0x26, 0xa4, 0x8d, 0x5f, 0x8c, 0x42, 0xa6, 0x13, 0x25, 0x9a, 0x83, 0xb1, 0x8a, 0x85, 0xd9, + 0xc5, 0x2b, 0xff, 0xce, 0x5f, 0x21, 0xeb, 0x65, 0x96, 0x21, 0x04, 0x59, 0x19, 0x15, 0x10, 0x3e, + 0x7b, 0xd4, 0x80, 0xa4, 0x7d, 0xc4, 0xec, 0xe8, 0xfd, 0xad, 0xfe, 0xf2, 0x3c, 0x99, 0x4f, 0x1f, + 0xa2, 0x91, 0x20, 0x03, 0x36, 0x7f, 0x8c, 0x7a, 0x50, 0x3a, 0x81, 0xbc, 0x00, 0x63, 0x9a, 0xae, + 0x39, 0x9a, 0x5a, 0x2f, 0x6f, 0xaa, 0x75, 0x55, 0xaf, 0x1c, 0x24, 0x6b, 0x66, 0x21, 0x9f, 0x37, + 0x1b, 0x62, 0x27, 0x2b, 0xa3, 0x1c, 0x52, 0x60, 0x00, 0x74, 0x11, 0x86, 0x44, 0x53, 0xb1, 0x03, + 0x65, 0x1b, 0x82, 0xdc, 0x97, 0xe0, 0xfd, 0x42, 0x14, 0xc6, 0x15, 0x5c, 0xfd, 0xff, 0x43, 0xb1, + 0xbf, 0xa1, 0x58, 0x02, 0x60, 0xee, 0x4e, 0x02, 0xec, 0x01, 0x46, 0x83, 0x04, 0x8c, 0x24, 0xe3, + 0x50, 0xb4, 0x1d, 0xdf, 0x78, 0xdc, 0x88, 0x40, 0xca, 0x3f, 0x1e, 0x7f, 0x41, 0x67, 0x25, 0xb4, + 0xe0, 0x45, 0xa2, 0x18, 0xff, 0xf4, 0x6e, 0x87, 0x48, 0xd4, 0x62, 0xbd, 0xdd, 0x43, 0xd0, 0x1f, + 0x47, 0x61, 0x70, 0x55, 0xb5, 0xd4, 0x86, 0x8d, 0x2a, 0x2d, 0x99, 0xa6, 0xd8, 0x7e, 0x6c, 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 0xd0, 0x00, 0x11, 0xd2, 0xa7, 0xbb, 0xf1, 0xb5, 0xd4, 0xfa, + 0xdc, 0x48, 0xda, 0xc7, 0x97, 0x7c, 0x42, 0x8f, 0x8a, 0xe4, 0xd7, 0x24, 0x18, 0x59, 0xb2, 0x6b, + 0x1b, 0x7a, 0xf5, 0xff, 0x79, 0xfb, 0xdd, 0x82, 0x43, 0x81, 0x9e, 0xde, 0x26, 0x95, 0x9e, 0x79, + 0x39, 0x06, 0xd1, 0x25, 0xbb, 0x86, 0x5e, 0x80, 0xb1, 0x70, 0xd2, 0xd0, 0x31, 0x17, 0x6c, 0x9d, + 0x11, 0x3a, 0xaf, 0xd7, 0x3a, 0xcf, 0x1e, 0x68, 0x07, 0x46, 0x82, 0x33, 0xc7, 0xc9, 0x2e, 0x4c, + 0x02, 0x98, 0xd9, 0x87, 0xfa, 0xc5, 0x74, 0x1b, 0x7b, 0x07, 0x24, 0xdc, 0xa0, 0x77, 0x67, 0x17, + 0x6a, 0x81, 0xd4, 0x39, 0xbb, 0x6d, 0x13, 0x56, 0x88, 0xf6, 0xc2, 0x21, 0xa5, 0x9b, 0xf6, 0x42, + 0xb8, 0x5d, 0xb5, 0xd7, 0xc9, 0xb5, 0x36, 0x01, 0x7c, 0x7e, 0x70, 0x77, 0x17, 0x0e, 0x1e, 0x5a, + 0xf6, 0xc1, 0xbe, 0xd0, 0xdc, 0x43, 0xa7, 0x5b, 0x9c, 0x8c, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xb5, 0x95, 0x49, 0x9c, 0x35, 0x98, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) From ca9bfbd7911e65a42b51a5dc47d2e265c78f2f8e Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Sun, 21 Mar 2021 18:39:23 -0400 Subject: [PATCH 15/23] fix merge conflicts --- x/staking/genesis_test.go | 14 --------- x/staking/keeper/validator_test.go | 49 +++++------------------------- x/staking/spec/08_params.md | 6 +--- 3 files changed, 8 insertions(+), 61 deletions(-) diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 7bb622326471..a77b3612398f 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -25,20 +25,6 @@ func bootstrapGenesisTest(numAddrs int) (*simapp.SimApp, sdk.Context, []sdk.AccA _, app, ctx := getBaseSimappWithCustomKeeper() addrDels, _ := generateAddresses(app, ctx, numAddrs, sdk.NewInt(10000)) -<<<<<<< HEAD - - amt := app.StakingKeeper.TokensFromConsensusPower(ctx, power) - totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) - - notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - err := app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), totalSupply) - require.NoError(t, err) - - app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - app.BankKeeper.SetSupply(ctx, banktypes.NewSupply(totalSupply)) - -======= ->>>>>>> upstream/master return app, ctx, addrDels } diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index c4715908a2fe..49b311d983dc 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -47,13 +47,8 @@ func initValidators(t testing.TB, power int64, numAddrs int, powers []int64) (*s vs := make([]types.Validator, len(powers)) for i, power := range powers { -<<<<<<< HEAD - vs[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) -======= vs[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), pks[i]) - tokens := sdk.TokensFromConsensusPower(power) ->>>>>>> upstream/master + tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) vs[i], _ = vs[i].AddTokensFromDel(tokens) } return app, ctx, addrs, valAddrs, vs @@ -118,17 +113,9 @@ func TestUpdateValidatorByPowerIndex(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) -<<<<<<< HEAD - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 1234)))) - require.NoError(t, err) - - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)))) - require.NoError(t, err) -======= - require.NoError(t, simapp.FundAccount(app, ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234))))) + require.NoError(t, simapp.FundAccount(app, ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 1234))))) - require.NoError(t, simapp.FundAccount(app, ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000))))) ->>>>>>> upstream/master + require.NoError(t, simapp.FundAccount(app, ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 10000))))) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) @@ -176,17 +163,9 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { app.StakingKeeper.SetParams(ctx, params) // create a random pool -<<<<<<< HEAD - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 1234)))) - require.NoError(t, err) + require.NoError(t, simapp.FundAccount(app, ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 1234))))) - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)))) - require.NoError(t, err) -======= - require.NoError(t, simapp.FundAccount(app, ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(1234))))) - - require.NoError(t, simapp.FundAccount(app, ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(10000))))) ->>>>>>> upstream/master + require.NoError(t, simapp.FundAccount(app, ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 10000))))) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) @@ -445,17 +424,9 @@ func TestGetValidatorSortingMixed(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) -<<<<<<< HEAD - err := app.BankKeeper.SetBalances(ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 501)))) - require.NoError(t, err) - - err = app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 0)))) - require.NoError(t, err) -======= - require.NoError(t, simapp.FundAccount(app, ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(501))))) + require.NoError(t, simapp.FundAccount(app, ctx, bondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 501))))) - require.NoError(t, simapp.FundAccount(app, ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.TokensFromConsensusPower(0))))) ->>>>>>> upstream/master + require.NoError(t, simapp.FundAccount(app, ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), app.StakingKeeper.TokensFromConsensusPower(ctx, 0))))) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) @@ -579,14 +550,8 @@ func TestGetValidatorsEdgeCases(t *testing.T) { validators[3], _ = validators[3].AddTokensFromDel(app.StakingKeeper.TokensFromConsensusPower(ctx, 1)) notBondedPool = app.StakingKeeper.GetNotBondedPool(ctx) -<<<<<<< HEAD newTokens = sdk.NewCoins(sdk.NewCoin(params.BondDenom, app.StakingKeeper.TokensFromConsensusPower(ctx, 1))) - balances = app.BankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) - require.NoError(t, app.BankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), balances.Add(newTokens...))) -======= - newTokens = sdk.NewCoins(sdk.NewCoin(params.BondDenom, sdk.TokensFromConsensusPower(1))) require.NoError(t, simapp.FundAccount(app, ctx, notBondedPool.GetAddress(), newTokens)) ->>>>>>> upstream/master app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) validators[3] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[3], true) diff --git a/x/staking/spec/08_params.md b/x/staking/spec/08_params.md index d70224c684c8..a7f2c592631e 100644 --- a/x/staking/spec/08_params.md +++ b/x/staking/spec/08_params.md @@ -12,9 +12,5 @@ The staking module contains the following parameters: | MaxValidators | uint16 | 100 | | KeyMaxEntries | uint16 | 7 | | HistoricalEntries | uint16 | 3 | -<<<<<<< HEAD -| BondDenom | string | "uatom" | -| PowerReduction | string | "1000000" | -======= | BondDenom | string | "stake" | ->>>>>>> upstream/master +| PowerReduction | string | "1000000" | From 83efad3c309203a1b85ba971b962eb5c0175da07 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Sun, 21 Mar 2021 19:18:46 -0400 Subject: [PATCH 16/23] fixing merge conflicts --- x/bank/types/balance_test.go | 4 ++-- x/feegrant/simulation/operations_test.go | 2 +- x/staking/legacy/v040/migrate.go | 1 + x/staking/legacy/v040/migrate_test.go | 1 + x/staking/legacy/v043/store_test.go | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/x/bank/types/balance_test.go b/x/bank/types/balance_test.go index 9736c847baa0..f328314910b7 100644 --- a/x/bank/types/balance_test.go +++ b/x/bank/types/balance_test.go @@ -106,7 +106,7 @@ func TestBalance_GetAddress(t *testing.T) { func TestSanitizeBalances(t *testing.T) { // 1. Generate balances - tokens := sdk.TokensFromConsensusPower(81) + tokens := sdk.TokensFromConsensusPower(81, sdk.DefaultPowerReduction) coin := sdk.NewCoin("benchcoin", tokens) coins := sdk.Coins{coin} addrs, _ := makeRandomAddressesAndPublicKeys(20) @@ -158,7 +158,7 @@ func BenchmarkSanitizeBalances1000(b *testing.B) { func benchmarkSanitizeBalances(b *testing.B, nAddresses int) { b.ReportAllocs() - tokens := sdk.TokensFromConsensusPower(81) + tokens := sdk.TokensFromConsensusPower(81, sdk.DefaultPowerReduction) coin := sdk.NewCoin("benchcoin", tokens) coins := sdk.Coins{coin} addrs, _ := makeRandomAddressesAndPublicKeys(nAddresses) diff --git a/x/feegrant/simulation/operations_test.go b/x/feegrant/simulation/operations_test.go index 5d6560b26c25..d9c0fffaebd7 100644 --- a/x/feegrant/simulation/operations_test.go +++ b/x/feegrant/simulation/operations_test.go @@ -39,7 +39,7 @@ func (suite *SimTestSuite) SetupTest() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200) + initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) // add coins to the accounts diff --git a/x/staking/legacy/v040/migrate.go b/x/staking/legacy/v040/migrate.go index b0746fa363a4..1ade9288ece1 100644 --- a/x/staking/legacy/v040/migrate.go +++ b/x/staking/legacy/v040/migrate.go @@ -129,6 +129,7 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { MaxEntries: uint32(stakingState.Params.MaxEntries), HistoricalEntries: uint32(stakingState.Params.HistoricalEntries), BondDenom: stakingState.Params.BondDenom, + PowerReduction: v040staking.DefaultParams().PowerReduction, }, LastTotalPower: stakingState.LastTotalPower, LastValidatorPowers: newLastValidatorPowers, diff --git a/x/staking/legacy/v040/migrate_test.go b/x/staking/legacy/v040/migrate_test.go index 2be5e80dbc31..16bb4374b503 100644 --- a/x/staking/legacy/v040/migrate_test.go +++ b/x/staking/legacy/v040/migrate_test.go @@ -55,6 +55,7 @@ func TestMigrate(t *testing.T) { "historical_entries": 0, "max_entries": 0, "max_validators": 0, + "power_reduction": "1000000", "unbonding_time": "0s" }, "redelegations": [], diff --git a/x/staking/legacy/v043/store_test.go b/x/staking/legacy/v043/store_test.go index 0abe8f3b1e86..32b6bb181e05 100644 --- a/x/staking/legacy/v043/store_test.go +++ b/x/staking/legacy/v043/store_test.go @@ -61,7 +61,7 @@ func TestStoreMigration(t *testing.T) { { "ValidatorsByPowerIndexKey", v040staking.GetValidatorsByPowerIndexKey(val), - types.GetValidatorsByPowerIndexKey(val), + types.GetValidatorsByPowerIndexKey(val, sdk.DefaultPowerReduction), }, { "DelegationKey", From b54e2763db61d6c1811c8279ed926bcc2e0f8225 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Sun, 21 Mar 2021 20:29:39 -0400 Subject: [PATCH 17/23] simply default power reduction definition --- types/staking.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/types/staking.go b/types/staking.go index 563f94176ce9..2f17bb1dd85f 100644 --- a/types/staking.go +++ b/types/staking.go @@ -1,9 +1,5 @@ package types -import ( - "math/big" -) - // staking constants const ( @@ -23,7 +19,7 @@ const ( ) // DefaultPowerReduction is the default amount of staking tokens required for 1 unit of consensus-engine power -var DefaultPowerReduction = NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(6), nil)) +var DefaultPowerReduction = NewIntFromUint64(1000000) // TokensToConsensusPower - convert input tokens to potential consensus-engine power func TokensToConsensusPower(tokens Int, powerReduction Int) int64 { From babe920e072a766b97edcf8b6136e43dadb1b82f Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Mon, 22 Mar 2021 12:14:14 -0400 Subject: [PATCH 18/23] added CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 551ab5614ebf..1c2a973c3092 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/bank) [\#8656](https://github.com/cosmos/cosmos-sdk/pull/8656) balance and supply are now correctly tracked via `coin_spent`, `coin_received`, `coinbase` and `burn` events. * (x/bank) [\#8517](https://github.com/cosmos/cosmos-sdk/pull/8517) Supply is now stored and tracked as `sdk.Coins` * (store) [\#8790](https://github.com/cosmos/cosmos-sdk/pull/8790) Reduce gas costs by 10x for transient store operations. +* (x/staking) [\#8505](https://github.com/cosmos/cosmos-sdk/pull/8505) Convert staking power reduction into an on-chain parameter rather than a hardcoded in-code variable. ### Improvements From aee3ca8c20d0a88ab80027d6525942398a2c76df Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Wed, 7 Apr 2021 13:59:42 -0400 Subject: [PATCH 19/23] fix merge conflict --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bad3a5bbf5e8..89b3583e7f67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,11 +89,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/bank) [\#8656](https://github.com/cosmos/cosmos-sdk/pull/8656) balance and supply are now correctly tracked via `coin_spent`, `coin_received`, `coinbase` and `burn` events. * (x/bank) [\#8517](https://github.com/cosmos/cosmos-sdk/pull/8517) Supply is now stored and tracked as `sdk.Coins` * (store) [\#8790](https://github.com/cosmos/cosmos-sdk/pull/8790) Reduce gas costs by 10x for transient store operations. -<<<<<<< HEAD * (x/staking) [\#8505](https://github.com/cosmos/cosmos-sdk/pull/8505) Convert staking power reduction into an on-chain parameter rather than a hardcoded in-code variable. -======= * (x/bank) [\#9051](https://github.com/cosmos/cosmos-sdk/pull/9051) Supply value is stored as `sdk.Int` rather than `string`. ->>>>>>> master ### Improvements From 04e483dd693a9b7f64dc51117b4b634673874370 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Wed, 7 Apr 2021 19:56:39 -0400 Subject: [PATCH 20/23] fixed migrations --- x/staking/keeper/migrations.go | 2 +- x/staking/legacy/v040/genesis.pb.go | 945 ++++ x/staking/legacy/v040/migrate.go | 50 +- x/staking/legacy/v040/migrate_test.go | 1 - x/staking/legacy/v040/staking.pb.go | 6526 +++++++++++++++++++++++++ x/staking/legacy/v040/types.go | 201 + x/staking/legacy/v043/json.go | 138 + x/staking/legacy/v043/json_test.go | 67 + x/staking/legacy/v043/store.go | 14 +- x/staking/legacy/v043/store_test.go | 14 +- x/staking/types/params.go | 4 +- 11 files changed, 7927 insertions(+), 35 deletions(-) create mode 100644 x/staking/legacy/v040/genesis.pb.go create mode 100644 x/staking/legacy/v040/staking.pb.go create mode 100644 x/staking/legacy/v040/types.go create mode 100644 x/staking/legacy/v043/json.go create mode 100644 x/staking/legacy/v043/json_test.go diff --git a/x/staking/keeper/migrations.go b/x/staking/keeper/migrations.go index 101ca195b390..859344918173 100644 --- a/x/staking/keeper/migrations.go +++ b/x/staking/keeper/migrations.go @@ -17,5 +17,5 @@ func NewMigrator(keeper Keeper) Migrator { // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v043.MigrateStore(ctx, m.keeper.storeKey) + return v043.MigrateStore(ctx, m.keeper.storeKey, m.keeper.paramstore) } diff --git a/x/staking/legacy/v040/genesis.pb.go b/x/staking/legacy/v040/genesis.pb.go new file mode 100644 index 000000000000..04644e17ea64 --- /dev/null +++ b/x/staking/legacy/v040/genesis.pb.go @@ -0,0 +1,945 @@ +// Package v040 is taken from: +// https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/x/staking/types/genesis.pb.go +// by copy-pasted only the relevants parts for Genesis. +//nolint + +package v040 + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the staking module's genesis state. +type GenesisState struct { + // params defines all the paramaters of related to deposit. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // last_total_power tracks the total amounts of bonded tokens recorded during + // the previous end block. + LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=last_total_power,json=lastTotalPower,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_total_power" yaml:"last_total_power"` + // last_validator_powers is a special index that provides a historical list + // of the last-block's bonded validators. + LastValidatorPowers []LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers" yaml:"last_validator_powers"` + // delegations defines the validator set at genesis. + Validators []Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"` + // delegations defines the delegations active at genesis. + Delegations []Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations"` + // unbonding_delegations defines the unbonding delegations active at genesis. + UnbondingDelegations []UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations" yaml:"unbonding_delegations"` + // redelegations defines the redelegations active at genesis. + Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"` + Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_9b3dec8894f2831b, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetLastValidatorPowers() []LastValidatorPower { + if m != nil { + return m.LastValidatorPowers + } + return nil +} + +func (m *GenesisState) GetValidators() []Validator { + if m != nil { + return m.Validators + } + return nil +} + +func (m *GenesisState) GetDelegations() []Delegation { + if m != nil { + return m.Delegations + } + return nil +} + +func (m *GenesisState) GetUnbondingDelegations() []UnbondingDelegation { + if m != nil { + return m.UnbondingDelegations + } + return nil +} + +func (m *GenesisState) GetRedelegations() []Redelegation { + if m != nil { + return m.Redelegations + } + return nil +} + +func (m *GenesisState) GetExported() bool { + if m != nil { + return m.Exported + } + return false +} + +// LastValidatorPower required for validator set update logic. +type LastValidatorPower struct { + // address is the address of the validator. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // power defines the power of the validator. + Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` +} + +func (m *LastValidatorPower) Reset() { *m = LastValidatorPower{} } +func (m *LastValidatorPower) String() string { return proto.CompactTextString(m) } +func (*LastValidatorPower) ProtoMessage() {} +func (*LastValidatorPower) Descriptor() ([]byte, []int) { + return fileDescriptor_9b3dec8894f2831b, []int{1} +} +func (m *LastValidatorPower) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastValidatorPower) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastValidatorPower.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LastValidatorPower) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastValidatorPower.Merge(m, src) +} +func (m *LastValidatorPower) XXX_Size() int { + return m.Size() +} +func (m *LastValidatorPower) XXX_DiscardUnknown() { + xxx_messageInfo_LastValidatorPower.DiscardUnknown(m) +} + +var xxx_messageInfo_LastValidatorPower proto.InternalMessageInfo + +func init() { + // proto.RegisterType((*GenesisState)(nil), "cosmos.staking.v1beta1.GenesisState") + // proto.RegisterType((*LastValidatorPower)(nil), "cosmos.staking.v1beta1.LastValidatorPower") +} + +func init() { + // proto.RegisterFile("cosmos/staking/v1beta1/genesis.proto", fileDescriptor_9b3dec8894f2831b) +} + +var fileDescriptor_9b3dec8894f2831b = []byte{ + // 493 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xc7, 0x7d, 0xa4, 0x49, 0xc3, 0xa5, 0x20, 0x74, 0xa4, 0x60, 0x45, 0xc8, 0x0e, 0x56, 0x84, + 0x22, 0x5e, 0x6c, 0xb5, 0x6c, 0x15, 0x53, 0x84, 0xa8, 0x8a, 0x10, 0x8a, 0x8e, 0x97, 0x81, 0x25, + 0xba, 0xd4, 0x27, 0x63, 0xd5, 0xf1, 0x59, 0x7e, 0x2e, 0xa5, 0xdd, 0x11, 0x62, 0xe4, 0x23, 0xf4, + 0xe3, 0x74, 0xec, 0xc0, 0x80, 0x18, 0x2c, 0x94, 0x2c, 0xcc, 0xfd, 0x04, 0xc8, 0xe7, 0x17, 0x4c, + 0x52, 0x33, 0x25, 0x77, 0xfa, 0xfd, 0x7f, 0x7f, 0xfb, 0xfc, 0x1c, 0x1e, 0x1c, 0x0a, 0x98, 0x09, + 0x70, 0x40, 0xb2, 0x23, 0x3f, 0xf4, 0x9c, 0xe3, 0x9d, 0x29, 0x97, 0x6c, 0xc7, 0xf1, 0x78, 0xc8, + 0xc1, 0x07, 0x3b, 0x8a, 0x85, 0x14, 0xe4, 0x4e, 0x46, 0xd9, 0x39, 0x65, 0xe7, 0x54, 0xaf, 0xeb, + 0x09, 0x4f, 0x28, 0xc4, 0x49, 0xff, 0x65, 0x74, 0xaf, 0xce, 0x59, 0xa4, 0x15, 0x65, 0x7d, 0x6f, + 0xe2, 0xad, 0xfd, 0xac, 0xe5, 0x8d, 0x64, 0x92, 0x93, 0x67, 0xb8, 0x15, 0xb1, 0x98, 0xcd, 0x40, + 0x47, 0x7d, 0x34, 0xec, 0xec, 0x1a, 0xf6, 0xd5, 0xad, 0xf6, 0x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+ 0xb4, 0x8f, 0xea, 0xb4, 0xef, 0x8a, 0x50, 0xc5, 0xbf, 0x72, 0x38, 0x57, 0x7a, 0x2d, 0xda, 0x9d, + 0xaf, 0x47, 0x81, 0x8c, 0xf1, 0x8d, 0x98, 0x57, 0xfb, 0x37, 0x55, 0xff, 0xa0, 0xae, 0x9f, 0x56, + 0xe0, 0xfc, 0xc5, 0xfe, 0x15, 0x90, 0x1e, 0x6e, 0xf3, 0x93, 0x48, 0xc4, 0x92, 0xbb, 0x7a, 0xbb, + 0x8f, 0x86, 0x6d, 0x5a, 0xae, 0xad, 0xd7, 0x98, 0xac, 0x7f, 0x5c, 0xa2, 0xe3, 0x4d, 0xe6, 0xba, + 0x31, 0x87, 0x6c, 0xb8, 0xaf, 0xd3, 0x62, 0x49, 0xba, 0xb8, 0xf9, 0x77, 0x58, 0x1b, 0x34, 0x5b, + 0xec, 0xb5, 0xbf, 0x9e, 0x99, 0xda, 0xef, 0x33, 0x53, 0x1b, 0xbd, 0x38, 0x5f, 0x18, 0xe8, 0x62, + 0x61, 0xa0, 0x5f, 0x0b, 0x03, 0x7d, 0x5b, 0x1a, 0xda, 0xc5, 0xd2, 0xd0, 0x7e, 0x2c, 0x0d, 0xed, + 0xc3, 0xe3, 0xff, 0xce, 0xf3, 0x49, 0x79, 0xfd, 0xd4, 0x64, 0x4f, 0x5b, 0xea, 0xd6, 0x3d, 0xfd, + 0x13, 0x00, 0x00, 0xff, 0xff, 0xff, 0x85, 0xad, 0xc8, 0xf1, 0x03, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exported { + i-- + if m.Exported { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.Redelegations) > 0 { + for iNdEx := len(m.Redelegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Redelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.UnbondingDelegations) > 0 { + for iNdEx := len(m.UnbondingDelegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.Delegations) > 0 { + for iNdEx := len(m.Delegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Delegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.LastValidatorPowers) > 0 { + for iNdEx := len(m.LastValidatorPowers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LastValidatorPowers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size := m.LastTotalPower.Size() + i -= size + if _, err := m.LastTotalPower.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *LastValidatorPower) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LastValidatorPower) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastValidatorPower) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Power != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Power)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.LastTotalPower.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.LastValidatorPowers) > 0 { + for _, e := range m.LastValidatorPowers { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Validators) > 0 { + for _, e := range m.Validators { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Delegations) > 0 { + for _, e := range m.Delegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.UnbondingDelegations) > 0 { + for _, e := range m.UnbondingDelegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Redelegations) > 0 { + for _, e := range m.Redelegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.Exported { + n += 2 + } + return n +} + +func (m *LastValidatorPower) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Power != 0 { + n += 1 + sovGenesis(uint64(m.Power)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTotalPower", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTotalPower.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastValidatorPowers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastValidatorPowers = append(m.LastValidatorPowers, LastValidatorPower{}) + if err := m.LastValidatorPowers[len(m.LastValidatorPowers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validators = append(m.Validators, Validator{}) + if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Delegations = append(m.Delegations, Delegation{}) + if err := m.Delegations[len(m.Delegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnbondingDelegations = append(m.UnbondingDelegations, UnbondingDelegation{}) + if err := m.UnbondingDelegations[len(m.UnbondingDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Redelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Redelegations = append(m.Redelegations, Redelegation{}) + if err := m.Redelegations[len(m.Redelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exported", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exported = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LastValidatorPower: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastValidatorPower: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + } + m.Power = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Power |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/staking/legacy/v040/migrate.go b/x/staking/legacy/v040/migrate.go index 1ade9288ece1..a0d9b4c90378 100644 --- a/x/staking/legacy/v040/migrate.go +++ b/x/staking/legacy/v040/migrate.go @@ -6,19 +6,18 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" - v040staking "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func migrateBondStatus(oldStatus v034staking.BondStatus) v040staking.BondStatus { +func migrateBondStatus(oldStatus v034staking.BondStatus) BondStatus { switch oldStatus { case v034staking.Unbonded: - return v040staking.Unbonded + return Unbonded case v034staking.Unbonding: - return v040staking.Unbonding + return Unbonding case v034staking.Bonded: - return v040staking.Bonded + return Bonded default: panic(fmt.Errorf("invalid bond status %d", oldStatus)) @@ -31,29 +30,29 @@ func migrateBondStatus(oldStatus v034staking.BondStatus) v040staking.BondStatus // - Convert addresses from bytes to bech32 strings. // - Update BondStatus staking constants. // - Re-encode in v0.40 GenesisState. -func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { - newLastValidatorPowers := make([]v040staking.LastValidatorPower, len(stakingState.LastValidatorPowers)) +func Migrate(stakingState v038staking.GenesisState) *GenesisState { + newLastValidatorPowers := make([]LastValidatorPower, len(stakingState.LastValidatorPowers)) for i, oldLastValidatorPower := range stakingState.LastValidatorPowers { - newLastValidatorPowers[i] = v040staking.LastValidatorPower{ + newLastValidatorPowers[i] = LastValidatorPower{ Address: oldLastValidatorPower.Address.String(), Power: oldLastValidatorPower.Power, } } - newValidators := make([]v040staking.Validator, len(stakingState.Validators)) + newValidators := make([]Validator, len(stakingState.Validators)) for i, oldValidator := range stakingState.Validators { pkAny, err := codectypes.NewAnyWithValue(oldValidator.ConsPubKey) if err != nil { panic(fmt.Sprintf("Can't pack validator consensus PK as Any: %s", err)) } - newValidators[i] = v040staking.Validator{ + newValidators[i] = Validator{ OperatorAddress: oldValidator.OperatorAddress.String(), ConsensusPubkey: pkAny, Jailed: oldValidator.Jailed, Status: migrateBondStatus(oldValidator.Status), Tokens: oldValidator.Tokens, DelegatorShares: oldValidator.DelegatorShares, - Description: v040staking.Description{ + Description: Description{ Moniker: oldValidator.Description.Moniker, Identity: oldValidator.Description.Identity, Website: oldValidator.Description.Website, @@ -62,8 +61,8 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { }, UnbondingHeight: oldValidator.UnbondingHeight, UnbondingTime: oldValidator.UnbondingCompletionTime, - Commission: v040staking.Commission{ - CommissionRates: v040staking.CommissionRates{ + Commission: Commission{ + CommissionRates: CommissionRates{ Rate: oldValidator.Commission.Rate, MaxRate: oldValidator.Commission.MaxRate, MaxChangeRate: oldValidator.Commission.MaxChangeRate, @@ -74,20 +73,20 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - newDelegations := make([]v040staking.Delegation, len(stakingState.Delegations)) + newDelegations := make([]Delegation, len(stakingState.Delegations)) for i, oldDelegation := range stakingState.Delegations { - newDelegations[i] = v040staking.Delegation{ + newDelegations[i] = Delegation{ DelegatorAddress: oldDelegation.DelegatorAddress.String(), ValidatorAddress: oldDelegation.ValidatorAddress.String(), Shares: oldDelegation.Shares, } } - newUnbondingDelegations := make([]v040staking.UnbondingDelegation, len(stakingState.UnbondingDelegations)) + newUnbondingDelegations := make([]UnbondingDelegation, len(stakingState.UnbondingDelegations)) for i, oldUnbondingDelegation := range stakingState.UnbondingDelegations { - newEntries := make([]v040staking.UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) + newEntries := make([]UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) for j, oldEntry := range oldUnbondingDelegation.Entries { - newEntries[j] = v040staking.UnbondingDelegationEntry{ + newEntries[j] = UnbondingDelegationEntry{ CreationHeight: oldEntry.CreationHeight, CompletionTime: oldEntry.CompletionTime, InitialBalance: oldEntry.InitialBalance, @@ -95,18 +94,18 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - newUnbondingDelegations[i] = v040staking.UnbondingDelegation{ + newUnbondingDelegations[i] = UnbondingDelegation{ DelegatorAddress: oldUnbondingDelegation.DelegatorAddress.String(), ValidatorAddress: oldUnbondingDelegation.ValidatorAddress.String(), Entries: newEntries, } } - newRedelegations := make([]v040staking.Redelegation, len(stakingState.Redelegations)) + newRedelegations := make([]Redelegation, len(stakingState.Redelegations)) for i, oldRedelegation := range stakingState.Redelegations { - newEntries := make([]v040staking.RedelegationEntry, len(oldRedelegation.Entries)) + newEntries := make([]RedelegationEntry, len(oldRedelegation.Entries)) for j, oldEntry := range oldRedelegation.Entries { - newEntries[j] = v040staking.RedelegationEntry{ + newEntries[j] = RedelegationEntry{ CreationHeight: oldEntry.CreationHeight, CompletionTime: oldEntry.CompletionTime, InitialBalance: oldEntry.InitialBalance, @@ -114,7 +113,7 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - newRedelegations[i] = v040staking.Redelegation{ + newRedelegations[i] = Redelegation{ DelegatorAddress: oldRedelegation.DelegatorAddress.String(), ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress.String(), ValidatorDstAddress: oldRedelegation.ValidatorDstAddress.String(), @@ -122,14 +121,13 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState { } } - return &v040staking.GenesisState{ - Params: v040staking.Params{ + return &GenesisState{ + Params: Params{ UnbondingTime: stakingState.Params.UnbondingTime, MaxValidators: uint32(stakingState.Params.MaxValidators), MaxEntries: uint32(stakingState.Params.MaxEntries), HistoricalEntries: uint32(stakingState.Params.HistoricalEntries), BondDenom: stakingState.Params.BondDenom, - PowerReduction: v040staking.DefaultParams().PowerReduction, }, LastTotalPower: stakingState.LastTotalPower, LastValidatorPowers: newLastValidatorPowers, diff --git a/x/staking/legacy/v040/migrate_test.go b/x/staking/legacy/v040/migrate_test.go index 16bb4374b503..2be5e80dbc31 100644 --- a/x/staking/legacy/v040/migrate_test.go +++ b/x/staking/legacy/v040/migrate_test.go @@ -55,7 +55,6 @@ func TestMigrate(t *testing.T) { "historical_entries": 0, "max_entries": 0, "max_validators": 0, - "power_reduction": "1000000", "unbonding_time": "0s" }, "redelegations": [], diff --git a/x/staking/legacy/v040/staking.pb.go b/x/staking/legacy/v040/staking.pb.go new file mode 100644 index 000000000000..71ae65fe3a4e --- /dev/null +++ b/x/staking/legacy/v040/staking.pb.go @@ -0,0 +1,6526 @@ +// Package v040 is taken from: +// https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/x/staking/types/staking.pb.go +//nolint + +package v040 + +import ( + bytes "bytes" + compress_gzip "compress/gzip" + fmt "fmt" + io "io" + io_ioutil "io/ioutil" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" + time "time" + + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types2 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/golang/protobuf/ptypes/timestamp" + _ "github.com/regen-network/cosmos-proto" + types "github.com/tendermint/tendermint/proto/tendermint/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// BondStatus is the status of a validator. +type BondStatus int32 + +const ( + // UNSPECIFIED defines an invalid validator status. + Unspecified BondStatus = 0 + // UNBONDED defines a validator that is not bonded. + Unbonded BondStatus = 1 + // UNBONDING defines a validator that is unbonding. + Unbonding BondStatus = 2 + // BONDED defines a validator that is bonded. + Bonded BondStatus = 3 +) + +var BondStatus_name = map[int32]string{ + 0: "BOND_STATUS_UNSPECIFIED", + 1: "BOND_STATUS_UNBONDED", + 2: "BOND_STATUS_UNBONDING", + 3: "BOND_STATUS_BONDED", +} + +var BondStatus_value = map[string]int32{ + "BOND_STATUS_UNSPECIFIED": 0, + "BOND_STATUS_UNBONDED": 1, + "BOND_STATUS_UNBONDING": 2, + "BOND_STATUS_BONDED": 3, +} + +func (x BondStatus) String() string { + return proto.EnumName(BondStatus_name, int32(x)) +} + +func (BondStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{0} +} + +// HistoricalInfo contains header and validator information for a given block. +// It is stored as part of staking module's state, which persists the `n` most +// recent HistoricalInfo +// (`n` is set by the staking module's `historical_entries` parameter). +type HistoricalInfo struct { + Header types.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` + Valset []Validator `protobuf:"bytes,2,rep,name=valset,proto3" json:"valset"` +} + +func (m *HistoricalInfo) Reset() { *m = HistoricalInfo{} } +func (m *HistoricalInfo) String() string { return proto.CompactTextString(m) } +func (*HistoricalInfo) ProtoMessage() {} +func (*HistoricalInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{0} +} +func (m *HistoricalInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HistoricalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HistoricalInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HistoricalInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_HistoricalInfo.Merge(m, src) +} +func (m *HistoricalInfo) XXX_Size() int { + return m.Size() +} +func (m *HistoricalInfo) XXX_DiscardUnknown() { + xxx_messageInfo_HistoricalInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_HistoricalInfo proto.InternalMessageInfo + +func (m *HistoricalInfo) GetHeader() types.Header { + if m != nil { + return m.Header + } + return types.Header{} +} + +func (m *HistoricalInfo) GetValset() []Validator { + if m != nil { + return m.Valset + } + return nil +} + +// CommissionRates defines the initial commission rates to be used for creating +// a validator. +type CommissionRates struct { + Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` + MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` +} + +func (m *CommissionRates) Reset() { *m = CommissionRates{} } +func (*CommissionRates) ProtoMessage() {} +func (*CommissionRates) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{1} +} +func (m *CommissionRates) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommissionRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommissionRates.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CommissionRates) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommissionRates.Merge(m, src) +} +func (m *CommissionRates) XXX_Size() int { + return m.Size() +} +func (m *CommissionRates) XXX_DiscardUnknown() { + xxx_messageInfo_CommissionRates.DiscardUnknown(m) +} + +var xxx_messageInfo_CommissionRates proto.InternalMessageInfo + +// Commission defines commission parameters for a given validator. +type Commission struct { + CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` + UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` +} + +func (m *Commission) Reset() { *m = Commission{} } +func (*Commission) ProtoMessage() {} +func (*Commission) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{2} +} +func (m *Commission) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Commission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Commission.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Commission) XXX_Merge(src proto.Message) { + xxx_messageInfo_Commission.Merge(m, src) +} +func (m *Commission) XXX_Size() int { + return m.Size() +} +func (m *Commission) XXX_DiscardUnknown() { + xxx_messageInfo_Commission.DiscardUnknown(m) +} + +var xxx_messageInfo_Commission proto.InternalMessageInfo + +func (m *Commission) GetUpdateTime() time.Time { + if m != nil { + return m.UpdateTime + } + return time.Time{} +} + +// Description defines a validator description. +type Description struct { + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty" yaml:"security_contact"` + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (m *Description) Reset() { *m = Description{} } +func (*Description) ProtoMessage() {} +func (*Description) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{3} +} +func (m *Description) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Description.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Description) XXX_Merge(src proto.Message) { + xxx_messageInfo_Description.Merge(m, src) +} +func (m *Description) XXX_Size() int { + return m.Size() +} +func (m *Description) XXX_DiscardUnknown() { + xxx_messageInfo_Description.DiscardUnknown(m) +} + +var xxx_messageInfo_Description proto.InternalMessageInfo + +func (m *Description) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *Description) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +func (m *Description) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +func (m *Description) GetSecurityContact() string { + if m != nil { + return m.SecurityContact + } + return "" +} + +func (m *Description) GetDetails() string { + if m != nil { + return m.Details + } + return "" +} + +// Validator defines a validator, together with the total amount of the +// Validator's bond shares and their exchange rate to coins. Slashing results in +// a decrease in the exchange rate, allowing correct calculation of future +// undelegations without iterating over delegators. When coins are delegated to +// this validator, the validator is credited with a delegation whose number of +// bond shares is based on the amount of coins delegated divided by the current +// exchange rate. Voting power can be calculated as total bonded shares +// multiplied by exchange rate. +type Validator struct { + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` + ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` + DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` + UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` + UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` + Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` +} + +func (m *Validator) Reset() { *m = Validator{} } +func (*Validator) ProtoMessage() {} +func (*Validator) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{4} +} +func (m *Validator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Validator.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Validator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validator.Merge(m, src) +} +func (m *Validator) XXX_Size() int { + return m.Size() +} +func (m *Validator) XXX_DiscardUnknown() { + xxx_messageInfo_Validator.DiscardUnknown(m) +} + +var xxx_messageInfo_Validator proto.InternalMessageInfo + +// ValAddresses defines a repeated set of validator addresses. +type ValAddresses struct { + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` +} + +func (m *ValAddresses) Reset() { *m = ValAddresses{} } +func (*ValAddresses) ProtoMessage() {} +func (*ValAddresses) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{5} +} +func (m *ValAddresses) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValAddresses.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValAddresses) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValAddresses.Merge(m, src) +} +func (m *ValAddresses) XXX_Size() int { + return m.Size() +} +func (m *ValAddresses) XXX_DiscardUnknown() { + xxx_messageInfo_ValAddresses.DiscardUnknown(m) +} + +var xxx_messageInfo_ValAddresses proto.InternalMessageInfo + +func (m *ValAddresses) GetAddresses() []string { + if m != nil { + return m.Addresses + } + return nil +} + +// DVPair is struct that just has a delegator-validator pair with no other data. +// It is intended to be used as a marshalable pointer. For example, a DVPair can +// be used to construct the key to getting an UnbondingDelegation from state. +type DVPair struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` +} + +func (m *DVPair) Reset() { *m = DVPair{} } +func (*DVPair) ProtoMessage() {} +func (*DVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{6} +} +func (m *DVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVPair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVPair.Merge(m, src) +} +func (m *DVPair) XXX_Size() int { + return m.Size() +} +func (m *DVPair) XXX_DiscardUnknown() { + xxx_messageInfo_DVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_DVPair proto.InternalMessageInfo + +// DVPairs defines an array of DVPair objects. +type DVPairs struct { + Pairs []DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` +} + +func (m *DVPairs) Reset() { *m = DVPairs{} } +func (m *DVPairs) String() string { return proto.CompactTextString(m) } +func (*DVPairs) ProtoMessage() {} +func (*DVPairs) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{7} +} +func (m *DVPairs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVPairs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVPairs) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVPairs.Merge(m, src) +} +func (m *DVPairs) XXX_Size() int { + return m.Size() +} +func (m *DVPairs) XXX_DiscardUnknown() { + xxx_messageInfo_DVPairs.DiscardUnknown(m) +} + +var xxx_messageInfo_DVPairs proto.InternalMessageInfo + +func (m *DVPairs) GetPairs() []DVPair { + if m != nil { + return m.Pairs + } + return nil +} + +// DVVTriplet is struct that just has a delegator-validator-validator triplet +// with no other data. It is intended to be used as a marshalable pointer. For +// example, a DVVTriplet can be used to construct the key to getting a +// Redelegation from state. +type DVVTriplet struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` + ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` +} + +func (m *DVVTriplet) Reset() { *m = DVVTriplet{} } +func (*DVVTriplet) ProtoMessage() {} +func (*DVVTriplet) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{8} +} +func (m *DVVTriplet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVVTriplet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVVTriplet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVVTriplet) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVVTriplet.Merge(m, src) +} +func (m *DVVTriplet) XXX_Size() int { + return m.Size() +} +func (m *DVVTriplet) XXX_DiscardUnknown() { + xxx_messageInfo_DVVTriplet.DiscardUnknown(m) +} + +var xxx_messageInfo_DVVTriplet proto.InternalMessageInfo + +// DVVTriplets defines an array of DVVTriplet objects. +type DVVTriplets struct { + Triplets []DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets"` +} + +func (m *DVVTriplets) Reset() { *m = DVVTriplets{} } +func (m *DVVTriplets) String() string { return proto.CompactTextString(m) } +func (*DVVTriplets) ProtoMessage() {} +func (*DVVTriplets) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{9} +} +func (m *DVVTriplets) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DVVTriplets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DVVTriplets.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DVVTriplets) XXX_Merge(src proto.Message) { + xxx_messageInfo_DVVTriplets.Merge(m, src) +} +func (m *DVVTriplets) XXX_Size() int { + return m.Size() +} +func (m *DVVTriplets) XXX_DiscardUnknown() { + xxx_messageInfo_DVVTriplets.DiscardUnknown(m) +} + +var xxx_messageInfo_DVVTriplets proto.InternalMessageInfo + +func (m *DVVTriplets) GetTriplets() []DVVTriplet { + if m != nil { + return m.Triplets + } + return nil +} + +// Delegation represents the bond with tokens held by an account. It is +// owned by one delegator, and is associated with the voting power of one +// validator. +type Delegation struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` +} + +func (m *Delegation) Reset() { *m = Delegation{} } +func (*Delegation) ProtoMessage() {} +func (*Delegation) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{10} +} +func (m *Delegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Delegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Delegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Delegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Delegation.Merge(m, src) +} +func (m *Delegation) XXX_Size() int { + return m.Size() +} +func (m *Delegation) XXX_DiscardUnknown() { + xxx_messageInfo_Delegation.DiscardUnknown(m) +} + +var xxx_messageInfo_Delegation proto.InternalMessageInfo + +// UnbondingDelegation stores all of a single delegator's unbonding bonds +// for a single validator in an time-ordered list. +type UnbondingDelegation struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` +} + +func (m *UnbondingDelegation) Reset() { *m = UnbondingDelegation{} } +func (*UnbondingDelegation) ProtoMessage() {} +func (*UnbondingDelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{11} +} +func (m *UnbondingDelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnbondingDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnbondingDelegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UnbondingDelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnbondingDelegation.Merge(m, src) +} +func (m *UnbondingDelegation) XXX_Size() int { + return m.Size() +} +func (m *UnbondingDelegation) XXX_DiscardUnknown() { + xxx_messageInfo_UnbondingDelegation.DiscardUnknown(m) +} + +var xxx_messageInfo_UnbondingDelegation proto.InternalMessageInfo + +// UnbondingDelegationEntry defines an unbonding object with relevant metadata. +type UnbondingDelegationEntry struct { + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` +} + +func (m *UnbondingDelegationEntry) Reset() { *m = UnbondingDelegationEntry{} } +func (*UnbondingDelegationEntry) ProtoMessage() {} +func (*UnbondingDelegationEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{12} +} +func (m *UnbondingDelegationEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnbondingDelegationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnbondingDelegationEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UnbondingDelegationEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnbondingDelegationEntry.Merge(m, src) +} +func (m *UnbondingDelegationEntry) XXX_Size() int { + return m.Size() +} +func (m *UnbondingDelegationEntry) XXX_DiscardUnknown() { + xxx_messageInfo_UnbondingDelegationEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_UnbondingDelegationEntry proto.InternalMessageInfo + +func (m *UnbondingDelegationEntry) GetCreationHeight() int64 { + if m != nil { + return m.CreationHeight + } + return 0 +} + +func (m *UnbondingDelegationEntry) GetCompletionTime() time.Time { + if m != nil { + return m.CompletionTime + } + return time.Time{} +} + +// RedelegationEntry defines a redelegation object with relevant metadata. +type RedelegationEntry struct { + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` + CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` + InitialBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=initial_balance,json=initialBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"initial_balance" yaml:"initial_balance"` + SharesDst github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=shares_dst,json=sharesDst,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares_dst"` +} + +func (m *RedelegationEntry) Reset() { *m = RedelegationEntry{} } +func (*RedelegationEntry) ProtoMessage() {} +func (*RedelegationEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{13} +} +func (m *RedelegationEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RedelegationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RedelegationEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RedelegationEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedelegationEntry.Merge(m, src) +} +func (m *RedelegationEntry) XXX_Size() int { + return m.Size() +} +func (m *RedelegationEntry) XXX_DiscardUnknown() { + xxx_messageInfo_RedelegationEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_RedelegationEntry proto.InternalMessageInfo + +func (m *RedelegationEntry) GetCreationHeight() int64 { + if m != nil { + return m.CreationHeight + } + return 0 +} + +func (m *RedelegationEntry) GetCompletionTime() time.Time { + if m != nil { + return m.CompletionTime + } + return time.Time{} +} + +// Redelegation contains the list of a particular delegator's redelegating bonds +// from a particular source validator to a particular destination validator. +type Redelegation struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty" yaml:"validator_src_address"` + ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty" yaml:"validator_dst_address"` + Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` +} + +func (m *Redelegation) Reset() { *m = Redelegation{} } +func (*Redelegation) ProtoMessage() {} +func (*Redelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{14} +} +func (m *Redelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Redelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Redelegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Redelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Redelegation.Merge(m, src) +} +func (m *Redelegation) XXX_Size() int { + return m.Size() +} +func (m *Redelegation) XXX_DiscardUnknown() { + xxx_messageInfo_Redelegation.DiscardUnknown(m) +} + +var xxx_messageInfo_Redelegation proto.InternalMessageInfo + +// Params defines the parameters for the staking module. +type Params struct { + UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` + MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` + MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` + HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` + BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{15} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetUnbondingTime() time.Duration { + if m != nil { + return m.UnbondingTime + } + return 0 +} + +func (m *Params) GetMaxValidators() uint32 { + if m != nil { + return m.MaxValidators + } + return 0 +} + +func (m *Params) GetMaxEntries() uint32 { + if m != nil { + return m.MaxEntries + } + return 0 +} + +func (m *Params) GetHistoricalEntries() uint32 { + if m != nil { + return m.HistoricalEntries + } + return 0 +} + +func (m *Params) GetBondDenom() string { + if m != nil { + return m.BondDenom + } + return "" +} + +// DelegationResponse is equivalent to Delegation except that it contains a +// balance in addition to shares which is more suitable for client responses. +type DelegationResponse struct { + Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` + Balance types2.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` +} + +func (m *DelegationResponse) Reset() { *m = DelegationResponse{} } +func (*DelegationResponse) ProtoMessage() {} +func (*DelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{16} +} +func (m *DelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DelegationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelegationResponse.Merge(m, src) +} +func (m *DelegationResponse) XXX_Size() int { + return m.Size() +} +func (m *DelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DelegationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DelegationResponse proto.InternalMessageInfo + +func (m *DelegationResponse) GetDelegation() Delegation { + if m != nil { + return m.Delegation + } + return Delegation{} +} + +func (m *DelegationResponse) GetBalance() types2.Coin { + if m != nil { + return m.Balance + } + return types2.Coin{} +} + +// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it +// contains a balance in addition to shares which is more suitable for client +// responses. +type RedelegationEntryResponse struct { + RedelegationEntry RedelegationEntry `protobuf:"bytes,1,opt,name=redelegation_entry,json=redelegationEntry,proto3" json:"redelegation_entry"` + Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` +} + +func (m *RedelegationEntryResponse) Reset() { *m = RedelegationEntryResponse{} } +func (m *RedelegationEntryResponse) String() string { return proto.CompactTextString(m) } +func (*RedelegationEntryResponse) ProtoMessage() {} +func (*RedelegationEntryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{17} +} +func (m *RedelegationEntryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RedelegationEntryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RedelegationEntryResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RedelegationEntryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedelegationEntryResponse.Merge(m, src) +} +func (m *RedelegationEntryResponse) XXX_Size() int { + return m.Size() +} +func (m *RedelegationEntryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RedelegationEntryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RedelegationEntryResponse proto.InternalMessageInfo + +func (m *RedelegationEntryResponse) GetRedelegationEntry() RedelegationEntry { + if m != nil { + return m.RedelegationEntry + } + return RedelegationEntry{} +} + +// RedelegationResponse is equivalent to a Redelegation except that its entries +// contain a balance in addition to shares which is more suitable for client +// responses. +type RedelegationResponse struct { + Redelegation Redelegation `protobuf:"bytes,1,opt,name=redelegation,proto3" json:"redelegation"` + Entries []RedelegationEntryResponse `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"` +} + +func (m *RedelegationResponse) Reset() { *m = RedelegationResponse{} } +func (m *RedelegationResponse) String() string { return proto.CompactTextString(m) } +func (*RedelegationResponse) ProtoMessage() {} +func (*RedelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{18} +} +func (m *RedelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RedelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RedelegationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RedelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedelegationResponse.Merge(m, src) +} +func (m *RedelegationResponse) XXX_Size() int { + return m.Size() +} +func (m *RedelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RedelegationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RedelegationResponse proto.InternalMessageInfo + +func (m *RedelegationResponse) GetRedelegation() Redelegation { + if m != nil { + return m.Redelegation + } + return Redelegation{} +} + +func (m *RedelegationResponse) GetEntries() []RedelegationEntryResponse { + if m != nil { + return m.Entries + } + return nil +} + +// Pool is used for tracking bonded and not-bonded token supply of the bond +// denomination. +type Pool struct { + NotBondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=not_bonded_tokens,json=notBondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"not_bonded_tokens"` + BondedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=bonded_tokens,json=bondedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bonded_tokens" yaml:"bonded_tokens"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (m *Pool) String() string { return proto.CompactTextString(m) } +func (*Pool) ProtoMessage() {} +func (*Pool) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{19} +} +func (m *Pool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pool.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Pool) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pool.Merge(m, src) +} +func (m *Pool) XXX_Size() int { + return m.Size() +} +func (m *Pool) XXX_DiscardUnknown() { + xxx_messageInfo_Pool.DiscardUnknown(m) +} + +var xxx_messageInfo_Pool proto.InternalMessageInfo + +func init() { + // proto.RegisterEnum("cosmos.staking.v1beta1.BondStatus", BondStatus_name, BondStatus_value) + // proto.RegisterType((*HistoricalInfo)(nil), "cosmos.staking.v1beta1.HistoricalInfo") + // proto.RegisterType((*CommissionRates)(nil), "cosmos.staking.v1beta1.CommissionRates") + // proto.RegisterType((*Commission)(nil), "cosmos.staking.v1beta1.Commission") + // proto.RegisterType((*Description)(nil), "cosmos.staking.v1beta1.Description") + // proto.RegisterType((*Validator)(nil), "cosmos.staking.v1beta1.Validator") + // proto.RegisterType((*ValAddresses)(nil), "cosmos.staking.v1beta1.ValAddresses") + // proto.RegisterType((*DVPair)(nil), "cosmos.staking.v1beta1.DVPair") + // proto.RegisterType((*DVPairs)(nil), "cosmos.staking.v1beta1.DVPairs") + // proto.RegisterType((*DVVTriplet)(nil), "cosmos.staking.v1beta1.DVVTriplet") + // proto.RegisterType((*DVVTriplets)(nil), "cosmos.staking.v1beta1.DVVTriplets") + // proto.RegisterType((*Delegation)(nil), "cosmos.staking.v1beta1.Delegation") + // proto.RegisterType((*UnbondingDelegation)(nil), "cosmos.staking.v1beta1.UnbondingDelegation") + // proto.RegisterType((*UnbondingDelegationEntry)(nil), "cosmos.staking.v1beta1.UnbondingDelegationEntry") + // proto.RegisterType((*RedelegationEntry)(nil), "cosmos.staking.v1beta1.RedelegationEntry") + // proto.RegisterType((*Redelegation)(nil), "cosmos.staking.v1beta1.Redelegation") + // proto.RegisterType((*Params)(nil), "cosmos.staking.v1beta1.Params") + // proto.RegisterType((*DelegationResponse)(nil), "cosmos.staking.v1beta1.DelegationResponse") + // proto.RegisterType((*RedelegationEntryResponse)(nil), "cosmos.staking.v1beta1.RedelegationEntryResponse") + // proto.RegisterType((*RedelegationResponse)(nil), "cosmos.staking.v1beta1.RedelegationResponse") + // proto.RegisterType((*Pool)(nil), "cosmos.staking.v1beta1.Pool") +} + +func init() { + proto.RegisterFile("cosmos/staking/v1beta1/staking.proto", fileDescriptor_64c30c6cf92913c9) +} + +var fileDescriptor_64c30c6cf92913c9 = []byte{ + // 1796 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6c, 0x23, 0x49, + 0x15, 0x76, 0x3b, 0x5e, 0xc7, 0x7e, 0x4e, 0xe2, 0xa4, 0x26, 0x33, 0xeb, 0x98, 0xc1, 0xed, 0x6d, + 0x56, 0x4b, 0x40, 0xbb, 0x0e, 0x93, 0x45, 0x8b, 0xc8, 0x05, 0xc6, 0x71, 0x86, 0x58, 0xbb, 0x0c, + 0xa1, 0x93, 0x09, 0x12, 0xac, 0xb0, 0xca, 0xdd, 0x15, 0xa7, 0x89, 0xbb, 0xdb, 0x74, 0x95, 0x87, + 0x58, 0xda, 0x03, 0xc7, 0x65, 0x10, 0x62, 0xb9, 0xed, 0x65, 0xa4, 0x91, 0xf6, 0xba, 0x12, 0x17, + 0xc4, 0x95, 0xeb, 0x02, 0x97, 0xe1, 0x86, 0x10, 0x32, 0x68, 0xe6, 0x82, 0x38, 0x21, 0x1f, 0x10, + 0x37, 0x50, 0xfd, 0xf4, 0x4f, 0xda, 0xf1, 0xcc, 0x78, 0xb4, 0x87, 0x91, 0xd8, 0x4b, 0xe2, 0x7a, + 0xf5, 0xde, 0xf7, 0xea, 0xfd, 0xd6, 0xab, 0x86, 0x57, 0x2d, 0x9f, 0xba, 0x3e, 0xdd, 0xa2, 0x0c, + 0x9f, 0x39, 0x5e, 0x6f, 0xeb, 0xee, 0x8d, 0x2e, 0x61, 0xf8, 0x46, 0xb8, 0x6e, 0x0c, 0x02, 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, 0x6c, 0x86, 0x79, 0x25, 0xa2, + 0x1f, 0x06, 0xd6, 0xa5, 0xa8, 0x36, 0x65, 0x11, 0xea, 0xc2, 0x6c, 0xd4, 0x04, 0x5b, 0x12, 0xb5, + 0x45, 0xd9, 0xe5, 0xae, 0x3d, 0x84, 0x52, 0xec, 0x12, 0x8a, 0x5a, 0x50, 0x60, 0xea, 0xb7, 0xf2, + 0xb0, 0x31, 0xdb, 0xc3, 0xa1, 0x98, 0xf2, 0x72, 0x24, 0x69, 0xfc, 0x47, 0x03, 0x88, 0x73, 0xf6, + 0xc5, 0x4c, 0x31, 0xde, 0xca, 0x55, 0xe3, 0x5d, 0x78, 0xae, 0x51, 0x4d, 0x49, 0xa7, 0xfc, 0xf9, + 0xf3, 0x2c, 0x5c, 0xb9, 0x13, 0x76, 0x9e, 0x17, 0xde, 0x07, 0x07, 0xb0, 0x48, 0x3c, 0x16, 0x38, + 0xc2, 0x09, 0x3c, 0xda, 0x5f, 0x99, 0x15, 0xed, 0x4b, 0x6c, 0xda, 0xf3, 0x58, 0x30, 0x52, 0xb1, + 0x0f, 0x61, 0x52, 0xde, 0xf8, 0xe5, 0x02, 0x54, 0x66, 0x49, 0xa2, 0x5d, 0x28, 0x5b, 0x01, 0x11, + 0x84, 0xf0, 0xfe, 0xd0, 0xc4, 0xfd, 0x51, 0x8d, 0x27, 0xcb, 0x14, 0x83, 0x61, 0xae, 0x84, 0x14, + 0x75, 0x7b, 0xf4, 0x80, 0x8f, 0x7d, 0x3c, 0xed, 0x38, 0xd7, 0x33, 0xce, 0x79, 0x86, 0xba, 0x3e, + 0x42, 0x25, 0x17, 0x01, 0xe4, 0xfd, 0xb1, 0x12, 0x53, 0xc5, 0x05, 0xf2, 0x63, 0x28, 0x3b, 0x9e, + 0xc3, 0x1c, 0xdc, 0xef, 0x74, 0x71, 0x1f, 0x7b, 0xd6, 0xf3, 0x4c, 0xcd, 0xb2, 0xe5, 0x2b, 0xb5, + 0x29, 0x38, 0xc3, 0x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0xb1, 0x9b, 0x17, 0x6d, 0xf8, 0xcd, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x48, 0x4c, 0x86, + 0xf3, 0x16, 0x00, 0x00, +} + +func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return StakingDescription() +} +func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 9603 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, + 0x71, 0xd8, 0xcd, 0xee, 0x02, 0xd8, 0x6d, 0x2c, 0x80, 0xc5, 0x03, 0xee, 0x6e, 0x6f, 0x79, 0x04, + 0xc0, 0xe1, 0xd7, 0xf1, 0x48, 0x02, 0xe4, 0x91, 0x77, 0x24, 0xf7, 0x24, 0xd2, 0x58, 0x60, 0x0f, + 0x07, 0x1e, 0xbe, 0x38, 0x00, 0x8e, 0xd4, 0x87, 0xb3, 0x35, 0x98, 0x7d, 0x58, 0x0c, 0xb1, 0x3b, + 0x33, 0x9c, 0x99, 0xbd, 0x3b, 0x50, 0x52, 0x15, 0x2d, 0x29, 0x8a, 0x44, 0xc7, 0x91, 0x14, 0xb9, + 0x1c, 0x89, 0xd6, 0x29, 0x92, 0xe5, 0x44, 0x8e, 0xac, 0xc4, 0x1f, 0x52, 0x94, 0x38, 0x49, 0x55, + 0xa4, 0x24, 0x8e, 0x25, 0xa5, 0xe2, 0x92, 0x2a, 0xae, 0xc4, 0x71, 0x25, 0x67, 0x87, 0x52, 0x39, + 0x8c, 0xa2, 0xc4, 0xf2, 0x59, 0x4e, 0x9c, 0x52, 0xa5, 0x92, 0x7a, 0x5f, 0xf3, 0xb5, 0x1f, 0xb3, + 0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93, 0x4d, 0x43, 0x37, 0x5c, 0x6c, 0x5b, 0x36, 0x26, 0x16, 0xcb, 0x9a, 0xca, + 0xff, 0xe7, 0xa1, 0x0e, 0x36, 0xb7, 0x1d, 0xc4, 0x66, 0x5c, 0x94, 0x89, 0x66, 0x2b, 0xf0, 0x74, + 0x26, 0xfd, 0xc6, 0x50, 0xee, 0x95, 0x57, 0x5e, 0x79, 0x25, 0x21, 0x7f, 0x79, 0x10, 0x26, 0xdb, + 0xcd, 0x99, 0xb6, 0xd3, 0xf7, 0x18, 0x0c, 0x1a, 0xcd, 0xc6, 0x0e, 0xb6, 0xa9, 0x92, 0x06, 0x14, + 0x5e, 0x42, 0xf3, 0x30, 0x50, 0x57, 0x77, 0x70, 0x3d, 0x9f, 0x9a, 0x91, 0x4e, 0x8d, 0x9e, 0x79, + 0xb0, 0xa7, 0x59, 0x39, 0xbb, 0x42, 0x48, 0x14, 0x46, 0x89, 0x9e, 0x86, 0x14, 0x77, 0xd1, 0x84, + 0xc3, 0xe9, 0xde, 0x38, 0x90, 0xb9, 0xa4, 0x50, 0x3a, 0x74, 0x07, 0x64, 0xc8, 0x5f, 0x66, 0x1b, + 0x83, 0x54, 0xe6, 0x34, 0x01, 0x10, 0xbb, 0x40, 0x05, 0x48, 0xd3, 0x69, 0x52, 0xc5, 0x22, 0xb4, + 0x79, 0x65, 0x62, 0x58, 0x55, 0xbc, 0xab, 0x36, 0xeb, 0x6e, 0xe5, 0x8a, 0x5a, 0x6f, 0x62, 0x6a, + 0xf0, 0x19, 0x25, 0xcb, 0x81, 0x97, 0x09, 0x0c, 0x4d, 0xc3, 0x30, 0x9b, 0x55, 0xba, 0x51, 0xc5, + 0xd7, 0xa8, 0xf7, 0x1c, 0x50, 0xd8, 0x44, 0x5b, 0x26, 0x10, 0xd2, 0xfc, 0x8b, 0x8e, 0x69, 0x08, + 0xd3, 0xa4, 0x4d, 0x10, 0x00, 0x6d, 0xfe, 0x89, 0xa8, 0xe3, 0xbe, 0xb3,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49, 0xd3, 0x22, 0xe9, 0x07, 0x12, 0x70, 0xb4, + 0x2d, 0xf3, 0xb6, 0x82, 0xde, 0x09, 0xa0, 0x1b, 0x56, 0xd3, 0x65, 0xa9, 0x13, 0xf3, 0xc4, 0x19, + 0x0a, 0xa1, 0xce, 0x8b, 0x78, 0xd9, 0xa6, 0xeb, 0xd5, 0x27, 0x69, 0x3d, 0x30, 0x10, 0x45, 0x78, + 0xd2, 0x17, 0x34, 0x45, 0x05, 0x9d, 0xea, 0xd0, 0xd3, 0x16, 0xc3, 0x7c, 0x04, 0x72, 0x5a, 0x5d, + 0xc7, 0x86, 0x5b, 0x71, 0x5c, 0x1b, 0xab, 0x0d, 0xdd, 0xa8, 0xd1, 0x50, 0x93, 0x2e, 0x0e, 0xec, + 0xaa, 0x75, 0x07, 0x2b, 0x63, 0xac, 0x7a, 0x53, 0xd4, 0x12, 0x0a, 0x6a, 0x40, 0x76, 0x80, 0x62, + 0x30, 0x44, 0xc1, 0xaa, 0x3d, 0x0a, 0xf9, 0xc3, 0x19, 0x18, 0x0e, 0x24, 0xe0, 0xe8, 0x2e, 0xc8, + 0xbe, 0xa8, 0x5e, 0x51, 0x2b, 0x62, 0x51, 0xc5, 0x34, 0x31, 0x4c, 0x60, 0x1b, 0x7c, 0x61, 0xf5, + 0x08, 0x4c, 0x52, 0x14, 0xb3, 0xe9, 0x62, 0xbb, 0xa2, 0xd5, 0x55, 0xc7, 0xa1, 0x4a, 0x4b, 0x53, + 0x54, 0x44, 0xea, 0xd6, 0x49, 0xd5, 0x82, 0xa8, 0x41, 0x67, 0x61, 0x82, 0x52, 0x34, 0x9a, 0x75, + 0x57, 0xb7, 0xea, 0xb8, 0x42, 0x96, 0x79, 0x0e, 0x0d, 0x39, 0x9e, 0x64, 0xe3, 0x04, 0x63, 0x95, + 0x23, 0x10, 0x89, 0x1c, 0xb4, 0x08, 0x77, 0x52, 0xb2, 0x1a, 0x36, 0xb0, 0xad, 0xba, 0xb8, 0x82, + 0x5f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0x8a, 0x83, 0x2c, 0x39, 0x56, 0x18, 0x25, 0x49, 0x23, 0x88, 0xb1, 0x61, 0x96, + 0x8c, 0xa4, 0x15, 0x5e, 0x42, 0x4b, 0x30, 0xf8, 0xa2, 0x43, 0x79, 0x0f, 0x52, 0xde, 0xf7, 0x74, + 0xe7, 0xfd, 0xec, 0x26, 0x65, 0x9e, 0x79, 0x76, 0xb3, 0xb2, 0xb6, 0xae, 0xac, 0xce, 0xaf, 0x28, + 0x9c, 0x1c, 0x9d, 0x80, 0x54, 0x5d, 0x7d, 0xf9, 0x20, 0x1c, 0xf4, 0x28, 0xa8, 0xd7, 0x41, 0x38, + 0x01, 0xa9, 0xab, 0x58, 0xdd, 0x0f, 0x87, 0x1a, 0x0a, 0xba, 0x8d, 0x93, 0x61, 0x0e, 0x06, 0xa8, + 0xbe, 0x10, 0x00, 0xd7, 0x58, 0xee, 0x08, 0x4a, 0x43, 0x6a, 0x61, 0x5d, 0x21, 0x13, 0x22, 0x07, + 0x59, 0x06, 0xad, 0x6c, 0x2c, 0x97, 0x17, 0xca, 0xb9, 0x84, 0x7c, 0x16, 0x06, 0x99, 0x12, 0xc8, + 0x64, 0xf1, 0xd4, 0x90, 0x3b, 0xc2, 0x8b, 0x9c, 0x87, 0x24, 0x6a, 0xb7, 0x57, 0x4b, 0x65, 0x25, + 0x97, 0x08, 0x0f, 0x75, 0x2a, 0x37, 0x20, 0x3b, 0x90, 0x0d, 0xe6, 0xe1, 0x3f, 0x9c, 0xc5, 0xf8, + 0x97, 0x24, 0x18, 0x0e, 0xe4, 0xd5, 0x24, 0x21, 0x52, 0xeb, 0x75, 0xf3, 0x6a, 0x45, 0xad, 0xeb, + 0xaa, 0xc3, 0x4d, 0x03, 0x28, 0x68, 0x9e, 0x40, 0x7a, 0x1d, 0xba, 0x1f, 0xd2, 0x14, 0x19, 0xc8, + 0x0d, 0xca, 0x9f, 0x90, 0x20, 0x17, 0x4d, 0x6c, 0x23, 0x62, 0x4a, 0x3f, 0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e7, 0x64, 0x8b, 0x65, 0x10, 0xb6, 0x1b, 0x20, 0xe0, 0xde, + 0x58, 0xf6, 0xc0, 0xf3, 0xe7, 0x39, 0x4f, 0xc4, 0x69, 0xc5, 0x90, 0x12, 0x8e, 0xcf, 0xc2, 0xf8, + 0x15, 0x6c, 0xef, 0x98, 0x0e, 0xdf, 0x37, 0xea, 0x81, 0xdd, 0xc7, 0x39, 0xbb, 0x31, 0x4e, 0x48, + 0x37, 0x92, 0x08, 0xaf, 0xa7, 0x20, 0xbd, 0xab, 0x6a, 0xb8, 0x07, 0x16, 0xd7, 0x39, 0x8b, 0x21, + 0x82, 0x4f, 0x48, 0xe7, 0x21, 0x5b, 0x33, 0x79, 0xd4, 0x8a, 0x27, 0xff, 0x04, 0x27, 0x1f, 0x16, + 0x34, 0x9c, 0x85, 0x65, 0x5a, 0xcd, 0x3a, 0x09, 0x69, 0xf1, 0x2c, 0xfe, 0xa6, 0x60, 0x21, 0x68, + 0x38, 0x8b, 0x3e, 0xd4, 0xfa, 0x49, 0xc1, 0xc2, 0x09, 0xe8, 0xf3, 0x19, 0x18, 0x36, 0x8d, 0xfa, + 0x81, 0x69, 0xf4, 0x22, 0xc4, 0xa7, 0x38, 0x07, 0xe0, 0x24, 0x84, 0xc1, 0x79, 0xc8, 0xf4, 0x3a, + 0x10, 0x7f, 0xeb, 0x3b, 0x62, 0x7a, 0x88, 0x11, 0x58, 0x82, 0x31, 0xe1, 0xa0, 0x74, 0xd3, 0xe8, + 0x81, 0xc5, 0xdf, 0xe6, 0x2c, 0x46, 0x03, 0x64, 0xbc, 0x1b, 0x2e, 0x76, 0xdc, 0x1a, 0xee, 0x85, + 0xc9, 0x67, 0x44, 0x37, 0x38, 0x09, 0x57, 0xe5, 0x0e, 0x36, 0xb4, 0xbd, 0xde, 0x38, 0xfc, 0x92, + 0x50, 0xa5, 0xa0, 0x21, 0x2c, 0x16, 0x60, 0xa4, 0xa1, 0xda, 0xce, 0x9e, 0x5a, 0xef, 0x69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 0x14, 0x49, 0x5e, 0xe2, 0xc9, 0xff, + 0x32, 0x27, 0xa7, 0xe8, 0xc5, 0x37, 0x43, 0x5a, 0x24, 0x2d, 0xf1, 0xa4, 0xef, 0xe3, 0xa4, 0x1e, + 0x09, 0x21, 0x17, 0x09, 0x4b, 0x3c, 0xf9, 0x5f, 0x11, 0xe4, 0x82, 0x84, 0x90, 0xf7, 0xae, 0xc2, + 0x2f, 0xfd, 0x74, 0x8a, 0x07, 0x1d, 0xa1, 0xbb, 0xf3, 0x30, 0xc4, 0x33, 0x95, 0x78, 0xea, 0x0f, + 0xf0, 0xc6, 0x05, 0x45, 0xf1, 0x09, 0x18, 0xe8, 0x51, 0xe1, 0x3f, 0xc3, 0x49, 0x19, 0x7e, 0x71, + 0x01, 0x86, 0x03, 0xd9, 0x49, 0x3c, 0xf9, 0x5f, 0xe3, 0xe4, 0x41, 0x2a, 0x22, 0x3a, 0xcf, 0x4e, + 0xe2, 0x19, 0x7c, 0x50, 0x88, 0xce, 0x29, 0x88, 0xda, 0x44, 0x62, 0x12, 0x4f, 0xfd, 0x21, 0xa1, + 0x75, 0x41, 0x52, 0x7c, 0x06, 0x32, 0x5e, 0xb0, 0x89, 0xa7, 0xff, 0x30, 0xa7, 0xf7, 0x69, 0x88, + 0x06, 0x02, 0xc1, 0x2e, 0x9e, 0xc5, 0x5f, 0x17, 0x1a, 0x08, 0x50, 0x91, 0x69, 0x14, 0x4d, 0x60, + 0xe2, 0x39, 0x7d, 0x44, 0x4c, 0xa3, 0x48, 0xfe, 0x42, 0x46, 0x93, 0xfa, 0xfc, 0x78, 0x16, 0x3f, + 0x2b, 0x46, 0x93, 0xe2, 0x13, 0x31, 0xa2, 0x19, 0x41, 0x3c, 0x8f, 0xbf, 0x21, 0xc4, 0x88, 0x24, + 0x04, 0xc5, 0x0d, 0x40, 0xad, 0xd9, 0x40, 0x3c, 0xbf, 0x8f, 0x72, 0x7e, 0xe3, 0x2d, 0xc9, 0x40, + 0xf1, 0x79, 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x0c, 0xa8, 0x4d, 0x76, 0xe4, 0x9c, 0x24, + 0xb1, 0x85, 0x16, 0xe4, 0x4b, 0x30, 0xc4, 0x8f, 0xb9, 0x50, 0x0e, 0x92, 0xfb, 0xf8, 0x80, 0xb6, + 0x93, 0x55, 0xc8, 0x4f, 0x34, 0x0b, 0x03, 0x54, 0x78, 0xfe, 0x20, 0x21, 0x3f, 0xdb, 0x22, 0xfd, + 0x2c, 0x15, 0x52, 0x61, 0x68, 0xf2, 0xb3, 0x90, 0x5e, 0x34, 0x1b, 0xba, 0x61, 0x86, 0xb9, 0x65, + 0x18, 0x37, 0x2a, 0xb3, 0xd5, 0xe4, 0x63, 0xad, 0xb0, 0x02, 0x3a, 0x06, 0x83, 0xec, 0x1e, 0x37, + 0x3f, 0x36, 0xe7, 0x25, 0x79, 0x01, 0x86, 0x28, 0xef, 0x75, 0x0b, 0x21, 0xfe, 0x02, 0x88, 0x5f, + 0x18, 0xa7, 0x6e, 0x81, 0xb3, 0x4f, 0xf8, 0xc2, 0x22, 0x48, 0x55, 0x55, 0x57, 0xe5, 0xfd, 0xa6, + 0xbf, 0xe5, 0xa7, 0x21, 0xcd, 0x99, 0x38, 0xe8, 0x0c, 0x24, 0x4d, 0xcb, 0xe1, 0x07, 0xdf, 0x85, + 0x4e, 0x5d, 0x59, 0xb7, 0x4a, 0x29, 0x62, 0x25, 0x0a, 0x41, 0x2e, 0x29, 0x1d, 0xcd, 0xe2, 0xc9, + 0x80, 0x59, 0x04, 0x86, 0x3c, 0xf0, 0x93, 0x0d, 0x69, 0x8b, 0x39, 0x78, 0xc6, 0xf2, 0xa9, 0x04, + 0x4c, 0x05, 0x6a, 0xaf, 0x60, 0x9b, 0xac, 0xf5, 0x98, 0x45, 0x71, 0x6b, 0x41, 0x01, 0x21, 0x79, + 0x7d, 0x07, 0x73, 0x79, 0x33, 0x24, 0xe7, 0x2d, 0x0b, 0x15, 0x20, 0xcd, 0x0e, 0xb8, 0x4d, 0x66, + 0x2f, 0x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6f, 0x24, 0x20, 0x75, 0xd9, 0x74, 0x31, + 0x7a, 0x2c, 0x90, 0x00, 0x8e, 0xb6, 0xb3, 0xe7, 0x4d, 0xbd, 0x66, 0xe0, 0xea, 0xaa, 0x53, 0x0b, + 0xbc, 0xfb, 0xf6, 0xcd, 0x29, 0x11, 0x32, 0xa7, 0x49, 0x18, 0xb0, 0xcd, 0xa6, 0x51, 0x15, 0x37, + 0x0e, 0x69, 0x01, 0x95, 0x21, 0xed, 0x59, 0x49, 0x2a, 0xce, 0x4a, 0xc6, 0x88, 0x95, 0x10, 0x1b, + 0xe6, 0x00, 0x65, 0x68, 0x87, 0x1b, 0x4b, 0x09, 0x32, 0x9e, 0xf3, 0xe2, 0xd6, 0xd6, 0x9b, 0xc1, + 0xfa, 0x64, 0x24, 0x98, 0x78, 0x63, 0xef, 0x29, 0x8f, 0x59, 0x5c, 0xce, 0xab, 0xe0, 0xda, 0x0b, + 0x99, 0x15, 0x7f, 0x83, 0x3e, 0x44, 0xfb, 0xe5, 0x9b, 0x15, 0x7b, 0x87, 0x7e, 0x12, 0x32, 0x8e, + 0x5e, 0x33, 0x54, 0xb7, 0x69, 0x63, 0x6e, 0x79, 0x3e, 0x40, 0xfe, 0x92, 0x04, 0x83, 0xcc, 0x92, + 0x03, 0x7a, 0x93, 0xda, 0xeb, 0x2d, 0xd1, 0x49, 0x6f, 0xc9, 0xc3, 0xeb, 0x6d, 0x1e, 0xc0, 0x13, + 0xc6, 0xe1, 0x4f, 0x83, 0xdb, 0x64, 0x0c, 0x4c, 0xc4, 0x4d, 0xbd, 0xc6, 0x27, 0x6a, 0x80, 0x48, + 0xfe, 0x8f, 0x12, 0x49, 0x62, 0x79, 0x3d, 0x9a, 0x87, 0x11, 0x21, 0x57, 0x65, 0xb7, 0xae, 0xd6, + 0xb8, 0xed, 0xdc, 0xd9, 0x51, 0xb8, 0x0b, 0x75, 0xb5, 0xa6, 0x0c, 0x73, 0x79, 0x48, 0xa1, 0xfd, + 0x38, 0x24, 0x3a, 0x8c, 0x43, 0x68, 0xe0, 0x93, 0x87, 0x1b, 0xf8, 0xd0, 0x10, 0xa5, 0xa2, 0x43, + 0xf4, 0xf9, 0x04, 0x5d, 0xcc, 0x58, 0xa6, 0xa3, 0xd6, 0x7f, 0x18, 0x33, 0xe2, 0x0e, 0xc8, 0x58, + 0x66, 0xbd, 0xc2, 0x6a, 0xd8, 0x4d, 0xdc, 0xb4, 0x65, 0xd6, 0x95, 0x96, 0x61, 0x1f, 0xb8, 0x45, + 0xd3, 0x65, 0xf0, 0x16, 0x68, 0x6d, 0x28, 0xaa, 0x35, 0x1b, 0xb2, 0x4c, 0x15, 0x3c, 0x96, 0x3d, + 0x42, 0x74, 0x40, 0x83, 0xa3, 0xd4, 0x1a, 0x7b, 0x99, 0xd8, 0x0c, 0x53, 0xe1, 0x78, 0x84, 0x82, + 0xb9, 0xfe, 0x76, 0xab, 0xe0, 0xa0, 0x59, 0x2a, 0x1c, 0x4f, 0xfe, 0x39, 0x09, 0x60, 0x85, 0x68, + 0x96, 0xf6, 0x97, 0x44, 0x21, 0x87, 0x8a, 0x50, 0x09, 0xb5, 0x3c, 0xd5, 0x69, 0xd0, 0x78, 0xfb, + 0x59, 0x27, 0x28, 0xf7, 0x02, 0x8c, 0xf8, 0xc6, 0xe8, 0x60, 0x21, 0xcc, 0x54, 0x97, 0xac, 0x7a, + 0x13, 0xbb, 0x4a, 0xf6, 0x4a, 0xa0, 0x24, 0xff, 0x33, 0x09, 0x32, 0x54, 0xa6, 0x55, 0xec, 0xaa, + 0xa1, 0x31, 0x94, 0x0e, 0x3f, 0x86, 0x77, 0x02, 0x30, 0x36, 0x8e, 0xfe, 0x32, 0xe6, 0x96, 0x95, + 0xa1, 0x90, 0x4d, 0xfd, 0x65, 0x8c, 0xce, 0x79, 0x0a, 0x4f, 0x76, 0x57, 0xb8, 0xc8, 0xba, 0xb9, + 0xda, 0x8f, 0xc3, 0x10, 0xfd, 0x94, 0xce, 0x35, 0x87, 0x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x54, 0x8d, 0x53, 0x47, + 0xf4, 0xf9, 0xd3, 0x09, 0x98, 0xd8, 0x16, 0x9e, 0xe7, 0xc7, 0x5e, 0x07, 0x1b, 0x30, 0x84, 0x0d, + 0xd7, 0xd6, 0xa9, 0x12, 0xc8, 0x68, 0x3f, 0xd2, 0x69, 0xb4, 0xdb, 0xf4, 0x89, 0x7e, 0xec, 0x46, + 0x6c, 0xba, 0x73, 0x36, 0x11, 0x6d, 0x7c, 0x30, 0x09, 0xf9, 0x4e, 0x94, 0x68, 0x01, 0xc6, 0x34, + 0x1b, 0x53, 0x40, 0x25, 0xb8, 0xf3, 0x57, 0x2a, 0xf8, 0x99, 0x65, 0x04, 0x41, 0x56, 0x46, 0x05, + 0x84, 0x47, 0x8f, 0x1a, 0x90, 0xb4, 0x8f, 0x98, 0x1d, 0xc1, 0xea, 0x31, 0xcf, 0x93, 0x79, 0xf8, + 0x10, 0x8d, 0x84, 0x19, 0xb0, 0xf8, 0x31, 0xea, 0x43, 0x69, 0x00, 0x79, 0x09, 0xc6, 0x74, 0x43, + 0x77, 0x75, 0xb5, 0x5e, 0xd9, 0x51, 0xeb, 0xaa, 0xa1, 0x1d, 0x26, 0x6b, 0x66, 0x2e, 0x9f, 0x37, + 0x1b, 0x61, 0x27, 0x2b, 0xa3, 0x1c, 0x52, 0x62, 0x00, 0x74, 0x11, 0x86, 0x44, 0x53, 0xa9, 0x43, + 0x65, 0x1b, 0x82, 0x3c, 0x90, 0xe0, 0xfd, 0x4c, 0x12, 0xc6, 0x15, 0x5c, 0xfd, 0xff, 0x43, 0xd1, + 0xdf, 0x50, 0xac, 0x02, 0xb0, 0xe9, 0x4e, 0x1c, 0xec, 0x21, 0x46, 0x83, 0x38, 0x8c, 0x0c, 0xe3, + 0xb0, 0xe8, 0xb8, 0x81, 0xf1, 0xb8, 0x91, 0x80, 0x6c, 0x70, 0x3c, 0xfe, 0x82, 0x46, 0x25, 0xb4, + 0xec, 0x7b, 0xa2, 0x14, 0xff, 0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zipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *CommissionRates) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CommissionRates) + if !ok { + that2, ok := that.(CommissionRates) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Rate.Equal(that1.Rate) { + return false + } + if !this.MaxRate.Equal(that1.MaxRate) { + return false + } + if !this.MaxChangeRate.Equal(that1.MaxChangeRate) { + return false + } + return true +} +func (this *Commission) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Commission) + if !ok { + that2, ok := that.(Commission) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CommissionRates.Equal(&that1.CommissionRates) { + return false + } + if !this.UpdateTime.Equal(that1.UpdateTime) { + return false + } + return true +} +func (this *Description) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Description) + if !ok { + that2, ok := that.(Description) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Moniker != that1.Moniker { + return false + } + if this.Identity != that1.Identity { + return false + } + if this.Website != that1.Website { + return false + } + if this.SecurityContact != that1.SecurityContact { + return false + } + if this.Details != that1.Details { + return false + } + return true +} +func (this *UnbondingDelegationEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnbondingDelegationEntry) + if !ok { + that2, ok := that.(UnbondingDelegationEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CreationHeight != that1.CreationHeight { + return false + } + if !this.CompletionTime.Equal(that1.CompletionTime) { + return false + } + if !this.InitialBalance.Equal(that1.InitialBalance) { + return false + } + if !this.Balance.Equal(that1.Balance) { + return false + } + return true +} +func (this *RedelegationEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RedelegationEntry) + if !ok { + that2, ok := that.(RedelegationEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CreationHeight != that1.CreationHeight { + return false + } + if !this.CompletionTime.Equal(that1.CompletionTime) { + return false + } + if !this.InitialBalance.Equal(that1.InitialBalance) { + return false + } + if !this.SharesDst.Equal(that1.SharesDst) { + return false + } + return true +} +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.UnbondingTime != that1.UnbondingTime { + return false + } + if this.MaxValidators != that1.MaxValidators { + return false + } + if this.MaxEntries != that1.MaxEntries { + return false + } + if this.HistoricalEntries != that1.HistoricalEntries { + return false + } + if this.BondDenom != that1.BondDenom { + return false + } + return true +} +func (this *RedelegationEntryResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RedelegationEntryResponse) + if !ok { + that2, ok := that.(RedelegationEntryResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RedelegationEntry.Equal(&that1.RedelegationEntry) { + return false + } + if !this.Balance.Equal(that1.Balance) { + return false + } + return true +} +func (this *Pool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Pool) + if !ok { + that2, ok := that.(Pool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NotBondedTokens.Equal(that1.NotBondedTokens) { + return false + } + if !this.BondedTokens.Equal(that1.BondedTokens) { + return false + } + return true +} +func (m *HistoricalInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HistoricalInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HistoricalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Valset) > 0 { + for iNdEx := len(m.Valset) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Valset[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CommissionRates) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommissionRates) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommissionRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MaxChangeRate.Size() + i -= size + if _, err := m.MaxChangeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.MaxRate.Size() + i -= size + if _, err := m.MaxRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Rate.Size() + i -= size + if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Commission) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Commission) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commission) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintStaking(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + { + size, err := m.CommissionRates.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Description) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Description) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x2a + } + if len(m.SecurityContact) > 0 { + i -= len(m.SecurityContact) + copy(dAtA[i:], m.SecurityContact) + i = encodeVarintStaking(dAtA, i, uint64(len(m.SecurityContact))) + i-- + dAtA[i] = 0x22 + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Validator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Validator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinSelfDelegation.Size() + i -= size + if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintStaking(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x4a + if m.UnbondingHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.UnbondingHeight)) + i-- + dAtA[i] = 0x40 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.DelegatorShares.Size() + i -= size + if _, err := m.DelegatorShares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Tokens.Size() + i -= size + if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.Status != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Jailed { + i-- + if m.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.ConsensusPubkey != nil { + { + size, err := m.ConsensusPubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValAddresses) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValAddresses) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DVPair) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DVPairs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVPairs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVPairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pairs) > 0 { + for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DVVTriplet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVVTriplet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVVTriplet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorDstAddress) > 0 { + i -= len(m.ValidatorDstAddress) + copy(dAtA[i:], m.ValidatorDstAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorSrcAddress) > 0 { + i -= len(m.ValidatorSrcAddress) + copy(dAtA[i:], m.ValidatorSrcAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DVVTriplets) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DVVTriplets) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DVVTriplets) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Triplets) > 0 { + for iNdEx := len(m.Triplets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Triplets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Delegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Delegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Shares.Size() + i -= size + if _, err := m.Shares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnbondingDelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnbondingDelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnbondingDelegationEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnbondingDelegationEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingDelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Balance.Size() + i -= size + if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.InitialBalance.Size() + i -= size + if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintStaking(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RedelegationEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RedelegationEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RedelegationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SharesDst.Size() + i -= size + if _, err := m.SharesDst.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.InitialBalance.Size() + i -= size + if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintStaking(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Redelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Redelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Redelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ValidatorDstAddress) > 0 { + i -= len(m.ValidatorDstAddress) + copy(dAtA[i:], m.ValidatorDstAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorDstAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorSrcAddress) > 0 { + i -= len(m.ValidatorSrcAddress) + copy(dAtA[i:], m.ValidatorSrcAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ValidatorSrcAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BondDenom) > 0 { + i -= len(m.BondDenom) + copy(dAtA[i:], m.BondDenom) + i = encodeVarintStaking(dAtA, i, uint64(len(m.BondDenom))) + i-- + dAtA[i] = 0x2a + } + if m.HistoricalEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.HistoricalEntries)) + i-- + dAtA[i] = 0x20 + } + if m.MaxEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxEntries)) + i-- + dAtA[i] = 0x18 + } + if m.MaxValidators != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxValidators)) + i-- + dAtA[i] = 0x10 + } + n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintStaking(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DelegationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Delegation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RedelegationEntryResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RedelegationEntryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RedelegationEntryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Balance.Size() + i -= size + if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.RedelegationEntry.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RedelegationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RedelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RedelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Redelegation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Pool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.BondedTokens.Size() + i -= size + if _, err := m.BondedTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.NotBondedTokens.Size() + i -= size + if _, err := m.NotBondedTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintStaking(dAtA []byte, offset int, v uint64) int { + offset -= sovStaking(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *HistoricalInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Header.Size() + n += 1 + l + sovStaking(uint64(l)) + if len(m.Valset) > 0 { + for _, e := range m.Valset { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *CommissionRates) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Rate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxRate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxChangeRate.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Commission) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CommissionRates.Size() + n += 1 + l + sovStaking(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime) + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Description) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.SecurityContact) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *Validator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if m.ConsensusPubkey != nil { + l = m.ConsensusPubkey.Size() + n += 1 + l + sovStaking(uint64(l)) + } + if m.Jailed { + n += 2 + } + if m.Status != 0 { + n += 1 + sovStaking(uint64(m.Status)) + } + l = m.Tokens.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.DelegatorShares.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Description.Size() + n += 1 + l + sovStaking(uint64(l)) + if m.UnbondingHeight != 0 { + n += 1 + sovStaking(uint64(m.UnbondingHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.Commission.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MinSelfDelegation.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *ValAddresses) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *DVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *DVPairs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pairs) > 0 { + for _, e := range m.Pairs { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *DVVTriplet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorSrcAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorDstAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *DVVTriplets) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Triplets) > 0 { + for _, e := range m.Triplets { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Delegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = m.Shares.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *UnbondingDelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *UnbondingDelegationEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovStaking(uint64(m.CreationHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.InitialBalance.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *RedelegationEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovStaking(uint64(m.CreationHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.InitialBalance.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.SharesDst.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Redelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorSrcAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorDstAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + if m.MaxValidators != 0 { + n += 1 + sovStaking(uint64(m.MaxValidators)) + } + if m.MaxEntries != 0 { + n += 1 + sovStaking(uint64(m.MaxEntries)) + } + if m.HistoricalEntries != 0 { + n += 1 + sovStaking(uint64(m.HistoricalEntries)) + } + l = len(m.BondDenom) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *DelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Delegation.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *RedelegationEntryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.RedelegationEntry.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *RedelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Redelegation.Size() + n += 1 + l + sovStaking(uint64(l)) + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.NotBondedTokens.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.BondedTokens.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func sovStaking(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStaking(x uint64) (n int) { + return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ValAddresses) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValAddresses{`, + `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `}`, + }, "") + return s +} +func valueToStringStaking(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *HistoricalInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HistoricalInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HistoricalInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valset", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Valset = append(m.Valset, Validator{}) + if err := m.Valset[len(m.Valset)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommissionRates) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommissionRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommissionRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxChangeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxChangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Commission) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Commission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommissionRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommissionRates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Description) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Description: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecurityContact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Validator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Validator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusPubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusPubkey == nil { + m.ConsensusPubkey = &types1.Any{} + } + if err := m.ConsensusPubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= BondStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorShares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DelegatorShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingHeight", wireType) + } + m.UnbondingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValAddresses) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValAddresses: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValAddresses: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVPair) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVPairs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVPairs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVPairs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pairs = append(m.Pairs, DVPair{}) + if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVVTriplet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVVTriplet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVVTriplet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DVVTriplets) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DVVTriplets: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DVVTriplets: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Triplets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Triplets = append(m.Triplets, DVVTriplet{}) + if err := m.Triplets[len(m.Triplets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Delegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Delegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Delegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Shares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnbondingDelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnbondingDelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, UnbondingDelegationEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnbondingDelegationEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnbondingDelegationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingDelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RedelegationEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RedelegationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RedelegationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SharesDst", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SharesDst.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Redelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Redelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Redelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorDstAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, RedelegationEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) + } + m.MaxValidators = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxValidators |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) + } + m.MaxEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) + } + m.HistoricalEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistoricalEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BondDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DelegationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delegation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Delegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RedelegationEntryResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RedelegationEntryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RedelegationEntryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RedelegationEntry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RedelegationEntry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RedelegationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RedelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RedelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Redelegation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Redelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, RedelegationEntryResponse{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NotBondedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NotBondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BondedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStaking(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStaking + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthStaking + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStaking + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthStaking + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthStaking = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStaking = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStaking = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/staking/legacy/v040/types.go b/x/staking/legacy/v040/types.go new file mode 100644 index 000000000000..8964296fa97d --- /dev/null +++ b/x/staking/legacy/v040/types.go @@ -0,0 +1,201 @@ +package v040 + +import ( + "fmt" + "strings" + "time" + + yaml "gopkg.in/yaml.v2" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// Staking params default values +const ( + // DefaultUnbondingTime reflects three weeks in seconds as the default + // unbonding time. + // TODO: Justify our choice of default here. + DefaultUnbondingTime time.Duration = time.Hour * 24 * 7 * 3 + + // Default maximum number of bonded validators + DefaultMaxValidators uint32 = 100 + + // Default maximum entries in a UBD/RED pair + DefaultMaxEntries uint32 = 7 + + // DefaultHistorical entries is 10000. Apps that don't use IBC can ignore this + // value by not adding the staking module to the application module manager's + // SetOrderBeginBlockers. + DefaultHistoricalEntries uint32 = 10000 +) + +// NewParams creates a new Params instance +func NewParams(unbondingTime time.Duration, maxValidators, maxEntries, historicalEntries uint32, bondDenom string) Params { + return Params{ + UnbondingTime: unbondingTime, + MaxValidators: maxValidators, + MaxEntries: maxEntries, + HistoricalEntries: historicalEntries, + BondDenom: bondDenom, + } +} + +// String returns a human readable string representation of the parameters. +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} + +func DefaultParams() Params { + return NewParams( + DefaultUnbondingTime, + DefaultMaxValidators, + DefaultMaxEntries, + DefaultHistoricalEntries, + sdk.DefaultBondDenom, + ) +} + +// String implements the Stringer interface for a Commission object. +func (c Commission) String() string { + out, _ := yaml.Marshal(c) + return string(out) +} + +// String implements the Stringer interface for a CommissionRates object. +func (cr CommissionRates) String() string { + out, _ := yaml.Marshal(cr) + return string(out) +} + +// String implements the Stringer interface for a DVPair object. +func (dv DVPair) String() string { + out, _ := yaml.Marshal(dv) + return string(out) +} + +// String implements the Stringer interface for a DVVTriplet object. +func (dvv DVVTriplet) String() string { + out, _ := yaml.Marshal(dvv) + return string(out) +} + +// String returns a human readable string representation of a Delegation. +func (d Delegation) String() string { + out, _ := yaml.Marshal(d) + return string(out) +} + +// Delegations is a collection of delegations +type Delegations []Delegation + +func (d Delegations) String() (out string) { + for _, del := range d { + out += del.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// String implements the stringer interface for a UnbondingDelegationEntry. +func (e UnbondingDelegationEntry) String() string { + out, _ := yaml.Marshal(e) + return string(out) +} + +// String returns a human readable string representation of an UnbondingDelegation. +func (ubd UnbondingDelegation) String() string { + out := fmt.Sprintf(`Unbonding Delegations between: + Delegator: %s + Validator: %s + Entries:`, ubd.DelegatorAddress, ubd.ValidatorAddress) + for i, entry := range ubd.Entries { + out += fmt.Sprintf(` Unbonding Delegation %d: + Creation Height: %v + Min time to unbond (unix): %v + Expected balance: %s`, i, entry.CreationHeight, + entry.CompletionTime, entry.Balance) + } + + return out +} + +// UnbondingDelegations is a collection of UnbondingDelegation +type UnbondingDelegations []UnbondingDelegation + +func (ubds UnbondingDelegations) String() (out string) { + for _, u := range ubds { + out += u.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// String implements the Stringer interface for a RedelegationEntry object. +func (e RedelegationEntry) String() string { + out, _ := yaml.Marshal(e) + return string(out) +} + +// String returns a human readable string representation of a Redelegation. +func (red Redelegation) String() string { + out := fmt.Sprintf(`Redelegations between: + Delegator: %s + Source Validator: %s + Destination Validator: %s + Entries: +`, + red.DelegatorAddress, red.ValidatorSrcAddress, red.ValidatorDstAddress, + ) + + for i, entry := range red.Entries { + out += fmt.Sprintf(` Redelegation Entry #%d: + Creation height: %v + Min time to unbond (unix): %v + Dest Shares: %s +`, + i, entry.CreationHeight, entry.CompletionTime, entry.SharesDst, + ) + } + + return strings.TrimRight(out, "\n") +} + +// Redelegations are a collection of Redelegation +type Redelegations []Redelegation + +func (d Redelegations) String() (out string) { + for _, red := range d { + out += red.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// String implements the Stringer interface for DelegationResponse. +func (d DelegationResponse) String() string { + return fmt.Sprintf("%s\n Balance: %s", d.Delegation.String(), d.Balance) +} + +// String implements the Stringer interface for a Validator object. +func (v Validator) String() string { + out, _ := yaml.Marshal(v) + return string(out) +} + +// Validators is a collection of Validator +type Validators []Validator + +func (v Validators) String() (out string) { + for _, val := range v { + out += val.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// String implements the Stringer interface for a Description object. +func (d Description) String() string { + out, _ := yaml.Marshal(d) + return string(out) +} diff --git a/x/staking/legacy/v043/json.go b/x/staking/legacy/v043/json.go new file mode 100644 index 000000000000..a6334ee8b107 --- /dev/null +++ b/x/staking/legacy/v043/json.go @@ -0,0 +1,138 @@ +package v043 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" + v043staking "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// MigrateJSON accepts exported v0.40 x/gov genesis state and migrates it to +// v0.43 x/gov genesis state. The migration includes: +// +// - Gov weighted votes. +func MigrateJSON(oldState *v040staking.GenesisState) *v043staking.GenesisState { + return &v043staking.GenesisState{ + Params: migrateParams(oldState.Params), + LastTotalPower: oldState.LastTotalPower, + LastValidatorPowers: migrateLastValidatorPowers(oldState.LastValidatorPowers), + Validators: migrateValidators(oldState.Validators), + Delegations: migrateDelegations(oldState.Delegations), + UnbondingDelegations: migrateUnbondingDelegations(oldState.UnbondingDelegations), + Redelegations: migrateRedelegations(oldState.Redelegations), + Exported: oldState.Exported, + } +} + +func migrateParams(oldParams v040staking.Params) v043staking.Params { + return v043staking.NewParams( + oldParams.UnbondingTime, + oldParams.MaxValidators, + oldParams.MaxEntries, + oldParams.HistoricalEntries, + oldParams.BondDenom, + sdk.DefaultPowerReduction, + ) +} + +func migrateLastValidatorPowers(oldLastValidatorPowers []v040staking.LastValidatorPower) []v043staking.LastValidatorPower { + newLastValidatorPowers := make([]v043staking.LastValidatorPower, len(oldLastValidatorPowers)) + for i, oldLastValidatorPower := range oldLastValidatorPowers { + newLastValidatorPowers[i] = v043staking.LastValidatorPower{ + Address: oldLastValidatorPower.Address, + Power: oldLastValidatorPower.Power, + } + } + return newLastValidatorPowers +} + +func migrateValidators(oldValidators []v040staking.Validator) []v043staking.Validator { + newValidators := make([]v043staking.Validator, len(oldValidators)) + + for i, oldValidator := range oldValidators { + newValidators[i] = v043staking.Validator{ + OperatorAddress: oldValidator.OperatorAddress, + ConsensusPubkey: oldValidator.ConsensusPubkey, + Jailed: oldValidator.Jailed, + Status: v043staking.BondStatus(oldValidator.Status), + Tokens: oldValidator.Tokens, + DelegatorShares: oldValidator.DelegatorShares, + Description: v043staking.Description{ + Moniker: oldValidator.Description.Moniker, + Identity: oldValidator.Description.Identity, + Website: oldValidator.Description.Website, + SecurityContact: oldValidator.Description.SecurityContact, + Details: oldValidator.Description.Details, + }, + UnbondingHeight: oldValidator.UnbondingHeight, + UnbondingTime: oldValidator.UnbondingTime, + Commission: v043staking.Commission{ + CommissionRates: v043staking.CommissionRates{ + Rate: oldValidator.Commission.CommissionRates.Rate, + MaxRate: oldValidator.Commission.CommissionRates.MaxRate, + MaxChangeRate: oldValidator.Commission.CommissionRates.MaxChangeRate, + }, + UpdateTime: oldValidator.Commission.UpdateTime, + }, + MinSelfDelegation: oldValidator.MinSelfDelegation, + } + } + + return newValidators +} + +func migrateDelegations(oldDelegations []v040staking.Delegation) []v043staking.Delegation { + newDelegations := make([]v043staking.Delegation, len(oldDelegations)) + for i, oldDelegation := range oldDelegations { + newDelegations[i] = v043staking.Delegation{ + DelegatorAddress: oldDelegation.DelegatorAddress, + ValidatorAddress: oldDelegation.ValidatorAddress, + Shares: oldDelegation.Shares, + } + } + return newDelegations +} + +func migrateUnbondingDelegations(oldUnbondingDelegations []v040staking.UnbondingDelegation) []v043staking.UnbondingDelegation { + newUnbondingDelegations := make([]v043staking.UnbondingDelegation, len(oldUnbondingDelegations)) + for i, oldUnbondingDelegation := range oldUnbondingDelegations { + newEntries := make([]v043staking.UnbondingDelegationEntry, len(oldUnbondingDelegation.Entries)) + for j, oldEntry := range oldUnbondingDelegation.Entries { + newEntries[j] = v043staking.UnbondingDelegationEntry{ + CreationHeight: oldEntry.CreationHeight, + CompletionTime: oldEntry.CompletionTime, + InitialBalance: oldEntry.InitialBalance, + Balance: oldEntry.Balance, + } + } + + newUnbondingDelegations[i] = v043staking.UnbondingDelegation{ + DelegatorAddress: oldUnbondingDelegation.DelegatorAddress, + ValidatorAddress: oldUnbondingDelegation.ValidatorAddress, + Entries: newEntries, + } + } + return newUnbondingDelegations +} + +func migrateRedelegations(oldRedelegations []v040staking.Redelegation) []v043staking.Redelegation { + newRedelegations := make([]v043staking.Redelegation, len(oldRedelegations)) + for i, oldRedelegation := range oldRedelegations { + newEntries := make([]v043staking.RedelegationEntry, len(oldRedelegation.Entries)) + for j, oldEntry := range oldRedelegation.Entries { + newEntries[j] = v043staking.RedelegationEntry{ + CreationHeight: oldEntry.CreationHeight, + CompletionTime: oldEntry.CompletionTime, + InitialBalance: oldEntry.InitialBalance, + SharesDst: oldEntry.SharesDst, + } + } + + newRedelegations[i] = v043staking.Redelegation{ + DelegatorAddress: oldRedelegation.DelegatorAddress, + ValidatorSrcAddress: oldRedelegation.ValidatorSrcAddress, + ValidatorDstAddress: oldRedelegation.ValidatorDstAddress, + Entries: newEntries, + } + } + return newRedelegations +} diff --git a/x/staking/legacy/v043/json_test.go b/x/staking/legacy/v043/json_test.go new file mode 100644 index 000000000000..82d2422417a1 --- /dev/null +++ b/x/staking/legacy/v043/json_test.go @@ -0,0 +1,67 @@ +package v043_test + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" + v043staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v043" +) + +func TestMigrateJSON(t *testing.T) { + encodingConfig := simapp.MakeTestEncodingConfig() + clientCtx := client.Context{}. + WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithJSONMarshaler(encodingConfig.Marshaler) + + // voter, err := sdk.AccAddressFromBech32("cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh") + // require.NoError(t, err) + stakingGenState := &v040staking.GenesisState{ + Params: v040staking.DefaultParams(), + } + + migrated := v043staking.MigrateJSON(stakingGenState) + + require.True(t, migrated.Params.PowerReduction.Equal(sdk.DefaultPowerReduction)) + + bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) + require.NoError(t, err) + + // Indent the JSON bz correctly. + var jsonObj map[string]interface{} + err = json.Unmarshal(bz, &jsonObj) + require.NoError(t, err) + indentedBz, err := json.MarshalIndent(jsonObj, "", "\t") + require.NoError(t, err) + + // Make sure about: + // - Votes are all ADR-037 weighted votes with weight 1. + expected := `{ + "delegations": [], + "exported": false, + "last_total_power": "0", + "last_validator_powers": [], + "params": { + "bond_denom": "stake", + "historical_entries": 10000, + "max_entries": 7, + "max_validators": 100, + "power_reduction": "1000000", + "unbonding_time": "1814400s" + }, + "redelegations": [], + "unbonding_delegations": [], + "validators": [] +}` + + fmt.Println(string(indentedBz)) + + require.Equal(t, expected, string(indentedBz)) +} diff --git a/x/staking/legacy/v043/store.go b/x/staking/legacy/v043/store.go index 4bd6b31e1f2d..f076a0675a97 100644 --- a/x/staking/legacy/v043/store.go +++ b/x/staking/legacy/v043/store.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/address" v040auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v040" v043distribution "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v043" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -54,11 +55,16 @@ func migrateValidatorsByPowerIndexKey(store sdk.KVStore) { } } -// MigrateStore performs in-place store migrations from v0.40 to v0.42. The +func migrateParamsStore(ctx sdk.Context, paramstore paramtypes.Subspace) { + paramstore.WithKeyTable(types.ParamKeyTable()) + paramstore.Set(ctx, types.KeyPowerReduction, sdk.DefaultPowerReduction) +} + +// MigrateStore performs in-place store migrations from v0.40 to v0.43. The // migration includes: // -// - Change addresses to be length-prefixed. -func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey) error { +// - Setting the Power Reduction param in the paramstore +func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, paramstore paramtypes.Subspace) error { store := ctx.KVStore(storeKey) v043distribution.MigratePrefixAddress(store, v040staking.LastValidatorPowerKey) @@ -74,5 +80,7 @@ func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey) error { migratePrefixAddressAddressAddress(store, v040staking.RedelegationByValSrcIndexKey) migratePrefixAddressAddressAddress(store, v040staking.RedelegationByValDstIndexKey) + migrateParamsStore(ctx, paramstore) + return nil } diff --git a/x/staking/legacy/v043/store_test.go b/x/staking/legacy/v043/store_test.go index 7c1861ffe86e..7d1422ebc014 100644 --- a/x/staking/legacy/v043/store_test.go +++ b/x/staking/legacy/v043/store_test.go @@ -7,9 +7,11 @@ import ( "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" v043staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v043" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" @@ -17,10 +19,14 @@ import ( ) func TestStoreMigration(t *testing.T) { + encCfg := simapp.MakeTestEncodingConfig() stakingKey := sdk.NewKVStoreKey("staking") - ctx := testutil.DefaultContext(stakingKey, sdk.NewTransientStoreKey("transient_test")) + tStakingKey := sdk.NewTransientStoreKey("transient_test") + ctx := testutil.DefaultContext(stakingKey, tStakingKey) store := ctx.KVStore(stakingKey) + paramSubspace := paramtypes.NewSubspace(encCfg.Marshaler, encCfg.Amino, stakingKey, tStakingKey, types.ModuleName) + _, pk1, addr1 := testdata.KeyTestPubAddr() valAddr1 := sdk.ValAddress(addr1) val := teststaking.NewValidator(t, valAddr1, pk1) @@ -121,7 +127,7 @@ func TestStoreMigration(t *testing.T) { } // Run migrations. - err := v043staking.MigrateStore(ctx, stakingKey) + err := v043staking.MigrateStore(ctx, stakingKey, paramSubspace) require.NoError(t, err) // Make sure the new keys are set and old keys are deleted. @@ -134,4 +140,8 @@ func TestStoreMigration(t *testing.T) { require.Equal(t, value, store.Get(tc.newKey)) }) } + + powerReduction := sdk.NewInt(0) + paramSubspace.Get(ctx, types.KeyPowerReduction, &powerReduction) + require.True(t, powerReduction.Equal(sdk.DefaultPowerReduction)) } diff --git a/x/staking/types/params.go b/x/staking/types/params.go index 92fb0dad898d..1f5e81b44e05 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -68,7 +68,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyHistoricalEntries, &p.HistoricalEntries, validateHistoricalEntries), paramtypes.NewParamSetPair(KeyBondDenom, &p.BondDenom, validateBondDenom), - paramtypes.NewParamSetPair(KeyPowerReduction, &p.PowerReduction, validatePowerReduction), + paramtypes.NewParamSetPair(KeyPowerReduction, &p.PowerReduction, ValidatePowerReduction), } } @@ -196,7 +196,7 @@ func validateBondDenom(i interface{}) error { return nil } -func validatePowerReduction(i interface{}) error { +func ValidatePowerReduction(i interface{}) error { v, ok := i.(sdk.Int) if !ok { return fmt.Errorf("invalid parameter type: %T", i) From 8cf5fe0b9b3f55045e16ec9bd07e3efb2c576d4a Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Wed, 7 Apr 2021 20:07:52 -0400 Subject: [PATCH 21/23] add nolint to pb.go files --- x/staking/legacy/v040/genesis.pb.go | 3 +-- x/staking/legacy/v040/staking.pb.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/x/staking/legacy/v040/genesis.pb.go b/x/staking/legacy/v040/genesis.pb.go index 04644e17ea64..af9e607d28ac 100644 --- a/x/staking/legacy/v040/genesis.pb.go +++ b/x/staking/legacy/v040/genesis.pb.go @@ -1,8 +1,7 @@ // Package v040 is taken from: // https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/x/staking/types/genesis.pb.go // by copy-pasted only the relevants parts for Genesis. -//nolint - +// nolint package v040 import ( diff --git a/x/staking/legacy/v040/staking.pb.go b/x/staking/legacy/v040/staking.pb.go index 71ae65fe3a4e..3200520a71a4 100644 --- a/x/staking/legacy/v040/staking.pb.go +++ b/x/staking/legacy/v040/staking.pb.go @@ -1,7 +1,6 @@ // Package v040 is taken from: // https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/x/staking/types/staking.pb.go -//nolint - +// nolint package v040 import ( From cd8186e8e489f0303fc58f8ad59ccd1f76626abd Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Fri, 9 Apr 2021 13:32:14 -0400 Subject: [PATCH 22/23] fix rosetta-test --- contrib/rosetta/configuration/bootstrap.json | 2 +- contrib/rosetta/node/data.tar.gz | Bin 36795 -> 36436 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/rosetta/configuration/bootstrap.json b/contrib/rosetta/configuration/bootstrap.json index 1696d9bd8cf1..e014a1043261 100644 --- a/contrib/rosetta/configuration/bootstrap.json +++ b/contrib/rosetta/configuration/bootstrap.json @@ -1,7 +1,7 @@ [ { "account_identifier": { - "address":"cosmos1tqpwnlx558r36pmf5h8xxct94qcq00h2p5evag" + "address":"cosmos1kezmr2chzy7w00nhh7qxhpqphdwum3j0mgdaw0" }, "currency":{ "symbol":"stake", diff --git a/contrib/rosetta/node/data.tar.gz b/contrib/rosetta/node/data.tar.gz index 291681c89dc091faa0a0962c341eca0a8642eab1..d96715778251d8388d761d2bf3623bc96c99a8f3 100644 GIT binary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Om}4`da&yeq`}`B9=t7RrlOsF~jvjZU|tR&T16cx2OPPe(l| zmk5QX#q_)yh^_01<}$N6nEhI@xH)KjH5UAsXg;ow>*M;ke(v=@Ob^>|09XP5lA|<$ From 4b778abf91fbbb7a9f1dadbc76077eeecc3448ea Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Sat, 10 Apr 2021 19:23:58 -0400 Subject: [PATCH 23/23] merged master --- x/auth/legacy/v043/store_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/auth/legacy/v043/store_test.go b/x/auth/legacy/v043/store_test.go index acd06fe8783c..3daa2d52fc53 100644 --- a/x/auth/legacy/v043/store_test.go +++ b/x/auth/legacy/v043/store_test.go @@ -657,7 +657,7 @@ func dirtyTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, app * } func createValidator(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers int64) (sdk.AccAddress, sdk.ValAddress) { - valTokens := sdk.TokensFromConsensusPower(powers) + valTokens := sdk.TokensFromConsensusPower(powers, sdk.DefaultPowerReduction) addrs := simapp.AddTestAddrsIncremental(app, ctx, 1, valTokens) valAddrs := simapp.ConvertAddrsToValAddrs(addrs) pks := simapp.CreateTestPubKeys(1)