diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index d13ddcd1..85e92e68 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -694,6 +694,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED points: type: string @@ -1092,6 +1093,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED title: >- BasicPool contains the necessary properties need for a @@ -3966,6 +3968,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED points: type: string @@ -4985,6 +4988,13 @@ paths: type: integer format: int64 description: compression_id ... + end_key: + type: string + title: >- + end_key is the last key before the pool should stop + indexing, it is + + inclusive bundle_proposal: description: bundle_proposal ... type: object @@ -5102,6 +5112,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED account: type: string @@ -5518,6 +5529,13 @@ paths: type: integer format: int64 description: compression_id ... + end_key: + type: string + title: >- + end_key is the last key before the pool should stop + indexing, it is + + inclusive bundle_proposal: description: bundle_proposal ... type: object @@ -5635,6 +5653,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED account: type: string @@ -6153,6 +6172,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED points: type: string @@ -6580,6 +6600,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED points: type: string @@ -7120,6 +7141,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED points: type: string @@ -7589,6 +7611,7 @@ paths: - POOL_STATUS_NOT_ENOUGH_DELEGATION - POOL_STATUS_UPGRADING - POOL_STATUS_VOTING_POWER_TOO_HIGH + - POOL_STATUS_END_KEY_REACHED default: POOL_STATUS_UNSPECIFIED points: type: string diff --git a/proto/kyve/pool/v1beta1/events.proto b/proto/kyve/pool/v1beta1/events.proto index 2c0d83fc..9b060641 100644 --- a/proto/kyve/pool/v1beta1/events.proto +++ b/proto/kyve/pool/v1beta1/events.proto @@ -57,6 +57,9 @@ message EventCreatePool { // compression_id is the unique id of the compression type the bundles // get compressed with uint32 compression_id = 14; + // end_key is the last key before the pool should stop indexing, it is + // inclusive + string end_key = 15; } // EventPoolEnabled ... diff --git a/proto/kyve/pool/v1beta1/pool.proto b/proto/kyve/pool/v1beta1/pool.proto index c82e9305..6989df43 100644 --- a/proto/kyve/pool/v1beta1/pool.proto +++ b/proto/kyve/pool/v1beta1/pool.proto @@ -32,6 +32,9 @@ enum PoolStatus { // POOL_STATUS_VOTING_POWER_TOO_HIGH indicates, that one validator // has more than 50% voting power and that the pool is halted POOL_STATUS_VOTING_POWER_TOO_HIGH = 6; + // POOL_STATUS_END_KEY_REACHED indicates, that the end key has been + // reached and that the pool is halted + POOL_STATUS_END_KEY_REACHED = 7; } // Protocol holds all info about the current pool version and the @@ -109,4 +112,8 @@ message Pool { uint32 current_storage_provider_id = 18; // compression_id ... uint32 current_compression_id = 19; + + // end_key is the last key before the pool should stop indexing, it is + // inclusive + string end_key = 20; } diff --git a/proto/kyve/pool/v1beta1/tx.proto b/proto/kyve/pool/v1beta1/tx.proto index f211f738..5b20a63a 100644 --- a/proto/kyve/pool/v1beta1/tx.proto +++ b/proto/kyve/pool/v1beta1/tx.proto @@ -64,6 +64,8 @@ message MsgCreatePool { uint32 storage_provider_id = 13; // compression_id ... uint32 compression_id = 14; + // end_key ... + string end_key = 15; } // MsgCreatePoolResponse defines the Msg/CreatePool response type. diff --git a/x/bundles/keeper/logic_bundles.go b/x/bundles/keeper/logic_bundles.go index 65b25956..517841dd 100644 --- a/x/bundles/keeper/logic_bundles.go +++ b/x/bundles/keeper/logic_bundles.go @@ -31,6 +31,13 @@ func (k Keeper) AssertPoolCanRun(ctx sdk.Context, poolId uint64) error { return types.ErrPoolDisabled } + // Error if the end key is reached. The pool will simply halt if this is the case, + // it is the responsibility of the protocol nodes to reach final consensus and that + // a bundle does not exceed the end_key + if pool.EndKey != "" && pool.CurrentKey == pool.EndKey { + return types.ErrEndKeyReached + } + // Get the total and the highest delegation of a single validator in the pool totalDelegation, highestDelegation := k.delegationKeeper.GetTotalAndHighestDelegationOfPool(ctx, poolId) diff --git a/x/bundles/keeper/logic_bundles_test.go b/x/bundles/keeper/logic_bundles_test.go index 3d7d6195..4f10e384 100644 --- a/x/bundles/keeper/logic_bundles_test.go +++ b/x/bundles/keeper/logic_bundles_test.go @@ -20,6 +20,7 @@ TEST CASES - logic_bundles.go * Assert pool can run while min delegation is not reached * Assert pool can run * Assert pool can run while pool has no funds +* Assert pool can run when endKey is reached * Assert can vote if sender is no staker * Assert can vote if bundle is dropped @@ -84,7 +85,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { // ASSERT POOL CAN RUN It("Assert pool can run while pool is upgrading", func() { - // ASSERT + // ARRANGE pool, _ := s.App().PoolKeeper.GetPool(s.Ctx(), 0) pool.UpgradePlan = &pooltypes.UpgradePlan{ Version: "1.0.0", @@ -126,7 +127,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert pool can run while pool is disabled", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -164,7 +165,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert pool can run while min delegation is not reached", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 20 * i.KYVE, @@ -197,7 +198,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert pool can run while voting power of one node is too high", func() { - // ASSERT + // ARRANGE msg := &pooltypes.MsgCreatePool{ Authority: gov, Name: "PoolTest", @@ -248,7 +249,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert pool can run", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 50 * i.KYVE, @@ -281,7 +282,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert pool can run while pool has no funds", func() { - // ASSERT + // ARRANGE msg := &pooltypes.MsgCreatePool{ Authority: gov, Name: "PoolTest", @@ -331,10 +332,24 @@ var _ = Describe("logic_bundles.go", Ordered, func() { Expect(err).NotTo(HaveOccurred()) }) + It("Assert pool can run when endKey is reached", func() { + // ARRANGE + pool, _ := s.App().PoolKeeper.GetPool(s.Ctx(), 0) + pool.EndKey = "0" + pool.CurrentKey = "0" + s.App().PoolKeeper.SetPool(s.Ctx(), pool) + + // ACT + err := s.App().BundlesKeeper.AssertPoolCanRun(s.Ctx(), 0) + + // ASSERT + Expect(err).To(Equal(bundlesTypes.ErrEndKeyReached)) + }) + // ASSERT CAN VOTE It("Assert can vote if sender is no staker", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -396,7 +411,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can vote if bundle is dropped", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -455,7 +470,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can vote if storage id does not match", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -513,7 +528,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can vote if sender has already voted valid", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -580,7 +595,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can vote if sender has already voted invalid", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -647,7 +662,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can vote", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -708,7 +723,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { // ASSERT CAN PROPOSE It("Assert can propose if sender is no staker", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -750,7 +765,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can propose if sender is not next uploader", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -792,7 +807,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can propose if upload interval has not passed", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -837,7 +852,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can propose if index does not match", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -879,7 +894,7 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) It("Assert can propose", func() { - // ASSERT + // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, diff --git a/x/bundles/types/errors.go b/x/bundles/types/errors.go index 9a30d74a..d295426c 100644 --- a/x/bundles/types/errors.go +++ b/x/bundles/types/errors.go @@ -23,4 +23,5 @@ var ( ErrAlreadyVotedInvalid = errors.Register(ModuleName, 1205, "already voted invalid on bundle proposal") ErrAlreadyVotedAbstain = errors.Register(ModuleName, 1206, "already voted abstain on bundle proposal") ErrVotingPowerTooHigh = errors.Register(ModuleName, 1207, "staker in pool has more than 50% voting power") + ErrEndKeyReached = errors.Register(ModuleName, 1208, "end key reached") ) diff --git a/x/pool/keeper/msg_server_create_pool.go b/x/pool/keeper/msg_server_create_pool.go index 2aaa5ee4..16a647dc 100644 --- a/x/pool/keeper/msg_server_create_pool.go +++ b/x/pool/keeper/msg_server_create_pool.go @@ -32,6 +32,7 @@ func (k msgServer) CreatePool(goCtx context.Context, req *types.MsgCreatePool) ( Logo: req.Logo, Config: req.Config, StartKey: req.StartKey, + EndKey: req.EndKey, UploadInterval: req.UploadInterval, InflationShareWeight: req.InflationShareWeight, MinDelegation: req.MinDelegation, @@ -56,6 +57,7 @@ func (k msgServer) CreatePool(goCtx context.Context, req *types.MsgCreatePool) ( Logo: req.Logo, Config: req.Config, StartKey: req.StartKey, + EndKey: req.EndKey, UploadInterval: req.UploadInterval, InflationShareWeight: req.InflationShareWeight, MinDelegation: req.MinDelegation, diff --git a/x/pool/keeper/msg_server_create_pool_test.go b/x/pool/keeper/msg_server_create_pool_test.go index eb33578d..57818d96 100644 --- a/x/pool/keeper/msg_server_create_pool_test.go +++ b/x/pool/keeper/msg_server_create_pool_test.go @@ -102,6 +102,7 @@ var _ = Describe("msg_server_create_pool.go", Ordered, func() { Logo: "ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU", Config: "ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0", StartKey: "0", + EndKey: "100", UploadInterval: 60, InflationShareWeight: 10000, MinDelegation: 100 * i.KYVE, @@ -137,6 +138,7 @@ var _ = Describe("msg_server_create_pool.go", Ordered, func() { Logo: "ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU", Config: "ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0", StartKey: "0", + EndKey: "100", CurrentKey: "", CurrentSummary: "", CurrentIndex: 0, @@ -244,6 +246,7 @@ var _ = Describe("msg_server_create_pool.go", Ordered, func() { Logo: "ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU", Config: "ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0", StartKey: "0", + EndKey: "", CurrentKey: "", CurrentSummary: "", CurrentIndex: 0, diff --git a/x/pool/keeper/msg_server_update_pool.go b/x/pool/keeper/msg_server_update_pool.go index 41f452f1..1e65b276 100644 --- a/x/pool/keeper/msg_server_update_pool.go +++ b/x/pool/keeper/msg_server_update_pool.go @@ -59,6 +59,9 @@ func (k msgServer) UpdatePool(goCtx context.Context, req *types.MsgUpdatePool) ( if update.CompressionId != nil { pool.CurrentCompressionId = *update.CompressionId } + if update.EndKey != nil { + pool.EndKey = *update.EndKey + } k.SetPool(ctx, pool) diff --git a/x/pool/keeper/msg_server_update_pool_test.go b/x/pool/keeper/msg_server_update_pool_test.go index c711c133..9bf3d3d7 100644 --- a/x/pool/keeper/msg_server_update_pool_test.go +++ b/x/pool/keeper/msg_server_update_pool_test.go @@ -46,7 +46,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { msg := &types.MsgUpdatePool{ Authority: i.DUMMY[0], Id: 0, - Payload: "{\"Name\":\"TestPool\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":\"100000000000\",\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1}", + Payload: "{\"Name\":\"TestPool\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":\"100000000000\",\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1,\"EndKey\":\"1\"}", } // ACT @@ -61,7 +61,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { msg := &types.MsgUpdatePool{ Authority: i.DUMMY[0], Id: 0, - Payload: "{\"Name\":\"TestPool\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":\"100000000000\",\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1}", + Payload: "{\"Name\":\"TestPool\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":\"100000000000\",\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1,\"EndKey\":\"1\"}", } proposal, _ := BuildGovernanceTxs(s, []sdk.Msg{msg}) @@ -78,7 +78,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { msg := &types.MsgUpdatePool{ Authority: gov, Id: 0, - Payload: "{\"Name\":\"TestPool\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":100000000000,\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1}", + Payload: "{\"Name\":\"TestPool\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":100000000000,\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1,\"EndKey\":\"1\"}", } p, v := BuildGovernanceTxs(s, []sdk.Msg{msg}) @@ -128,6 +128,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { }, CurrentStorageProviderId: 2, CurrentCompressionId: 1, + EndKey: "1", })) }) @@ -186,6 +187,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { }, CurrentStorageProviderId: 0, CurrentCompressionId: 0, + EndKey: "", })) }) @@ -197,7 +199,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { msg := &types.MsgUpdatePool{ Authority: gov, Id: 1, - Payload: "{\"Name\":\"TestPool2\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":100000000000,\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1}", + Payload: "{\"Name\":\"TestPool2\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":100000000000,\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1,\"EndKey\":\"1\"}", } p, v := BuildGovernanceTxs(s, []sdk.Msg{msg}) @@ -246,6 +248,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { }, CurrentStorageProviderId: 2, CurrentCompressionId: 1, + EndKey: "1", })) }) @@ -254,7 +257,7 @@ var _ = Describe("msg_server_update_pool.go", Ordered, func() { msg := &types.MsgUpdatePool{ Authority: gov, Id: 1, - Payload: "invalid_json_payload\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":100000000000,\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1}", + Payload: "invalid_json_payload\",\"Runtime\":\"@kyve/test\",\"Logo\":\"ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU\",\"Config\":\"ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0\",\"StartKey\":\"0\",\"UploadInterval\":60,\"InflationShareWeight\":10000,\"MinDelegation\":100000000000,\"MaxBundleSize\":100,\"Version\":\"0.0.0\",\"Binaries\":\"{}\",\"StorageProviderId\":2,\"CompressionId\":1,\"EndKey\":\"1\"}", } p, _ := BuildGovernanceTxs(s, []sdk.Msg{msg}) diff --git a/x/pool/types/events.pb.go b/x/pool/types/events.pb.go index 35d7e1a4..3ecaed5d 100644 --- a/x/pool/types/events.pb.go +++ b/x/pool/types/events.pb.go @@ -127,6 +127,9 @@ type EventCreatePool struct { // compression_id is the unique id of the compression type the bundles // get compressed with CompressionId uint32 `protobuf:"varint,14,opt,name=compression_id,json=compressionId,proto3" json:"compression_id,omitempty"` + // end_key is the last key before the pool should stop indexing, it is + // inclusive + EndKey string `protobuf:"bytes,15,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` } func (m *EventCreatePool) Reset() { *m = EventCreatePool{} } @@ -260,6 +263,13 @@ func (m *EventCreatePool) GetCompressionId() uint32 { return 0 } +func (m *EventCreatePool) GetEndKey() string { + if m != nil { + return m.EndKey + } + return "" +} + // EventPoolEnabled ... // emitted_by: EndBlock(gov) type EventPoolEnabled struct { @@ -737,55 +747,56 @@ func init() { func init() { proto.RegisterFile("kyve/pool/v1beta1/events.proto", fileDescriptor_c1828a100d789238) } var fileDescriptor_c1828a100d789238 = []byte{ - // 763 bytes of a gzipped FileDescriptorProto + // 777 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xcf, 0x6e, 0x33, 0x35, 0x10, 0xcf, 0x26, 0x69, 0xda, 0x38, 0x4d, 0x42, 0x96, 0x52, 0x96, 0x82, 0x42, 0x08, 0x2a, 0x14, 0x0e, 0x89, 0x0a, 0x9c, 0x91, 0xe8, 0x1f, 0xa4, 0xa8, 0x12, 0xaa, 0x12, 0x15, 0x04, 0x17, 0xcb, 0x89, 0x27, 0x1b, 0xab, 0xbb, 0xf6, 0xca, 0xf6, 0x26, 0x4d, 0x9f, 0x82, 0x17, 0xe9, 0x7b, 0xf4, - 0x58, 0x09, 0x0e, 0x9c, 0x10, 0x6a, 0x5f, 0x04, 0xd9, 0xbb, 0x9b, 0x2f, 0x69, 0xf7, 0xfb, 0xd4, - 0xeb, 0x77, 0xf3, 0xcc, 0xef, 0x37, 0xe3, 0xf1, 0xcc, 0xfc, 0x76, 0x51, 0xfb, 0x7a, 0x39, 0x87, - 0x7e, 0x24, 0x44, 0xd0, 0x9f, 0x1f, 0x8f, 0x41, 0x93, 0xe3, 0x3e, 0xcc, 0x81, 0x6b, 0xd5, 0x8b, - 0xa4, 0xd0, 0xc2, 0x6d, 0x19, 0xbc, 0x67, 0xf0, 0x5e, 0x8a, 0x1f, 0xec, 0xf9, 0xc2, 0x17, 0x16, - 0xed, 0x9b, 0x53, 0x42, 0x3c, 0xc8, 0x49, 0x14, 0x11, 0x49, 0xc2, 0x34, 0x51, 0xf7, 0xce, 0x41, - 0xad, 0x73, 0x93, 0xf9, 0x2a, 0xa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, 0x3d, 0x8b, 0xc7, 0xbd, 0x89, 0x08, 0xfb, 0x17, + 0xbf, 0xff, 0x7a, 0xfe, 0x0b, 0xe8, 0x85, 0x90, 0xd7, 0xfd, 0xc9, 0x8c, 0x30, 0xde, 0xbf, 0x49, + 0xfe, 0x43, 0x7a, 0x19, 0x81, 0x1a, 0x57, 0xec, 0xff, 0xe7, 0xfb, 0xff, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x25, 0xc2, 0xe8, 0xb7, 0xea, 0x06, 0x00, 0x00, } func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) { @@ -858,6 +869,13 @@ func (m *EventCreatePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.EndKey) > 0 { + i -= len(m.EndKey) + copy(dAtA[i:], m.EndKey) + i = encodeVarintEvents(dAtA, i, uint64(len(m.EndKey))) + i-- + dAtA[i] = 0x7a + } if m.CompressionId != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.CompressionId)) i-- @@ -1337,6 +1355,10 @@ func (m *EventCreatePool) Size() (n int) { if m.CompressionId != 0 { n += 1 + sovEvents(uint64(m.CompressionId)) } + l = len(m.EndKey) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -2027,6 +2049,38 @@ func (m *EventCreatePool) Unmarshal(dAtA []byte) error { break } } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EndKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/pool/types/msgs.go b/x/pool/types/msgs.go index 3996bc6e..8edc9e71 100644 --- a/x/pool/types/msgs.go +++ b/x/pool/types/msgs.go @@ -69,6 +69,7 @@ type PoolUpdate struct { MaxBundleSize *uint64 StorageProviderId *uint32 CompressionId *uint32 + EndKey *string } // ValidateBasic does a sanity check on the provided data. diff --git a/x/pool/types/pool.pb.go b/x/pool/types/pool.pb.go index a02bd2e7..ad02386f 100644 --- a/x/pool/types/pool.pb.go +++ b/x/pool/types/pool.pb.go @@ -49,6 +49,9 @@ const ( // POOL_STATUS_VOTING_POWER_TOO_HIGH indicates, that one validator // has more than 50% voting power and that the pool is halted POOL_STATUS_VOTING_POWER_TOO_HIGH PoolStatus = 6 + // POOL_STATUS_END_KEY_REACHED indicates, that the end key has been + // reached and that the pool is halted + POOL_STATUS_END_KEY_REACHED PoolStatus = 7 ) var PoolStatus_name = map[int32]string{ @@ -59,6 +62,7 @@ var PoolStatus_name = map[int32]string{ 4: "POOL_STATUS_NOT_ENOUGH_DELEGATION", 5: "POOL_STATUS_UPGRADING", 6: "POOL_STATUS_VOTING_POWER_TOO_HIGH", + 7: "POOL_STATUS_END_KEY_REACHED", } var PoolStatus_value = map[string]int32{ @@ -69,6 +73,7 @@ var PoolStatus_value = map[string]int32{ "POOL_STATUS_NOT_ENOUGH_DELEGATION": 4, "POOL_STATUS_UPGRADING": 5, "POOL_STATUS_VOTING_POWER_TOO_HIGH": 6, + "POOL_STATUS_END_KEY_REACHED": 7, } func (x PoolStatus) String() string { @@ -263,6 +268,9 @@ type Pool struct { CurrentStorageProviderId uint32 `protobuf:"varint,18,opt,name=current_storage_provider_id,json=currentStorageProviderId,proto3" json:"current_storage_provider_id,omitempty"` // compression_id ... CurrentCompressionId uint32 `protobuf:"varint,19,opt,name=current_compression_id,json=currentCompressionId,proto3" json:"current_compression_id,omitempty"` + // end_key is the last key before the pool should stop indexing, it is + // inclusive + EndKey string `protobuf:"bytes,20,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` } func (m *Pool) Reset() { *m = Pool{} } @@ -431,6 +439,13 @@ func (m *Pool) GetCurrentCompressionId() uint32 { return 0 } +func (m *Pool) GetEndKey() string { + if m != nil { + return m.EndKey + } + return "" +} + func init() { proto.RegisterEnum("kyve.pool.v1beta1.PoolStatus", PoolStatus_name, PoolStatus_value) proto.RegisterType((*Protocol)(nil), "kyve.pool.v1beta1.Protocol") @@ -441,56 +456,59 @@ func init() { func init() { proto.RegisterFile("kyve/pool/v1beta1/pool.proto", fileDescriptor_40c1730f47ff2ef8) } var fileDescriptor_40c1730f47ff2ef8 = []byte{ - // 784 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x73, 0xe3, 0x34, - 0x14, 0xc7, 0xe3, 0x6e, 0xda, 0x4d, 0x94, 0x36, 0xcd, 0x8a, 0x52, 0x44, 0xcb, 0x84, 0x6c, 0x99, - 0x85, 0xc0, 0x21, 0x99, 0x05, 0x66, 0x38, 0x71, 0x48, 0x1b, 0x6f, 0xea, 0xd9, 0x4e, 0x9c, 0xb1, - 0x93, 0xee, 0xc0, 0x45, 0xa3, 0xd8, 0x5a, 0x47, 0x53, 0xdb, 0xf2, 0xc8, 0x72, 0xb6, 0xd9, 0x23, - 0x27, 0x8e, 0xfc, 0x0f, 0xfc, 0x33, 0x1c, 0xf7, 0xc8, 0x81, 0x03, 0xd3, 0xf2, 0x87, 0x30, 0x92, - 0x7f, 0x90, 0x2d, 0x9c, 0xb8, 0xbd, 0xf7, 0xf9, 0x7e, 0x9f, 0x9e, 0x94, 0xf7, 0x1c, 0xf0, 0xc9, - 0xcd, 0x66, 0x4d, 0x87, 0x09, 0xe7, 0xe1, 0x70, 0xfd, 0x7c, 0x49, 0x25, 0x79, 0xae, 0x93, 0x41, - 0x22,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, 0x76, 0xea, 0xf0, 0x63, 0xf0, 0xe1, 0x7b, 0xf7, 0x99, 0x4d, - 0x9c, 0xd1, 0xd8, 0x9a, 0x4e, 0x3a, 0xbb, 0x0f, 0x4f, 0xb8, 0xb6, 0xe7, 0xd6, 0x74, 0x82, 0x67, - 0xf6, 0x2b, 0xd3, 0xc1, 0x73, 0xdb, 0xc6, 0x97, 0xd6, 0xe4, 0xb2, 0xb3, 0x77, 0x52, 0xff, 0xf9, - 0xd7, 0x6e, 0xed, 0xfc, 0xe2, 0xb7, 0xbb, 0xae, 0xf1, 0xee, 0xae, 0x6b, 0xfc, 0x79, 0xd7, 0x35, - 0x7e, 0xb9, 0xef, 0xd6, 0xde, 0xdd, 0x77, 0x6b, 0xbf, 0xdf, 0x77, 0x6b, 0x3f, 0x7e, 0x19, 0x30, - 0xb9, 0xca, 0x96, 0x03, 0x8f, 0x47, 0xc3, 0x97, 0x3f, 0x5c, 0x9b, 0x53, 0x2a, 0xdf, 0x70, 0x71, - 0x33, 0xf4, 0x56, 0x84, 0xc5, 0xc3, 0xdb, 0xfc, 0xaf, 0x52, 0x6e, 0x12, 0x9a, 0x2e, 0xf7, 0xf4, - 0xb4, 0xbf, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x76, 0xe7, 0x4a, 0x49, 0x44, 0x05, 0x00, 0x00, + // 820 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6f, 0xdb, 0x36, + 0x14, 0xc7, 0x2d, 0xd7, 0x49, 0x6c, 0x3a, 0x71, 0x5c, 0xce, 0x4b, 0xb9, 0x78, 0x70, 0xdd, 0x0c, + 0xdd, 0xbc, 0x1d, 0x6c, 0x74, 0x1b, 0xb0, 0xd3, 0x0e, 0x8e, 0xa5, 0x3a, 0x42, 0x02, 0xc9, 0x90, + 0xec, 0x14, 0xdd, 0x85, 0xa0, 0x2d, 0x56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 0xbc, 0xe5, 0xc9, 0xcd, 0x60, 0xb1, 0x24, 0x2c, 0x1a, 0xdc, 0xe6, 0x3f, 0x59, 0xb1, 0x8e, 0x69, + 0x3a, 0xdf, 0x57, 0x73, 0xf2, 0xdd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x06, 0x44, 0xea, 0xbf, + 0x7e, 0x05, 0x00, 0x00, } func (m *Protocol) Marshal() (dAtA []byte, err error) { @@ -602,6 +620,15 @@ func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.EndKey) > 0 { + i -= len(m.EndKey) + copy(dAtA[i:], m.EndKey) + i = encodeVarintPool(dAtA, i, uint64(len(m.EndKey))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } if m.CurrentCompressionId != 0 { i = encodeVarintPool(dAtA, i, uint64(m.CurrentCompressionId)) i-- @@ -867,6 +894,10 @@ func (m *Pool) Size() (n int) { if m.CurrentCompressionId != 0 { n += 2 + sovPool(uint64(m.CurrentCompressionId)) } + l = len(m.EndKey) + if l > 0 { + n += 2 + l + sovPool(uint64(l)) + } return n } @@ -1677,6 +1708,38 @@ func (m *Pool) Unmarshal(dAtA []byte) error { break } } + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + 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 ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EndKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPool(dAtA[iNdEx:]) diff --git a/x/pool/types/tx.pb.go b/x/pool/types/tx.pb.go index f7c6ab36..76953d6e 100644 --- a/x/pool/types/tx.pb.go +++ b/x/pool/types/tx.pb.go @@ -59,6 +59,8 @@ type MsgCreatePool struct { StorageProviderId uint32 `protobuf:"varint,13,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` // compression_id ... CompressionId uint32 `protobuf:"varint,14,opt,name=compression_id,json=compressionId,proto3" json:"compression_id,omitempty"` + // end_key ... + EndKey string `protobuf:"bytes,15,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` } func (m *MsgCreatePool) Reset() { *m = MsgCreatePool{} } @@ -192,6 +194,13 @@ func (m *MsgCreatePool) GetCompressionId() uint32 { return 0 } +func (m *MsgCreatePool) GetEndKey() string { + if m != nil { + return m.EndKey + } + return "" +} + // MsgCreatePoolResponse defines the Msg/CreatePool response type. type MsgCreatePoolResponse struct { } @@ -846,60 +855,61 @@ func init() { func init() { proto.RegisterFile("kyve/pool/v1beta1/tx.proto", fileDescriptor_20ddefdf83388ddc) } var fileDescriptor_20ddefdf83388ddc = []byte{ - // 851 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0xdb, 0x36, - 0x14, 0x8e, 0x1c, 0x27, 0x4d, 0x98, 0xd8, 0x41, 0xb9, 0x2c, 0x61, 0x34, 0xc0, 0x8b, 0x3d, 0x6c, - 0x73, 0x8d, 0xcd, 0x42, 0xba, 0x62, 0x87, 0xdd, 0x9a, 0xb6, 0x87, 0xa0, 0xf0, 0x50, 0xc8, 0xe8, - 0x7e, 0x02, 0x13, 0x68, 0x93, 0x95, 0x89, 0x48, 0xa2, 0x40, 0xd2, 0xae, 0xdd, 0xed, 0xb0, 0xed, - 0xb6, 0xdb, 0xfe, 0x94, 0x1e, 0xf6, 0x47, 0xec, 0x32, 0xa0, 0xd8, 0x69, 0xc7, 0x21, 0x39, 0xf4, - 0xbe, 0xbf, 0x60, 0x20, 0x25, 0xcb, 0x12, 0x6c, 0x35, 0xdb, 0xba, 0x9c, 0xec, 0xf7, 0xbe, 0x4f, - 0x7c, 0x1f, 0x1f, 0xdf, 0x47, 0x09, 0xd8, 0xe7, 0xb3, 0x09, 0x75, 0x62, 0xce, 0x03, 0x67, 0x72, - 0x32, 0xa0, 0x0a, 0x9f, 0x38, 0x6a, 0xda, 0x8d, 0x05, 0x57, 0x1c, 0xde, 0xd4, 0x58, 0x57, 0x63, - 0xdd, 0x14, 0xb3, 0x0f, 0x87, 0x5c, 0x86, 0x5c, 0x3a, 0xa1, 0xf4, 0x9d, 0xc9, 0x89, 0xfe, 0x49, - 0xb8, 0xf6, 0x51, 0x02, 0x78, 0x26, 0x72, 0x92, 0x20, 0x81, 0x5a, 0x3f, 0x55, 0x41, 0xad, 0x27, - 0xfd, 0x7b, 0x82, 0x62, 0x45, 0x1f, 0x71, 0x1e, 0xc0, 0x8f, 0xc1, 0x36, 0x1e, 0xab, 0x11, 0x17, - 0x4c, 0xcd, 0x90, 0x75, 0x6c, 0xb5, 0xb7, 0x4f, 0xd1, 0xef, 0xbf, 0x7c, 0xb8, 0x9f, 0x3e, 0x76, - 0x97, 0x10, 0x41, 0xa5, 0xec, 0x2b, 0xc1, 0x22, 0xdf, 0x5d, 0x50, 0x21, 0x04, 0xd5, 0x08, 0x87, - 0x14, 0x55, 0xf4, 0x23, 0xae, 0xf9, 0x0f, 0x11, 0xb8, 0x21, 0xc6, 0x91, 0x62, 0x21, 0x45, 0xeb, - 0x26, 0x3d, 0x0f, 0x35, 0x3b, 0xe0, 0x3e, 0x47, 0xd5, 0x84, 0xad, 0xff, 0xc3, 0x03, 0xb0, 0x39, - 0xe4, 0xd1, 0x13, 0xe6, 0xa3, 0x0d, 0x93, 0x4d, 0x23, 0xf8, 0x16, 0xd8, 0x96, 0x0a, 0x0b, 0xe5, - 0x9d, 0xd3, 0x19, 0xda, 0x34, 0x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3a, 0x0f, 0xbf, 0xfc, 0xec, 0xc1, 0xa7, 0x54, 0x3d, - 0xe5, 0xe2, 0xdc, 0x19, 0x8e, 0x30, 0x8b, 0x9c, 0x69, 0xf2, 0xe1, 0xa5, 0x66, 0x31, 0x95, 0x83, - 0x4d, 0xf3, 0xb5, 0xf4, 0xd1, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0x52, 0x92, 0x7f, 0x92, + // 867 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x3a, 0xce, 0xbf, 0x97, 0xd8, 0x51, 0x87, 0x90, 0x6c, 0x16, 0xc9, 0x24, 0x41, 0x40, + 0x1a, 0x81, 0x57, 0x29, 0x15, 0x07, 0x6e, 0x4d, 0xdb, 0x43, 0x14, 0x05, 0x55, 0x8e, 0xca, 0x5f, + 0x89, 0xd5, 0xd8, 0x33, 0x5d, 0x8f, 0xb2, 0x3b, 0xb3, 0x9a, 0x19, 0xbb, 0x71, 0xe1, 0x00, 0x7c, + 0x02, 0x3e, 0x03, 0x9f, 0xa0, 0x07, 0x3e, 0x04, 0x17, 0xa4, 0x8a, 0x13, 0x47, 0x94, 0x1c, 0x7a, + 0xe7, 0x13, 0xa0, 0x99, 0x5d, 0xaf, 0x77, 0x65, 0x6f, 0x03, 0x94, 0x9c, 0xec, 0xf7, 0x7e, 0xbf, + 0x9d, 0xf7, 0x9b, 0x37, 0xef, 0x37, 0xbb, 0xe0, 0x9d, 0x8f, 0x86, 0xd4, 0x4f, 0x84, 0x88, 0xfc, + 0xe1, 0x61, 0x97, 0x6a, 0x7c, 0xe8, 0xeb, 0x8b, 0x76, 0x22, 0x85, 0x16, 0xe8, 0x96, 0xc1, 0xda, + 0x06, 0x6b, 0x67, 0x98, 0xb7, 0xd5, 0x13, 0x2a, 0x16, 0xca, 0x8f, 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0xe7, 0x16, 0x43, 0xef, 0x42, 0x33, 0x66, 0x3c, 0x20, 0x34, 0xa2, 0xa1, 0x05, 0xdd, 0x15, + 0xcb, 0x6e, 0xc4, 0x8c, 0x3f, 0xc8, 0x93, 0xe8, 0x3d, 0x58, 0x8f, 0xf1, 0x45, 0xd0, 0x1d, 0x70, + 0x12, 0xd1, 0x40, 0xb1, 0x67, 0xd4, 0x85, 0x8c, 0x87, 0x2f, 0x8e, 0x6c, 0xf6, 0x8c, 0x3d, 0xb3, + 0x0d, 0x19, 0x52, 0xa9, 0xcc, 0x3a, 0xab, 0x69, 0x43, 0xb2, 0x10, 0x79, 0xb0, 0xdc, 0x65, 0x1c, + 0x4b, 0x46, 0x95, 0xbb, 0x96, 0xee, 0x71, 0x1c, 0xa3, 0x36, 0xbc, 0xa1, 0xb4, 0x90, 0x38, 0xa4, + 0xe6, 0x08, 0x87, 0x8c, 0x50, 0x19, 0x30, 0xe2, 0x36, 0x76, 0x9c, 0xfd, 0x46, 0xe7, 0x56, 0x06, + 0x3d, 0xca, 0x90, 0x63, 0x62, 0x44, 0xf7, 0x44, 0x9c, 0x98, 0x73, 0x32, 0x9b, 0x65, 0xc4, 0x6d, + 0x5a, 0x6a, 0xa3, 0x90, 0x3d, 0x26, 0x68, 0x0b, 0x96, 0x28, 0x27, 0xb6, 0xab, 0xeb, 0x69, 0xc3, + 0x29, 0x27, 0x27, 0x74, 0xf4, 0x49, 0xf3, 0xc7, 0x97, 0xcf, 0x0f, 0x26, 0x47, 0xbb, 0xb7, 0x05, + 0x6f, 0x96, 0x66, 0xa4, 0x43, 0x55, 0x22, 0xb8, 0xa2, 0x7b, 0x3f, 0x38, 0x76, 0x7a, 0x1e, 0x27, + 0xe4, 0x75, 0xa7, 0xa7, 0x09, 0x35, 0x46, 0xec, 0xec, 0xd4, 0x3b, 0x35, 0x46, 0x4c, 0xa3, 0x12, + 0x3c, 0x32, 0x07, 0x38, 0x9e, 0x9c, 0x2c, 0xac, 0x10, 0x37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@ func (m *MsgCreatePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.EndKey) > 0 { + i -= len(m.EndKey) + copy(dAtA[i:], m.EndKey) + i = encodeVarintTx(dAtA, i, uint64(len(m.EndKey))) + i-- + dAtA[i] = 0x7a + } if m.CompressionId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CompressionId)) i-- @@ -1811,6 +1828,10 @@ func (m *MsgCreatePool) Size() (n int) { if m.CompressionId != 0 { n += 1 + sovTx(uint64(m.CompressionId)) } + l = len(m.EndKey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2399,6 +2420,38 @@ func (m *MsgCreatePool) Unmarshal(dAtA []byte) error { break } } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndKey", 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.EndKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/query/keeper/helper.go b/x/query/keeper/helper.go index 8847f21e..2472639d 100644 --- a/x/query/keeper/helper.go +++ b/x/query/keeper/helper.go @@ -92,6 +92,8 @@ func (k Keeper) GetPoolStatus(ctx sdk.Context, pool *pooltypes.Pool) pooltypes.P poolStatus = pooltypes.POOL_STATUS_UPGRADING } else if pool.Disabled { poolStatus = pooltypes.POOL_STATUS_DISABLED + } else if pool.EndKey != "" && pool.EndKey == pool.CurrentKey { + poolStatus = pooltypes.POOL_STATUS_END_KEY_REACHED } else if totalDelegation < pool.MinDelegation { poolStatus = pooltypes.POOL_STATUS_NOT_ENOUGH_DELEGATION } else if highestDelegation*2 > totalDelegation {