diff --git a/proto/sedachain/batching/v1/query.proto b/proto/sedachain/batching/v1/query.proto index 3cfd7d57..563ae916 100644 --- a/proto/sedachain/batching/v1/query.proto +++ b/proto/sedachain/batching/v1/query.proto @@ -66,6 +66,9 @@ message QueryBatchForHeightResponse { message QueryBatchesRequest { // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 1; + // with_unsigned indicates whether to return batches without + // signatures or not. + bool with_unsigned = 2; } // The response message for QueryBatches RPC. diff --git a/x/batching/client/cli/query.go b/x/batching/client/cli/query.go index 622dbe38..b9b2fa50 100644 --- a/x/batching/client/cli/query.go +++ b/x/batching/client/cli/query.go @@ -12,6 +12,8 @@ import ( "github.com/sedaprotocol/seda-chain/x/batching/types" ) +const flagWithUnsigned = "with-unsigned" + // GetQueryCmd returns the CLI query commands for batching module. func GetQueryCmd(_ string) *cobra.Command { cmd := &cobra.Command{ @@ -104,7 +106,7 @@ func GetCmdQueryBatchByHeight() *cobra.Command { func GetCmdQueryBatches() *cobra.Command { cmd := &cobra.Command{ Use: "batches", - Short: "List all batches in the store", + Short: "Query all batches", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -117,7 +119,17 @@ func GetCmdQueryBatches() *cobra.Command { if err != nil { return err } - res, err := queryClient.Batches(cmd.Context(), &types.QueryBatchesRequest{Pagination: pageReq}) + + withUnsigned, err := cmd.Flags().GetBool(flagWithUnsigned) + if err != nil { + return err + } + + res, err := queryClient.Batches(cmd.Context(), + &types.QueryBatchesRequest{ + Pagination: pageReq, + WithUnsigned: withUnsigned, + }) if err != nil { return err } @@ -125,6 +137,7 @@ func GetCmdQueryBatches() *cobra.Command { }, } + cmd.Flags().Bool(flagWithUnsigned, false, "include batches without signatures") flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "batches") return cmd diff --git a/x/batching/keeper/batch.go b/x/batching/keeper/batch.go index f63ceeac..19fc32ac 100644 --- a/x/batching/keeper/batch.go +++ b/x/batching/keeper/batch.go @@ -215,9 +215,9 @@ func (k Keeper) GetTreeEntriesForBatch(ctx context.Context, batchNum uint64) (ty if err != nil { return types.BatchTreeEntries{}, err } - var valEntries []types.ValidatorTreeEntry - for _, kv := range valKvs { - valEntries = append(valEntries, kv.Value) + valEntries := make([]types.ValidatorTreeEntry, len(valKvs)) + for i, kv := range valKvs { + valEntries[i] = kv.Value } return types.BatchTreeEntries{ diff --git a/x/batching/keeper/genesis.go b/x/batching/keeper/genesis.go index d17e4ec1..bf5acdb2 100644 --- a/x/batching/keeper/genesis.go +++ b/x/batching/keeper/genesis.go @@ -49,13 +49,13 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState { if err != nil { panic(err) } - var entries []types.BatchTreeEntries - for _, batch := range batches { + entries := make([]types.BatchTreeEntries, len(batches)) + for i, batch := range batches { batchEntries, err := k.GetTreeEntriesForBatch(ctx, batch.BatchNumber) if err != nil { panic(err) } - entries = append(entries, batchEntries) + entries[i] = batchEntries } params, err := k.GetParams(ctx) if err != nil { diff --git a/x/batching/keeper/keeper_test.go b/x/batching/keeper/keeper_test.go index 3d43b69f..75bab747 100644 --- a/x/batching/keeper/keeper_test.go +++ b/x/batching/keeper/keeper_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/suite" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" @@ -21,8 +22,6 @@ import ( batchingtypes "github.com/sedaprotocol/seda-chain/x/batching/types" ) -var mockedByteArray = []byte("82a9dda829eb7f8ffe9fbe49e45d47d2dad9664fbb7adf72492e3c81ebd3e29134d9bc12212bf83c6840f10e8246b9db54a4859b7ccd0123d86e5872c1e5082") - type KeeperTestSuite struct { suite.Suite ctx sdk.Context diff --git a/x/batching/keeper/querier.go b/x/batching/keeper/querier.go index 39522977..719d39ac 100644 --- a/x/batching/keeper/querier.go +++ b/x/batching/keeper/querier.go @@ -5,6 +5,7 @@ import ( "errors" "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" @@ -68,7 +69,7 @@ func (q Querier) Batches(c context.Context, req *types.QueryBatchesRequest) (*ty batches, pageRes, err := query.CollectionFilteredPaginate( ctx, q.batches, req.Pagination, func(_ int64, value types.Batch) (bool, error) { - if value.BlockHeight > ctx.BlockHeight()+abci.BlockOffsetCollectPhase { + if !req.WithUnsigned && value.BlockHeight > ctx.BlockHeight()+abci.BlockOffsetCollectPhase { return false, nil } return true, nil diff --git a/x/batching/types/batching.pb.go b/x/batching/types/batching.pb.go index 32e9037e..4409ec2d 100644 --- a/x/batching/types/batching.pb.go +++ b/x/batching/types/batching.pb.go @@ -498,7 +498,7 @@ var fileDescriptor_5b2a028024867de2 = []byte{ 0x09, 0x4d, 0x93, 0x70, 0x42, 0xf7, 0x99, 0xe7, 0x70, 0xb2, 0x21, 0x4b, 0x4e, 0x89, 0x16, 0xd2, 0xf2, 0x8e, 0x0c, 0xef, 0xb8, 0x42, 0x0d, 0xed, 0x2d, 0xe8, 0x58, 0x3d, 0x9c, 0x7a, 0xad, 0x81, 0x33, 0xea, 0xe1, 0xb6, 0xf1, 0xaf, 0x28, 0x7a, 0x1f, 0x4e, 0x53, 0x29, 0x36, 0x3c, 0x89, 0xc3, - 0x15, 0x2b, 0xaa, 0x53, 0xe2, 0xb5, 0x0d, 0xe5, 0x5e, 0x89, 0x3f, 0x2a, 0xe1, 0xe1, 0x14, 0xce, + 0x15, 0xd3, 0xa4, 0xa8, 0xef, 0xb5, 0x0d, 0xe5, 0x5e, 0x89, 0x3f, 0x2a, 0xe1, 0xe1, 0x14, 0xce, 0xea, 0x46, 0x9f, 0x48, 0xc6, 0xbe, 0x49, 0xb4, 0xe4, 0x4c, 0x21, 0x0f, 0xda, 0xcc, 0x9a, 0x9e, 0x33, 0x38, 0x2c, 0xaa, 0x97, 0xee, 0xf0, 0x1f, 0x07, 0xd0, 0xd3, 0x5d, 0x2b, 0xbb, 0x94, 0x2d, 0xfa, 0x19, 0x5e, 0xab, 0xdb, 0x26, 0x94, 0x4a, 0xa6, 0x94, 0xf9, 0xc9, 0xbd, 0x60, 0xfa, 0x6f, @@ -528,7 +528,7 @@ var fileDescriptor_5b2a028024867de2 = []byte{ 0x8f, 0x9e, 0xdf, 0xf4, 0x9d, 0x17, 0x37, 0x7d, 0xe7, 0xaf, 0x9b, 0xbe, 0xf3, 0xeb, 0x6d, 0xff, 0xe0, 0xc5, 0x6d, 0xff, 0xe0, 0xcf, 0xdb, 0xfe, 0xc1, 0x4f, 0x97, 0x2f, 0x5d, 0x4c, 0x51, 0xde, 0x3c, 0x68, 0x91, 0x58, 0x1a, 0xe7, 0xc2, 0x3e, 0x93, 0xcf, 0xea, 0x87, 0xd2, 0x9c, 0xd0, 0xac, - 0x65, 0x58, 0x97, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x29, 0xd1, 0xdb, 0x80, 0x4b, 0x05, 0x00, + 0x65, 0x58, 0x97, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xea, 0x99, 0xbb, 0x79, 0x4b, 0x05, 0x00, 0x00, } diff --git a/x/batching/types/query.pb.go b/x/batching/types/query.pb.go index 43396da6..c65a2246 100644 --- a/x/batching/types/query.pb.go +++ b/x/batching/types/query.pb.go @@ -276,6 +276,9 @@ func (m *QueryBatchForHeightResponse) GetBatch() Batch { type QueryBatchesRequest struct { // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + // with_unsigned indicates whether to return batches without + // signatures or not. + WithUnsigned bool `protobuf:"varint,2,opt,name=with_unsigned,json=withUnsigned,proto3" json:"with_unsigned,omitempty"` } func (m *QueryBatchesRequest) Reset() { *m = QueryBatchesRequest{} } @@ -318,6 +321,13 @@ func (m *QueryBatchesRequest) GetPagination() *query.PageRequest { return nil } +func (m *QueryBatchesRequest) GetWithUnsigned() bool { + if m != nil { + return m.WithUnsigned + } + return false +} + // The response message for QueryBatches RPC. type QueryBatchesResponse struct { Batches []Batch `protobuf:"bytes,1,rep,name=batches,proto3" json:"batches"` @@ -484,55 +494,57 @@ func init() { func init() { proto.RegisterFile("sedachain/batching/v1/query.proto", fileDescriptor_351236f6b51194e8) } var fileDescriptor_351236f6b51194e8 = []byte{ - // 759 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0xee, 0x16, 0x2a, 0x71, 0xaa, 0x02, 0x03, 0x2a, 0xa9, 0x64, 0x85, 0x95, 0x20, 0x3f, 0x64, - 0x37, 0x2d, 0x84, 0x18, 0x43, 0xa2, 0xa2, 0x22, 0x1e, 0x34, 0xb2, 0x31, 0x12, 0x8d, 0xa6, 0x99, - 0x6d, 0xc7, 0xed, 0xc6, 0x76, 0xa7, 0xec, 0x4c, 0x1b, 0x09, 0xe1, 0xe2, 0xc1, 0x78, 0x52, 0x13, - 0xcf, 0x9e, 0xfd, 0x0b, 0xf4, 0x6f, 0xe0, 0x48, 0xe2, 0xc5, 0x93, 0x31, 0xe0, 0x1f, 0x62, 0xfa, - 0x76, 0xf6, 0x17, 0xb4, 0xb4, 0x7a, 0x5b, 0xde, 0x7c, 0xef, 0xfb, 0xbe, 0x79, 0xf3, 0x3e, 0x8a, - 0x26, 0x39, 0x2d, 0x93, 0x52, 0x85, 0x38, 0xae, 0x61, 0x11, 0x51, 0xaa, 0x38, 0xae, 0x6d, 0x34, - 0xf3, 0xc6, 0x56, 0x83, 0x7a, 0xdb, 0x7a, 0xdd, 0x63, 0x82, 0xe1, 0xf3, 0x21, 0x44, 0x0f, 0x20, - 0x7a, 0x33, 0x9f, 0x1b, 0xb5, 0x99, 0xcd, 0x00, 0x61, 0xb4, 0xbe, 0x7c, 0x70,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xc0, 0xd8, - 0x39, 0x92, 0xaa, 0xdd, 0xd5, 0x87, 0x7b, 0x07, 0xaa, 0xb2, 0x7f, 0xa0, 0x2a, 0xbf, 0x0f, 0x54, - 0xe5, 0xd3, 0xa1, 0x9a, 0xda, 0x3f, 0x54, 0x53, 0x3f, 0x0f, 0xd5, 0xd4, 0xf3, 0x45, 0xdb, 0x11, - 0x95, 0x86, 0xa5, 0x97, 0x58, 0x0d, 0x78, 0xe1, 0x07, 0xaf, 0xc4, 0xaa, 0x71, 0x91, 0x37, 0x91, - 0x8c, 0xd8, 0xae, 0x53, 0x6e, 0x9d, 0x02, 0xd4, 0xe2, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, - 0xa5, 0x3b, 0x99, 0xfd, 0x07, 0x00, 0x00, + // 786 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x4f, 0x13, 0x5d, + 0x14, 0xed, 0x14, 0xfa, 0xf1, 0x7d, 0xb7, 0xf0, 0x01, 0x0f, 0x54, 0x52, 0x49, 0x85, 0x81, 0x20, + 0x3f, 0x64, 0x26, 0x2d, 0x84, 0x18, 0x43, 0xa2, 0xa2, 0x22, 0x2e, 0x34, 0x32, 0x51, 0x89, 0xc6, + 0xa4, 0x79, 0xd3, 0x3e, 0xa7, 0x13, 0xdb, 0x79, 0x65, 0xde, 0x6b, 0x95, 0x10, 0x36, 0x2c, 0x8c, + 0x2b, 0x35, 0x71, 0xed, 0xda, 0xbf, 0x40, 0xff, 0x06, 0x96, 0x24, 0x6e, 0x5c, 0x19, 0x03, 0xfe, + 0x21, 0xa6, 0x77, 0x5e, 0xdb, 0x29, 0xb4, 0xb4, 0xba, 0x1b, 0xee, 0x9c, 0x7b, 0xee, 0xb9, 0x77, + 0xce, 0xa1, 0x30, 0x29, 0x58, 0x8e, 0x66, 0xf3, 0xd4, 0xf5, 0x4c, 0x9b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0x73, 0x37, + 0x1c, 0xef, 0x3d, 0xf2, 0x56, 0x83, 0x3e, 0xe5, 0x74, 0x32, 0xdf, 0x71, 0x7a, 0x3d, 0x93, 0x89, + 0x85, 0xae, 0xb0, 0x4a, 0xe2, 0x34, 0x4a, 0x4c, 0x92, 0xf1, 0xf6, 0x12, 0x99, 0x20, 0x9f, 0x35, + 0x80, 0x86, 0xa5, 0xc8, 0xe2, 0x59, 0x13, 0x4e, 0xb9, 0x3f, 0x61, 0x74, 0x0b, 0x57, 0x9a, 0xae, + 0xa1, 0xa6, 0x65, 0x92, 0x6e, 0xa9, 0x29, 0x14, 0x02, 0x73, 0xf7, 0x44, 0xaa, 0xf6, 0xd6, 0xee, + 0x1f, 0x1c, 0x25, 0xb5, 0xc3, 0xa3, 0xa4, 0xf6, 0xf3, 0x28, 0xa9, 0x7d, 0x38, 0x4e, 0x46, 0x0e, + 0x8f, 0x93, 0x91, 0xef, 0xc7, 0xc9, 0xc8, 0xb3, 0x25, 0xc7, 0x95, 0xf9, 0xb2, 0x6d, 0x64, 0x79, + 0x11, 0x79, 0xf1, 0x67, 0x31, 0xcb, 0x0b, 0xe1, 0x21, 0xaf, 0x1b, 0x63, 0xe4, 0x4e, 0x89, 0x09, + 0xfb, 0x1f, 0x44, 0x2d, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x14, 0x29, 0x48, 0x83, 0x23, 0x08, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -933,6 +945,16 @@ func (m *QueryBatchesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.WithUnsigned { + i-- + if m.WithUnsigned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -1160,6 +1182,9 @@ func (m *QueryBatchesRequest) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.WithUnsigned { + n += 2 + } return n } @@ -1737,6 +1762,26 @@ func (m *QueryBatchesRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithUnsigned", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithUnsigned = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:])