From d7f4681f9933c77fde3d8577aee50b12bee70797 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 14:42:09 +0200 Subject: [PATCH] chore: added more detailed descriptions --- docs/static/openapi.yml | 12 ++++++++++-- proto/kyve/pool/v1beta1/events.proto | 3 ++- proto/kyve/pool/v1beta1/pool.proto | 3 ++- x/bundles/keeper/logic_bundles.go | 4 +++- x/pool/types/events.pb.go | 3 ++- x/pool/types/pool.pb.go | 3 ++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 1e7d442f..85e92e68 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -4990,7 +4990,11 @@ paths: description: compression_id ... end_key: type: string - description: end_key ... + title: >- + end_key is the last key before the pool should stop + indexing, it is + + inclusive bundle_proposal: description: bundle_proposal ... type: object @@ -5527,7 +5531,11 @@ paths: description: compression_id ... end_key: type: string - description: end_key ... + title: >- + end_key is the last key before the pool should stop + indexing, it is + + inclusive bundle_proposal: description: bundle_proposal ... type: object diff --git a/proto/kyve/pool/v1beta1/events.proto b/proto/kyve/pool/v1beta1/events.proto index 18571628..9b060641 100644 --- a/proto/kyve/pool/v1beta1/events.proto +++ b/proto/kyve/pool/v1beta1/events.proto @@ -57,7 +57,8 @@ 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 + // end_key is the last key before the pool should stop indexing, it is + // inclusive string end_key = 15; } diff --git a/proto/kyve/pool/v1beta1/pool.proto b/proto/kyve/pool/v1beta1/pool.proto index df5a16fb..6989df43 100644 --- a/proto/kyve/pool/v1beta1/pool.proto +++ b/proto/kyve/pool/v1beta1/pool.proto @@ -113,6 +113,7 @@ message Pool { // compression_id ... uint32 current_compression_id = 19; - // end_key ... + // end_key is the last key before the pool should stop indexing, it is + // inclusive string end_key = 20; } diff --git a/x/bundles/keeper/logic_bundles.go b/x/bundles/keeper/logic_bundles.go index c0947102..c7311594 100644 --- a/x/bundles/keeper/logic_bundles.go +++ b/x/bundles/keeper/logic_bundles.go @@ -31,7 +31,9 @@ func (k Keeper) AssertPoolCanRun(ctx sdk.Context, poolId uint64) error { return types.ErrPoolDisabled } - // Error if the end key is reached + // Error if the end key is reached. The chain 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 } diff --git a/x/pool/types/events.pb.go b/x/pool/types/events.pb.go index 8ab58a3d..3ecaed5d 100644 --- a/x/pool/types/events.pb.go +++ b/x/pool/types/events.pb.go @@ -127,7 +127,8 @@ 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 + // 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"` } diff --git a/x/pool/types/pool.pb.go b/x/pool/types/pool.pb.go index 3f9cc5c4..ad02386f 100644 --- a/x/pool/types/pool.pb.go +++ b/x/pool/types/pool.pb.go @@ -268,7 +268,8 @@ 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 ... + // 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"` }