From 428ee81d30448e2f9f18761a3cdbee9ddcf70fae Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Wed, 13 Mar 2024 16:50:51 -0400 Subject: [PATCH 1/7] update protobuf and add tests --- manifest/manifest.go | 38 +- manifest/manifest_test.go | 36 ++ manifest/package.go | 25 +- manifest/package_test.go | 41 ++ manifest/reader.go | 117 +++-- pb/sf/substreams/intern/v2/deltas.pb.go | 321 ++---------- pb/sf/substreams/intern/v2/service.pb.go | 2 +- pb/sf/substreams/options.pb.go | 2 +- pb/sf/substreams/rpc/v2/service.pb.go | 2 +- .../substreams/sink/service/v1/service.pb.go | 2 +- pb/sf/substreams/v1/clock.pb.go | 2 +- pb/sf/substreams/v1/deltas.pb.go | 314 ++++++++++++ pb/sf/substreams/v1/modules.go | 3 + pb/sf/substreams/v1/modules.pb.go | 458 ++++++++++++------ pb/sf/substreams/v1/package.pb.go | 151 +++--- pipeline/exec/storeexec.go | 9 +- pipeline/outputmodules/validate.go | 16 + pipeline/pipeline.go | 10 +- proto/sf/substreams/v1/modules.proto | 12 + proto/sf/substreams/v1/package.proto | 2 + storage/store/base_store.go | 3 +- storage/store/delta.go | 22 +- storage/store/delta_test.go | 34 +- storage/store/interface.go | 9 +- storage/store/value_delete.go | 8 +- storage/store/value_get.go | 26 +- storage/store/value_set.go | 16 +- 27 files changed, 1065 insertions(+), 616 deletions(-) create mode 100644 pb/sf/substreams/v1/deltas.pb.go diff --git a/manifest/manifest.go b/manifest/manifest.go index b74834e64..ed74ee21c 100644 --- a/manifest/manifest.go +++ b/manifest/manifest.go @@ -24,8 +24,9 @@ func init() { } const ( - ModuleKindStore = "store" - ModuleKindMap = "map" + ModuleKindStore = "store" + ModuleKindMap = "map" + ModuleKindBlockIndex = "blockIndex" ) // Manifest is a YAML structure used to create a Package and its list @@ -39,9 +40,10 @@ type Manifest struct { Modules []*Module `yaml:"modules"` Params map[string]string `yaml:"params"` - Network string `yaml:"network"` - Networks map[string]*NetworkParams `yaml:"networks"` - Sink *Sink `yaml:"sink"` + BlockFilters map[string]string `yaml:"blockFilters"` + Network string `yaml:"network"` + Networks map[string]*NetworkParams `yaml:"networks"` + Sink *Sink `yaml:"sink"` Graph *ModuleGraph `yaml:"-"` Workdir string `yaml:"-"` @@ -82,10 +84,11 @@ type Protobuf struct { } type Module struct { - Name string `yaml:"name"` - Doc string `yaml:"doc"` - Kind string `yaml:"kind"` - InitialBlock *uint64 `yaml:"initialBlock"` + Name string `yaml:"name"` + Doc string `yaml:"doc"` + Kind string `yaml:"kind"` + InitialBlock *uint64 `yaml:"initialBlock"` + BlockFilter BlockFilter `yaml:"blockFilter"` UpdatePolicy string `yaml:"updatePolicy"` ValueType string `yaml:"valueType"` @@ -96,6 +99,11 @@ type Module struct { Use string `yaml:"use"` } +type BlockFilter struct { + Module string `yaml:"module"` + Query string `yaml:"query"` +} + type Input struct { Source string `yaml:"source"` Store string `yaml:"store"` @@ -282,6 +290,9 @@ func (m *Module) ToProtoWASM(codeIndex uint32) (*pbsubstreams.Module, error) { m.setOutputToProto(out) m.setKindToProto(out) + + m.setBlockFilterToProto(out) + err := m.setInputsToProto(out) if err != nil { return nil, fmt.Errorf("setting input for module, %s: %w", m.Name, err) @@ -290,6 +301,15 @@ func (m *Module) ToProtoWASM(codeIndex uint32) (*pbsubstreams.Module, error) { return out, nil } +func (m *Module) setBlockFilterToProto(pbModule *pbsubstreams.Module) { + if m.BlockFilter.Module != "" { + pbModule.BlockFilter = &pbsubstreams.Module_BlockFilter{ + Module: m.BlockFilter.Module, + Query: m.BlockFilter.Query, + } + } +} + func (m *Module) setInputsToProto(pbModule *pbsubstreams.Module) error { for i, input := range m.Inputs { if input.Source != "" { diff --git a/manifest/manifest_test.go b/manifest/manifest_test.go index 48b1bcded..eed0b4cca 100644 --- a/manifest/manifest_test.go +++ b/manifest/manifest_test.go @@ -77,6 +77,42 @@ inputs: Inputs: []*Input{{Source: "proto:sf.ethereum.type.v1.Block"}, {Store: "pairs"}, {Map: "map_clocks"}}, }, }, + { + name: "basic index", + rawYamlInput: `--- +name: basic_index +kind: blockIndex +output: + type: proto:sf.substreams.index.v1.Keys +`, + expectedOutput: Module{ + Kind: ModuleKindBlockIndex, + Name: "basic_index", + Output: StreamOutput{Type: "proto:sf.substreams.index.v1.Keys"}, + }, + }, + { + name: "basic with block filter", + rawYamlInput: `--- +name: bf_module +kind: map +blockFilter: + module: basic_index + query: this is my query +output: + type: proto:sf.substreams.database.changes.v1 +`, + + expectedOutput: Module{ + Kind: ModuleKindMap, + Name: "bf_module", + Output: StreamOutput{Type: "proto:sf.substreams.database.changes.v1"}, + BlockFilter: BlockFilter{ + Module: "basic_index", + Query: "this is my query", + }, + }, + }, } for _, tt := range tests { diff --git a/manifest/package.go b/manifest/package.go index a24bf6af6..ad954ffa5 100644 --- a/manifest/package.go +++ b/manifest/package.go @@ -80,6 +80,20 @@ func (r *manifestConverter) validateManifest(manif *Manifest) error { if s.Use != "" { return fmt.Errorf("stream %q: 'use' is not allowed for kind 'store'", s.Name) } + case ModuleKindBlockIndex: + if s.Inputs != nil { + return fmt.Errorf("stream %q: block index module cannot have inputs", s.Name) + } + + if s.InitialBlock != nil { + return fmt.Errorf("stream %q: block index module cannot have initial block", s.Name) + } + + //TODO: Validate the output type + if s.Output.Type != "proto:sf.substreams.index.v1.Keys" { + return fmt.Errorf("stream %q: block index module must have output type 'proto:sf.substreams.index.v1.Keys'", s.Name) + } + case "": if s.Use == "" { return fmt.Errorf("module kind not specified for %q", s.Name) @@ -261,7 +275,6 @@ func (r *manifestConverter) convertToPkg(m *Manifest) (pkg *pbsubstreams.Package } } } - doc = string(readmeContent) } @@ -271,11 +284,13 @@ func (r *manifestConverter) convertToPkg(m *Manifest) (pkg *pbsubstreams.Package Name: m.Package.Name, Doc: doc, } + pkg = &pbsubstreams.Package{ - Version: 1, - PackageMeta: []*pbsubstreams.PackageMetadata{pkgMeta}, - Modules: &pbsubstreams.Modules{}, - Network: m.Network, + Version: 1, + PackageMeta: []*pbsubstreams.PackageMetadata{pkgMeta}, + Modules: &pbsubstreams.Modules{}, + Network: m.Network, + BlockFilters: m.BlockFilters, } if m.Networks != nil { diff --git a/manifest/package_test.go b/manifest/package_test.go index 2314c065f..2e7aff2fb 100644 --- a/manifest/package_test.go +++ b/manifest/package_test.go @@ -1,6 +1,7 @@ package manifest import ( + "fmt" pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" "testing" @@ -170,3 +171,43 @@ func TestHandleUseModules(t *testing.T) { }) } } + +func TestValidateManifest(t *testing.T) { + cases := []struct { + name string + manifest *Manifest + expectedError string + }{ + { + name: "sunny path", + manifest: &Manifest{ + Modules: []*Module{ + {Name: "basic_index", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + }, + }, + expectedError: "", + }, + { + name: "incorrect block filter module", + manifest: &Manifest{ + Modules: []*Module{ + {Name: "bd_module", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.test"}, BlockFilter: BlockFilter{Module: "basic", Query: "this is my query"}}, + }, + }, + expectedError: "", + }, + } + + manifestConverter := newManifestConverter("test", true) + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + fmt.Println("Modules", c.manifest.Modules) + err := manifestConverter.validateManifest(c.manifest) + if c.expectedError != "" { + require.NoError(t, err) + return + } + require.Error(t, err) + }) + } +} diff --git a/manifest/reader.go b/manifest/reader.go index 9af93d22a..77abc7900 100644 --- a/manifest/reader.go +++ b/manifest/reader.go @@ -533,6 +533,64 @@ func duplicateStringInput(in *pbsubstreams.Module_Input) string { } } +func checkValidBlockFilter(mod *pbsubstreams.Module, mapModuleKind map[string]pbsubstreams.ModuleKind) error { + blockFilter := mod.GetBlockFilter() + if blockFilter != nil { + seekModName := blockFilter.GetModule() + seekModuleKind, found := mapModuleKind[seekModName] + if !found { + return fmt.Errorf("block filter module %q not found", blockFilter.Module) + } + if seekModuleKind != pbsubstreams.ModuleKindBlockIndex { + return fmt.Errorf("block filter module %q not of 'block_index' kind", blockFilter.Module) + } + } + return nil +} + +func checkValidInputs(mod *pbsubstreams.Module, mapModuleKind map[string]pbsubstreams.ModuleKind) error { + for idx, in := range mod.Inputs { + switch i := in.Input.(type) { + case *pbsubstreams.Module_Input_Params_: + if idx != 0 { + return fmt.Errorf("module %q: input %d: params must be first input", mod.Name, idx) + } + case *pbsubstreams.Module_Input_Source_: + if i.Source.Type == "" { + return fmt.Errorf("module %q: source type empty", mod.Name) + } + case *pbsubstreams.Module_Input_Map_: + seekMod := i.Map.ModuleName + seekModuleKind, found := mapModuleKind[seekMod] + if !found { + return fmt.Errorf("module %q: map input named %q not found", mod.Name, seekMod) + } + + if seekModuleKind != pbsubstreams.ModuleKindMap { + return fmt.Errorf("module %q: input %d: referenced module %q not of 'map' kind", mod.Name, idx, seekMod) + } + + case *pbsubstreams.Module_Input_Store_: + seekMod := i.Store.ModuleName + seekModuleKind, found := mapModuleKind[seekMod] + if !found { + return fmt.Errorf("module %q: store input named %q not found", mod.Name, seekMod) + } + + if seekModuleKind != pbsubstreams.ModuleKindStore { + return fmt.Errorf("module %q: input %d: referenced module %q not of 'store' kind", mod.Name, idx, seekMod) + } + + switch i.Store.Mode { + case pbsubstreams.Module_Input_Store_GET, pbsubstreams.Module_Input_Store_DELTAS: + default: + return fmt.Errorf("module %q: input index %d: unknown store mode value %d", mod.Name, idx, i.Store.Mode) + } + } + } + return nil +} + // ValidateModules is run both by the client _and_ the server. func ValidateModules(mods *pbsubstreams.Modules) error { var sumCode int @@ -551,6 +609,14 @@ func ValidateModules(mods *pbsubstreams.Modules) error { return fmt.Errorf("limit of 100 modules reached") } + mapModuleKind := make(map[string]pbsubstreams.ModuleKind) + for _, mod := range mods.Modules { + if _, found := mapModuleKind[mod.Name]; found { + return fmt.Errorf("module %q: duplicate module name", mod.Name) + } + mapModuleKind[mod.Name] = mod.ModuleKind() + } + for _, mod := range mods.Modules { for _, segment := range strings.Split(mod.Name, ":") { if !moduleNameRegexp.MatchString(segment) { @@ -562,51 +628,14 @@ func ValidateModules(mods *pbsubstreams.Modules) error { return fmt.Errorf("limit of 30 inputs for a given module (%q) reached", mod.Name) } - for idx, in := range mod.Inputs { - switch i := in.Input.(type) { - case *pbsubstreams.Module_Input_Params_: - if idx != 0 { - return fmt.Errorf("module %q: input %d: params must be first input", mod.Name, idx) - } - case *pbsubstreams.Module_Input_Source_: - if i.Source.Type == "" { - return fmt.Errorf("module %q: source type empty", mod.Name) - } - case *pbsubstreams.Module_Input_Map_: - seekMod := i.Map.ModuleName - var found bool - for _, mod2 := range mods.Modules { - if mod2.Name == seekMod { - found = true - if _, ok := mod2.Kind.(*pbsubstreams.Module_KindMap_); !ok { - return fmt.Errorf("module %q: input %d: referenced module %q not of 'map' kind", mod.Name, idx, seekMod) - } - } - } - if !found { - return fmt.Errorf("module %q: map input named %q not found", mod.Name, seekMod) - } - case *pbsubstreams.Module_Input_Store_: - seekMod := i.Store.ModuleName - var found bool - for _, mod2 := range mods.Modules { - if mod2.Name == seekMod { - found = true - if _, ok := mod2.Kind.(*pbsubstreams.Module_KindStore_); !ok { - return fmt.Errorf("module %q: input %d: referenced module %q not of 'store' kind", mod.Name, idx, seekMod) - } - } - } - if !found { - return fmt.Errorf("module %q: store input named %q not found", mod.Name, seekMod) - } + err := checkValidBlockFilter(mod, mapModuleKind) + if err != nil { + return fmt.Errorf("checking block filter for module %q: %w", mod.Name, err) + } - switch i.Store.Mode { - case pbsubstreams.Module_Input_Store_GET, pbsubstreams.Module_Input_Store_DELTAS: - default: - return fmt.Errorf("module %q: input index %d: unknown store mode value %d", mod.Name, idx, i.Store.Mode) - } - } + err = checkValidInputs(mod, mapModuleKind) + if err != nil { + return fmt.Errorf("checking inputs for module %q: %w", mod.Name, err) } } diff --git a/pb/sf/substreams/intern/v2/deltas.pb.go b/pb/sf/substreams/intern/v2/deltas.pb.go index 90e5d369c..0e70134e7 100644 --- a/pb/sf/substreams/intern/v2/deltas.pb.go +++ b/pb/sf/substreams/intern/v2/deltas.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/intern/v2/deltas.proto package pbssinternal import ( + v1 "github.com/streamingfast/substreams/pb/sf/substreams/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" @@ -21,184 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type StoreDelta_Operation int32 - -const ( - StoreDelta_UNSET StoreDelta_Operation = 0 - StoreDelta_CREATE StoreDelta_Operation = 1 - StoreDelta_UPDATE StoreDelta_Operation = 2 - StoreDelta_DELETE StoreDelta_Operation = 3 -) - -// Enum value maps for StoreDelta_Operation. -var ( - StoreDelta_Operation_name = map[int32]string{ - 0: "UNSET", - 1: "CREATE", - 2: "UPDATE", - 3: "DELETE", - } - StoreDelta_Operation_value = map[string]int32{ - "UNSET": 0, - "CREATE": 1, - "UPDATE": 2, - "DELETE": 3, - } -) - -func (x StoreDelta_Operation) Enum() *StoreDelta_Operation { - p := new(StoreDelta_Operation) - *p = x - return p -} - -func (x StoreDelta_Operation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StoreDelta_Operation) Descriptor() protoreflect.EnumDescriptor { - return file_sf_substreams_intern_v2_deltas_proto_enumTypes[0].Descriptor() -} - -func (StoreDelta_Operation) Type() protoreflect.EnumType { - return &file_sf_substreams_intern_v2_deltas_proto_enumTypes[0] -} - -func (x StoreDelta_Operation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StoreDelta_Operation.Descriptor instead. -func (StoreDelta_Operation) EnumDescriptor() ([]byte, []int) { - return file_sf_substreams_intern_v2_deltas_proto_rawDescGZIP(), []int{1, 0} -} - -type StoreDeltas struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StoreDeltas []*StoreDelta `protobuf:"bytes,1,rep,name=store_deltas,json=storeDeltas,proto3" json:"store_deltas,omitempty"` -} - -func (x *StoreDeltas) Reset() { - *x = StoreDeltas{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StoreDeltas) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StoreDeltas) ProtoMessage() {} - -func (x *StoreDeltas) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StoreDeltas.ProtoReflect.Descriptor instead. -func (*StoreDeltas) Descriptor() ([]byte, []int) { - return file_sf_substreams_intern_v2_deltas_proto_rawDescGZIP(), []int{0} -} - -func (x *StoreDeltas) GetStoreDeltas() []*StoreDelta { - if x != nil { - return x.StoreDeltas - } - return nil -} - -type StoreDelta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Operation StoreDelta_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=sf.substreams.internal.v2.StoreDelta_Operation" json:"operation,omitempty"` - Ordinal uint64 `protobuf:"varint,2,opt,name=ordinal,proto3" json:"ordinal,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - OldValue []byte `protobuf:"bytes,4,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"` - NewValue []byte `protobuf:"bytes,5,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"` -} - -func (x *StoreDelta) Reset() { - *x = StoreDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StoreDelta) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StoreDelta) ProtoMessage() {} - -func (x *StoreDelta) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StoreDelta.ProtoReflect.Descriptor instead. -func (*StoreDelta) Descriptor() ([]byte, []int) { - return file_sf_substreams_intern_v2_deltas_proto_rawDescGZIP(), []int{1} -} - -func (x *StoreDelta) GetOperation() StoreDelta_Operation { - if x != nil { - return x.Operation - } - return StoreDelta_UNSET -} - -func (x *StoreDelta) GetOrdinal() uint64 { - if x != nil { - return x.Ordinal - } - return 0 -} - -func (x *StoreDelta) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *StoreDelta) GetOldValue() []byte { - if x != nil { - return x.OldValue - } - return nil -} - -func (x *StoreDelta) GetNewValue() []byte { - if x != nil { - return x.NewValue - } - return nil -} - type ModuleOutput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -218,7 +41,7 @@ type ModuleOutput struct { func (x *ModuleOutput) Reset() { *x = ModuleOutput{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[2] + mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -231,7 +54,7 @@ func (x *ModuleOutput) String() string { func (*ModuleOutput) ProtoMessage() {} func (x *ModuleOutput) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[2] + mi := &file_sf_substreams_intern_v2_deltas_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -244,7 +67,7 @@ func (x *ModuleOutput) ProtoReflect() protoreflect.Message { // Deprecated: Use ModuleOutput.ProtoReflect.Descriptor instead. func (*ModuleOutput) Descriptor() ([]byte, []int) { - return file_sf_substreams_intern_v2_deltas_proto_rawDescGZIP(), []int{2} + return file_sf_substreams_intern_v2_deltas_proto_rawDescGZIP(), []int{0} } func (x *ModuleOutput) GetModuleName() string { @@ -268,7 +91,7 @@ func (x *ModuleOutput) GetMapOutput() *anypb.Any { return nil } -func (x *ModuleOutput) GetStoreDeltas() *StoreDeltas { +func (x *ModuleOutput) GetStoreDeltas() *v1.StoreDeltas { if x, ok := x.GetData().(*ModuleOutput_StoreDeltas); ok { return x.StoreDeltas } @@ -305,7 +128,7 @@ type ModuleOutput_MapOutput struct { } type ModuleOutput_StoreDeltas struct { - StoreDeltas *StoreDeltas `protobuf:"bytes,3,opt,name=store_deltas,json=storeDeltas,proto3,oneof"` + StoreDeltas *v1.StoreDeltas `protobuf:"bytes,3,opt,name=store_deltas,json=storeDeltas,proto3,oneof"` } func (*ModuleOutput_MapOutput) isModuleOutput_Data() {} @@ -320,52 +143,32 @@ var file_sf_substreams_intern_v2_deltas_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, - 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xfd, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x1b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, - 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x0a, 0x09, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, - 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, 0x99, 0x02, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x4b, - 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x48, 0x00, 0x52, 0x0b, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, - 0x6f, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, - 0x30, 0x0a, 0x14, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x74, 0x72, - 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, - 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, - 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, - 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x2f, 0x76, 0x32, 0x3b, 0x70, 0x62, 0x73, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x66, + 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x02, 0x0a, 0x0c, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, + 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, + 0x6c, 0x74, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x66, 0x2e, + 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x62, 0x75, + 0x67, 0x4c, 0x6f, 0x67, 0x73, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x4d, + 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x2f, 0x76, 0x32, + 0x3b, 0x70, 0x62, 0x73, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -380,25 +183,20 @@ func file_sf_substreams_intern_v2_deltas_proto_rawDescGZIP() []byte { return file_sf_substreams_intern_v2_deltas_proto_rawDescData } -var file_sf_substreams_intern_v2_deltas_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_sf_substreams_intern_v2_deltas_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_sf_substreams_intern_v2_deltas_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sf_substreams_intern_v2_deltas_proto_goTypes = []interface{}{ - (StoreDelta_Operation)(0), // 0: sf.substreams.internal.v2.StoreDelta.Operation - (*StoreDeltas)(nil), // 1: sf.substreams.internal.v2.StoreDeltas - (*StoreDelta)(nil), // 2: sf.substreams.internal.v2.StoreDelta - (*ModuleOutput)(nil), // 3: sf.substreams.internal.v2.ModuleOutput - (*anypb.Any)(nil), // 4: google.protobuf.Any + (*ModuleOutput)(nil), // 0: sf.substreams.internal.v2.ModuleOutput + (*anypb.Any)(nil), // 1: google.protobuf.Any + (*v1.StoreDeltas)(nil), // 2: sf.substreams.v1.StoreDeltas } var file_sf_substreams_intern_v2_deltas_proto_depIdxs = []int32{ - 2, // 0: sf.substreams.internal.v2.StoreDeltas.store_deltas:type_name -> sf.substreams.internal.v2.StoreDelta - 0, // 1: sf.substreams.internal.v2.StoreDelta.operation:type_name -> sf.substreams.internal.v2.StoreDelta.Operation - 4, // 2: sf.substreams.internal.v2.ModuleOutput.map_output:type_name -> google.protobuf.Any - 1, // 3: sf.substreams.internal.v2.ModuleOutput.store_deltas:type_name -> sf.substreams.internal.v2.StoreDeltas - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 1, // 0: sf.substreams.internal.v2.ModuleOutput.map_output:type_name -> google.protobuf.Any + 2, // 1: sf.substreams.internal.v2.ModuleOutput.store_deltas:type_name -> sf.substreams.v1.StoreDeltas + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_sf_substreams_intern_v2_deltas_proto_init() } @@ -408,30 +206,6 @@ func file_sf_substreams_intern_v2_deltas_proto_init() { } if !protoimpl.UnsafeEnabled { file_sf_substreams_intern_v2_deltas_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StoreDeltas); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_substreams_intern_v2_deltas_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StoreDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_substreams_intern_v2_deltas_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ModuleOutput); i { case 0: return &v.state @@ -444,7 +218,7 @@ func file_sf_substreams_intern_v2_deltas_proto_init() { } } } - file_sf_substreams_intern_v2_deltas_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_sf_substreams_intern_v2_deltas_proto_msgTypes[0].OneofWrappers = []interface{}{ (*ModuleOutput_MapOutput)(nil), (*ModuleOutput_StoreDeltas)(nil), } @@ -453,14 +227,13 @@ func file_sf_substreams_intern_v2_deltas_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sf_substreams_intern_v2_deltas_proto_rawDesc, - NumEnums: 1, - NumMessages: 3, + NumEnums: 0, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_sf_substreams_intern_v2_deltas_proto_goTypes, DependencyIndexes: file_sf_substreams_intern_v2_deltas_proto_depIdxs, - EnumInfos: file_sf_substreams_intern_v2_deltas_proto_enumTypes, MessageInfos: file_sf_substreams_intern_v2_deltas_proto_msgTypes, }.Build() File_sf_substreams_intern_v2_deltas_proto = out.File diff --git a/pb/sf/substreams/intern/v2/service.pb.go b/pb/sf/substreams/intern/v2/service.pb.go index 0e348f52e..3ad6236a6 100644 --- a/pb/sf/substreams/intern/v2/service.pb.go +++ b/pb/sf/substreams/intern/v2/service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/intern/v2/service.proto diff --git a/pb/sf/substreams/options.pb.go b/pb/sf/substreams/options.pb.go index 920eb9c7a..6a00c93db 100644 --- a/pb/sf/substreams/options.pb.go +++ b/pb/sf/substreams/options.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/options.proto diff --git a/pb/sf/substreams/rpc/v2/service.pb.go b/pb/sf/substreams/rpc/v2/service.pb.go index 189e7d1bf..65ee68819 100644 --- a/pb/sf/substreams/rpc/v2/service.pb.go +++ b/pb/sf/substreams/rpc/v2/service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/rpc/v2/service.proto diff --git a/pb/sf/substreams/sink/service/v1/service.pb.go b/pb/sf/substreams/sink/service/v1/service.pb.go index ad7a72799..d5e2d311e 100644 --- a/pb/sf/substreams/sink/service/v1/service.pb.go +++ b/pb/sf/substreams/sink/service/v1/service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/sink/service/v1/service.proto diff --git a/pb/sf/substreams/v1/clock.pb.go b/pb/sf/substreams/v1/clock.pb.go index d4edd2ccd..7adc67b4e 100644 --- a/pb/sf/substreams/v1/clock.pb.go +++ b/pb/sf/substreams/v1/clock.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/v1/clock.proto diff --git a/pb/sf/substreams/v1/deltas.pb.go b/pb/sf/substreams/v1/deltas.pb.go new file mode 100644 index 000000000..bfd987498 --- /dev/null +++ b/pb/sf/substreams/v1/deltas.pb.go @@ -0,0 +1,314 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: sf/substreams/v1/deltas.proto + +package pbsubstreams + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StoreDelta_Operation int32 + +const ( + StoreDelta_UNSET StoreDelta_Operation = 0 + StoreDelta_CREATE StoreDelta_Operation = 1 + StoreDelta_UPDATE StoreDelta_Operation = 2 + StoreDelta_DELETE StoreDelta_Operation = 3 +) + +// Enum value maps for StoreDelta_Operation. +var ( + StoreDelta_Operation_name = map[int32]string{ + 0: "UNSET", + 1: "CREATE", + 2: "UPDATE", + 3: "DELETE", + } + StoreDelta_Operation_value = map[string]int32{ + "UNSET": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3, + } +) + +func (x StoreDelta_Operation) Enum() *StoreDelta_Operation { + p := new(StoreDelta_Operation) + *p = x + return p +} + +func (x StoreDelta_Operation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StoreDelta_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_sf_substreams_v1_deltas_proto_enumTypes[0].Descriptor() +} + +func (StoreDelta_Operation) Type() protoreflect.EnumType { + return &file_sf_substreams_v1_deltas_proto_enumTypes[0] +} + +func (x StoreDelta_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StoreDelta_Operation.Descriptor instead. +func (StoreDelta_Operation) EnumDescriptor() ([]byte, []int) { + return file_sf_substreams_v1_deltas_proto_rawDescGZIP(), []int{1, 0} +} + +type StoreDeltas struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StoreDeltas []*StoreDelta `protobuf:"bytes,1,rep,name=store_deltas,json=storeDeltas,proto3" json:"store_deltas,omitempty"` +} + +func (x *StoreDeltas) Reset() { + *x = StoreDeltas{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_deltas_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StoreDeltas) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StoreDeltas) ProtoMessage() {} + +func (x *StoreDeltas) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_deltas_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StoreDeltas.ProtoReflect.Descriptor instead. +func (*StoreDeltas) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_deltas_proto_rawDescGZIP(), []int{0} +} + +func (x *StoreDeltas) GetStoreDeltas() []*StoreDelta { + if x != nil { + return x.StoreDeltas + } + return nil +} + +type StoreDelta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operation StoreDelta_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=sf.substreams.v1.StoreDelta_Operation" json:"operation,omitempty"` + Ordinal uint64 `protobuf:"varint,2,opt,name=ordinal,proto3" json:"ordinal,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + OldValue []byte `protobuf:"bytes,4,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"` + NewValue []byte `protobuf:"bytes,5,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"` +} + +func (x *StoreDelta) Reset() { + *x = StoreDelta{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_deltas_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StoreDelta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StoreDelta) ProtoMessage() {} + +func (x *StoreDelta) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_deltas_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StoreDelta.ProtoReflect.Descriptor instead. +func (*StoreDelta) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_deltas_proto_rawDescGZIP(), []int{1} +} + +func (x *StoreDelta) GetOperation() StoreDelta_Operation { + if x != nil { + return x.Operation + } + return StoreDelta_UNSET +} + +func (x *StoreDelta) GetOrdinal() uint64 { + if x != nil { + return x.Ordinal + } + return 0 +} + +func (x *StoreDelta) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *StoreDelta) GetOldValue() []byte { + if x != nil { + return x.OldValue + } + return nil +} + +func (x *StoreDelta) GetNewValue() []byte { + if x != nil { + return x.NewValue + } + return nil +} + +var File_sf_substreams_v1_deltas_proto protoreflect.FileDescriptor + +var file_sf_substreams_v1_deltas_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, + 0x31, 0x22, 0x4e, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, + 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, + 0x65, 0x6c, 0x74, 0x61, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, + 0x73, 0x22, 0xf4, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, + 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x74, + 0x61, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x0a, 0x09, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, + 0x45, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, + 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_v1_deltas_proto_rawDescOnce sync.Once + file_sf_substreams_v1_deltas_proto_rawDescData = file_sf_substreams_v1_deltas_proto_rawDesc +) + +func file_sf_substreams_v1_deltas_proto_rawDescGZIP() []byte { + file_sf_substreams_v1_deltas_proto_rawDescOnce.Do(func() { + file_sf_substreams_v1_deltas_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_v1_deltas_proto_rawDescData) + }) + return file_sf_substreams_v1_deltas_proto_rawDescData +} + +var file_sf_substreams_v1_deltas_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_sf_substreams_v1_deltas_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_sf_substreams_v1_deltas_proto_goTypes = []interface{}{ + (StoreDelta_Operation)(0), // 0: sf.substreams.v1.StoreDelta.Operation + (*StoreDeltas)(nil), // 1: sf.substreams.v1.StoreDeltas + (*StoreDelta)(nil), // 2: sf.substreams.v1.StoreDelta +} +var file_sf_substreams_v1_deltas_proto_depIdxs = []int32{ + 2, // 0: sf.substreams.v1.StoreDeltas.store_deltas:type_name -> sf.substreams.v1.StoreDelta + 0, // 1: sf.substreams.v1.StoreDelta.operation:type_name -> sf.substreams.v1.StoreDelta.Operation + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_sf_substreams_v1_deltas_proto_init() } +func file_sf_substreams_v1_deltas_proto_init() { + if File_sf_substreams_v1_deltas_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_v1_deltas_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoreDeltas); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_substreams_v1_deltas_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoreDelta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sf_substreams_v1_deltas_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_v1_deltas_proto_goTypes, + DependencyIndexes: file_sf_substreams_v1_deltas_proto_depIdxs, + EnumInfos: file_sf_substreams_v1_deltas_proto_enumTypes, + MessageInfos: file_sf_substreams_v1_deltas_proto_msgTypes, + }.Build() + File_sf_substreams_v1_deltas_proto = out.File + file_sf_substreams_v1_deltas_proto_rawDesc = nil + file_sf_substreams_v1_deltas_proto_goTypes = nil + file_sf_substreams_v1_deltas_proto_depIdxs = nil +} diff --git a/pb/sf/substreams/v1/modules.go b/pb/sf/substreams/v1/modules.go index ccf63d787..62486b65d 100644 --- a/pb/sf/substreams/v1/modules.go +++ b/pb/sf/substreams/v1/modules.go @@ -7,6 +7,7 @@ type ModuleKind int const ( ModuleKindStore = ModuleKind(iota) ModuleKindMap + ModuleKindBlockIndex ) func (x *Module) ModuleKind() ModuleKind { @@ -15,6 +16,8 @@ func (x *Module) ModuleKind() ModuleKind { return ModuleKindMap case *Module_KindStore_: return ModuleKindStore + case *Module_KindBlockIndex_: + return ModuleKindBlockIndex } panic("unsupported kind") } diff --git a/pb/sf/substreams/v1/modules.pb.go b/pb/sf/substreams/v1/modules.pb.go index a4a239b94..cf7090cb4 100644 --- a/pb/sf/substreams/v1/modules.pb.go +++ b/pb/sf/substreams/v1/modules.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/v1/modules.proto @@ -84,7 +84,7 @@ func (x Module_KindStore_UpdatePolicy) Number() protoreflect.EnumNumber { // Deprecated: Use Module_KindStore_UpdatePolicy.Descriptor instead. func (Module_KindStore_UpdatePolicy) EnumDescriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 1, 0} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2, 0} } type Module_Input_Store_Mode int32 @@ -133,7 +133,7 @@ func (x Module_Input_Store_Mode) Number() protoreflect.EnumNumber { // Deprecated: Use Module_Input_Store_Mode.Descriptor instead. func (Module_Input_Store_Mode) EnumDescriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2, 2, 0} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 4, 2, 0} } type Modules struct { @@ -257,12 +257,14 @@ type Module struct { // // *Module_KindMap_ // *Module_KindStore_ - Kind isModule_Kind `protobuf_oneof:"kind"` - BinaryIndex uint32 `protobuf:"varint,4,opt,name=binary_index,json=binaryIndex,proto3" json:"binary_index,omitempty"` - BinaryEntrypoint string `protobuf:"bytes,5,opt,name=binary_entrypoint,json=binaryEntrypoint,proto3" json:"binary_entrypoint,omitempty"` - Inputs []*Module_Input `protobuf:"bytes,6,rep,name=inputs,proto3" json:"inputs,omitempty"` - Output *Module_Output `protobuf:"bytes,7,opt,name=output,proto3" json:"output,omitempty"` - InitialBlock uint64 `protobuf:"varint,8,opt,name=initial_block,json=initialBlock,proto3" json:"initial_block,omitempty"` + // *Module_KindBlockIndex_ + Kind isModule_Kind `protobuf_oneof:"kind"` + BinaryIndex uint32 `protobuf:"varint,4,opt,name=binary_index,json=binaryIndex,proto3" json:"binary_index,omitempty"` + BinaryEntrypoint string `protobuf:"bytes,5,opt,name=binary_entrypoint,json=binaryEntrypoint,proto3" json:"binary_entrypoint,omitempty"` + Inputs []*Module_Input `protobuf:"bytes,6,rep,name=inputs,proto3" json:"inputs,omitempty"` + Output *Module_Output `protobuf:"bytes,7,opt,name=output,proto3" json:"output,omitempty"` + InitialBlock uint64 `protobuf:"varint,8,opt,name=initial_block,json=initialBlock,proto3" json:"initial_block,omitempty"` + BlockFilter *Module_BlockFilter `protobuf:"bytes,9,opt,name=block_filter,json=blockFilter,proto3" json:"block_filter,omitempty"` } func (x *Module) Reset() { @@ -325,6 +327,13 @@ func (x *Module) GetKindStore() *Module_KindStore { return nil } +func (x *Module) GetKindBlockIndex() *Module_KindBlockIndex { + if x, ok := x.GetKind().(*Module_KindBlockIndex_); ok { + return x.KindBlockIndex + } + return nil +} + func (x *Module) GetBinaryIndex() uint32 { if x != nil { return x.BinaryIndex @@ -360,6 +369,13 @@ func (x *Module) GetInitialBlock() uint64 { return 0 } +func (x *Module) GetBlockFilter() *Module_BlockFilter { + if x != nil { + return x.BlockFilter + } + return nil +} + type isModule_Kind interface { isModule_Kind() } @@ -372,10 +388,71 @@ type Module_KindStore_ struct { KindStore *Module_KindStore `protobuf:"bytes,3,opt,name=kind_store,json=kindStore,proto3,oneof"` } +type Module_KindBlockIndex_ struct { + KindBlockIndex *Module_KindBlockIndex `protobuf:"bytes,10,opt,name=kind_block_index,json=kindBlockIndex,proto3,oneof"` +} + func (*Module_KindMap_) isModule_Kind() {} func (*Module_KindStore_) isModule_Kind() {} +func (*Module_KindBlockIndex_) isModule_Kind() {} + +type Module_BlockFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *Module_BlockFilter) Reset() { + *x = Module_BlockFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_modules_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module_BlockFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module_BlockFilter) ProtoMessage() {} + +func (x *Module_BlockFilter) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_modules_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Module_BlockFilter.ProtoReflect.Descriptor instead. +func (*Module_BlockFilter) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *Module_BlockFilter) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + +func (x *Module_BlockFilter) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + type Module_KindMap struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -387,7 +464,7 @@ type Module_KindMap struct { func (x *Module_KindMap) Reset() { *x = Module_KindMap{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[3] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -400,7 +477,7 @@ func (x *Module_KindMap) String() string { func (*Module_KindMap) ProtoMessage() {} func (x *Module_KindMap) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[3] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -413,7 +490,7 @@ func (x *Module_KindMap) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_KindMap.ProtoReflect.Descriptor instead. func (*Module_KindMap) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 0} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 1} } func (x *Module_KindMap) GetOutputType() string { @@ -443,7 +520,7 @@ type Module_KindStore struct { func (x *Module_KindStore) Reset() { *x = Module_KindStore{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[4] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -456,7 +533,7 @@ func (x *Module_KindStore) String() string { func (*Module_KindStore) ProtoMessage() {} func (x *Module_KindStore) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[4] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -469,7 +546,7 @@ func (x *Module_KindStore) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_KindStore.ProtoReflect.Descriptor instead. func (*Module_KindStore) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 1} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2} } func (x *Module_KindStore) GetUpdatePolicy() Module_KindStore_UpdatePolicy { @@ -486,6 +563,53 @@ func (x *Module_KindStore) GetValueType() string { return "" } +type Module_KindBlockIndex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OutputType string `protobuf:"bytes,1,opt,name=output_type,json=outputType,proto3" json:"output_type,omitempty"` +} + +func (x *Module_KindBlockIndex) Reset() { + *x = Module_KindBlockIndex{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_v1_modules_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module_KindBlockIndex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module_KindBlockIndex) ProtoMessage() {} + +func (x *Module_KindBlockIndex) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_v1_modules_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Module_KindBlockIndex.ProtoReflect.Descriptor instead. +func (*Module_KindBlockIndex) Descriptor() ([]byte, []int) { + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 3} +} + +func (x *Module_KindBlockIndex) GetOutputType() string { + if x != nil { + return x.OutputType + } + return "" +} + type Module_Input struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -503,7 +627,7 @@ type Module_Input struct { func (x *Module_Input) Reset() { *x = Module_Input{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[5] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -516,7 +640,7 @@ func (x *Module_Input) String() string { func (*Module_Input) ProtoMessage() {} func (x *Module_Input) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[5] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -529,7 +653,7 @@ func (x *Module_Input) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_Input.ProtoReflect.Descriptor instead. func (*Module_Input) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 4} } func (m *Module_Input) GetInput() isModule_Input_Input { @@ -606,7 +730,7 @@ type Module_Output struct { func (x *Module_Output) Reset() { *x = Module_Output{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[6] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -619,7 +743,7 @@ func (x *Module_Output) String() string { func (*Module_Output) ProtoMessage() {} func (x *Module_Output) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[6] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -632,7 +756,7 @@ func (x *Module_Output) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_Output.ProtoReflect.Descriptor instead. func (*Module_Output) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 3} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 5} } func (x *Module_Output) GetType() string { @@ -653,7 +777,7 @@ type Module_Input_Source struct { func (x *Module_Input_Source) Reset() { *x = Module_Input_Source{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[7] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -666,7 +790,7 @@ func (x *Module_Input_Source) String() string { func (*Module_Input_Source) ProtoMessage() {} func (x *Module_Input_Source) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[7] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -679,7 +803,7 @@ func (x *Module_Input_Source) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_Input_Source.ProtoReflect.Descriptor instead. func (*Module_Input_Source) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2, 0} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 4, 0} } func (x *Module_Input_Source) GetType() string { @@ -700,7 +824,7 @@ type Module_Input_Map struct { func (x *Module_Input_Map) Reset() { *x = Module_Input_Map{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[8] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -713,7 +837,7 @@ func (x *Module_Input_Map) String() string { func (*Module_Input_Map) ProtoMessage() {} func (x *Module_Input_Map) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[8] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -726,7 +850,7 @@ func (x *Module_Input_Map) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_Input_Map.ProtoReflect.Descriptor instead. func (*Module_Input_Map) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2, 1} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 4, 1} } func (x *Module_Input_Map) GetModuleName() string { @@ -748,7 +872,7 @@ type Module_Input_Store struct { func (x *Module_Input_Store) Reset() { *x = Module_Input_Store{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[9] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -761,7 +885,7 @@ func (x *Module_Input_Store) String() string { func (*Module_Input_Store) ProtoMessage() {} func (x *Module_Input_Store) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[9] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -774,7 +898,7 @@ func (x *Module_Input_Store) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_Input_Store.ProtoReflect.Descriptor instead. func (*Module_Input_Store) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2, 2} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 4, 2} } func (x *Module_Input_Store) GetModuleName() string { @@ -802,7 +926,7 @@ type Module_Input_Params struct { func (x *Module_Input_Params) Reset() { *x = Module_Input_Params{} if protoimpl.UnsafeEnabled { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[10] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -815,7 +939,7 @@ func (x *Module_Input_Params) String() string { func (*Module_Input_Params) ProtoMessage() {} func (x *Module_Input_Params) ProtoReflect() protoreflect.Message { - mi := &file_sf_substreams_v1_modules_proto_msgTypes[10] + mi := &file_sf_substreams_v1_modules_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -828,7 +952,7 @@ func (x *Module_Input_Params) ProtoReflect() protoreflect.Message { // Deprecated: Use Module_Input_Params.ProtoReflect.Descriptor instead. func (*Module_Input_Params) Descriptor() ([]byte, []int) { - return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 2, 3} + return file_sf_substreams_v1_modules_proto_rawDescGZIP(), []int{2, 4, 3} } func (x *Module_Input_Params) GetValue() string { @@ -855,7 +979,7 @@ var file_sf_substreams_v1_modules_proto_rawDesc = []byte{ 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, - 0xa3, 0x0a, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0xb1, 0x0c, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x6b, 0x69, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, @@ -865,84 +989,101 @@ var file_sf_substreams_v1_modules_proto_rawDesc = []byte{ 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x66, 0x2e, - 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x2a, 0x0a, 0x07, 0x4b, 0x69, 0x6e, 0x64, - 0x4d, 0x61, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x1a, 0xc5, 0x02, 0x0a, 0x09, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, - 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, - 0x00, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, - 0x43, 0x59, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x49, 0x46, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, - 0x11, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, - 0x44, 0x44, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, - 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x55, - 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4d, 0x41, 0x58, - 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, - 0x49, 0x43, 0x59, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x06, 0x1a, 0x80, 0x04, 0x0a, - 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, + 0x72, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x6b, 0x69, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, + 0x37, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x47, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x1a, 0x2a, 0x0a, 0x07, 0x4b, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x70, 0x12, 0x1f, + 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, + 0xc5, 0x02, 0x0a, 0x09, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x54, 0x0a, + 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x4b, + 0x69, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, + 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, + 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x53, 0x45, + 0x54, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, + 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x49, 0x46, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, + 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x50, 0x44, 0x41, + 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x44, 0x44, 0x10, 0x03, 0x12, + 0x15, 0x0a, 0x11, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, + 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x05, 0x12, 0x18, 0x0a, + 0x14, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, + 0x50, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x06, 0x1a, 0x31, 0x0a, 0x0e, 0x4b, 0x69, 0x6e, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x80, 0x04, 0x0a, 0x05, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, - 0x3c, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1c, - 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x26, 0x0a, 0x03, - 0x4d, 0x61, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x8f, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3d, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, - 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x26, - 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, - 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, - 0x4c, 0x54, 0x41, 0x53, 0x10, 0x02, 0x1a, 0x1e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x1a, - 0x1c, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, - 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x62, 0x2f, - 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x2e, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x3c, 0x0a, + 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, + 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1c, 0x0a, 0x06, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x26, 0x0a, 0x03, 0x4d, 0x61, + 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x1a, 0x8f, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x26, 0x0a, 0x04, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x54, + 0x41, 0x53, 0x10, 0x02, 0x1a, 0x1e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x1c, 0x0a, + 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, + 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, + 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x70, + 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -958,40 +1099,44 @@ func file_sf_substreams_v1_modules_proto_rawDescGZIP() []byte { } var file_sf_substreams_v1_modules_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_sf_substreams_v1_modules_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_sf_substreams_v1_modules_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_sf_substreams_v1_modules_proto_goTypes = []interface{}{ (Module_KindStore_UpdatePolicy)(0), // 0: sf.substreams.v1.Module.KindStore.UpdatePolicy (Module_Input_Store_Mode)(0), // 1: sf.substreams.v1.Module.Input.Store.Mode (*Modules)(nil), // 2: sf.substreams.v1.Modules (*Binary)(nil), // 3: sf.substreams.v1.Binary (*Module)(nil), // 4: sf.substreams.v1.Module - (*Module_KindMap)(nil), // 5: sf.substreams.v1.Module.KindMap - (*Module_KindStore)(nil), // 6: sf.substreams.v1.Module.KindStore - (*Module_Input)(nil), // 7: sf.substreams.v1.Module.Input - (*Module_Output)(nil), // 8: sf.substreams.v1.Module.Output - (*Module_Input_Source)(nil), // 9: sf.substreams.v1.Module.Input.Source - (*Module_Input_Map)(nil), // 10: sf.substreams.v1.Module.Input.Map - (*Module_Input_Store)(nil), // 11: sf.substreams.v1.Module.Input.Store - (*Module_Input_Params)(nil), // 12: sf.substreams.v1.Module.Input.Params + (*Module_BlockFilter)(nil), // 5: sf.substreams.v1.Module.BlockFilter + (*Module_KindMap)(nil), // 6: sf.substreams.v1.Module.KindMap + (*Module_KindStore)(nil), // 7: sf.substreams.v1.Module.KindStore + (*Module_KindBlockIndex)(nil), // 8: sf.substreams.v1.Module.KindBlockIndex + (*Module_Input)(nil), // 9: sf.substreams.v1.Module.Input + (*Module_Output)(nil), // 10: sf.substreams.v1.Module.Output + (*Module_Input_Source)(nil), // 11: sf.substreams.v1.Module.Input.Source + (*Module_Input_Map)(nil), // 12: sf.substreams.v1.Module.Input.Map + (*Module_Input_Store)(nil), // 13: sf.substreams.v1.Module.Input.Store + (*Module_Input_Params)(nil), // 14: sf.substreams.v1.Module.Input.Params } var file_sf_substreams_v1_modules_proto_depIdxs = []int32{ 4, // 0: sf.substreams.v1.Modules.modules:type_name -> sf.substreams.v1.Module 3, // 1: sf.substreams.v1.Modules.binaries:type_name -> sf.substreams.v1.Binary - 5, // 2: sf.substreams.v1.Module.kind_map:type_name -> sf.substreams.v1.Module.KindMap - 6, // 3: sf.substreams.v1.Module.kind_store:type_name -> sf.substreams.v1.Module.KindStore - 7, // 4: sf.substreams.v1.Module.inputs:type_name -> sf.substreams.v1.Module.Input - 8, // 5: sf.substreams.v1.Module.output:type_name -> sf.substreams.v1.Module.Output - 0, // 6: sf.substreams.v1.Module.KindStore.update_policy:type_name -> sf.substreams.v1.Module.KindStore.UpdatePolicy - 9, // 7: sf.substreams.v1.Module.Input.source:type_name -> sf.substreams.v1.Module.Input.Source - 10, // 8: sf.substreams.v1.Module.Input.map:type_name -> sf.substreams.v1.Module.Input.Map - 11, // 9: sf.substreams.v1.Module.Input.store:type_name -> sf.substreams.v1.Module.Input.Store - 12, // 10: sf.substreams.v1.Module.Input.params:type_name -> sf.substreams.v1.Module.Input.Params - 1, // 11: sf.substreams.v1.Module.Input.Store.mode:type_name -> sf.substreams.v1.Module.Input.Store.Mode - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 6, // 2: sf.substreams.v1.Module.kind_map:type_name -> sf.substreams.v1.Module.KindMap + 7, // 3: sf.substreams.v1.Module.kind_store:type_name -> sf.substreams.v1.Module.KindStore + 8, // 4: sf.substreams.v1.Module.kind_block_index:type_name -> sf.substreams.v1.Module.KindBlockIndex + 9, // 5: sf.substreams.v1.Module.inputs:type_name -> sf.substreams.v1.Module.Input + 10, // 6: sf.substreams.v1.Module.output:type_name -> sf.substreams.v1.Module.Output + 5, // 7: sf.substreams.v1.Module.block_filter:type_name -> sf.substreams.v1.Module.BlockFilter + 0, // 8: sf.substreams.v1.Module.KindStore.update_policy:type_name -> sf.substreams.v1.Module.KindStore.UpdatePolicy + 11, // 9: sf.substreams.v1.Module.Input.source:type_name -> sf.substreams.v1.Module.Input.Source + 12, // 10: sf.substreams.v1.Module.Input.map:type_name -> sf.substreams.v1.Module.Input.Map + 13, // 11: sf.substreams.v1.Module.Input.store:type_name -> sf.substreams.v1.Module.Input.Store + 14, // 12: sf.substreams.v1.Module.Input.params:type_name -> sf.substreams.v1.Module.Input.Params + 1, // 13: sf.substreams.v1.Module.Input.Store.mode:type_name -> sf.substreams.v1.Module.Input.Store.Mode + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_sf_substreams_v1_modules_proto_init() } @@ -1037,7 +1182,7 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module_KindMap); i { + switch v := v.(*Module_BlockFilter); i { case 0: return &v.state case 1: @@ -1049,7 +1194,7 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module_KindStore); i { + switch v := v.(*Module_KindMap); i { case 0: return &v.state case 1: @@ -1061,7 +1206,7 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module_Input); i { + switch v := v.(*Module_KindStore); i { case 0: return &v.state case 1: @@ -1073,7 +1218,7 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module_Output); i { + switch v := v.(*Module_KindBlockIndex); i { case 0: return &v.state case 1: @@ -1085,7 +1230,7 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module_Input_Source); i { + switch v := v.(*Module_Input); i { case 0: return &v.state case 1: @@ -1097,7 +1242,7 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module_Input_Map); i { + switch v := v.(*Module_Output); i { case 0: return &v.state case 1: @@ -1109,7 +1254,7 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module_Input_Store); i { + switch v := v.(*Module_Input_Source); i { case 0: return &v.state case 1: @@ -1121,6 +1266,30 @@ func file_sf_substreams_v1_modules_proto_init() { } } file_sf_substreams_v1_modules_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module_Input_Map); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_substreams_v1_modules_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module_Input_Store); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sf_substreams_v1_modules_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module_Input_Params); i { case 0: return &v.state @@ -1136,8 +1305,9 @@ func file_sf_substreams_v1_modules_proto_init() { file_sf_substreams_v1_modules_proto_msgTypes[2].OneofWrappers = []interface{}{ (*Module_KindMap_)(nil), (*Module_KindStore_)(nil), + (*Module_KindBlockIndex_)(nil), } - file_sf_substreams_v1_modules_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_sf_substreams_v1_modules_proto_msgTypes[7].OneofWrappers = []interface{}{ (*Module_Input_Source_)(nil), (*Module_Input_Map_)(nil), (*Module_Input_Store_)(nil), @@ -1149,7 +1319,7 @@ func file_sf_substreams_v1_modules_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sf_substreams_v1_modules_proto_rawDesc, NumEnums: 2, - NumMessages: 11, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/sf/substreams/v1/package.pb.go b/pb/sf/substreams/v1/package.pb.go index 067afe629..bb6dee388 100644 --- a/pb/sf/substreams/v1/package.pb.go +++ b/pb/sf/substreams/v1/package.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: sf/substreams/v1/package.proto @@ -39,8 +39,9 @@ type Package struct { SinkConfig *anypb.Any `protobuf:"bytes,10,opt,name=sink_config,json=sinkConfig,proto3" json:"sink_config,omitempty"` SinkModule string `protobuf:"bytes,11,opt,name=sink_module,json=sinkModule,proto3" json:"sink_module,omitempty"` // image is the bytes to a JPEG, WebP or PNG file. Max size is 2 MiB - Image []byte `protobuf:"bytes,12,opt,name=image,proto3" json:"image,omitempty"` - Networks map[string]*NetworkParams `protobuf:"bytes,13,rep,name=networks,proto3" json:"networks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Image []byte `protobuf:"bytes,12,opt,name=image,proto3" json:"image,omitempty"` + Networks map[string]*NetworkParams `protobuf:"bytes,13,rep,name=networks,proto3" json:"networks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + BlockFilters map[string]string `protobuf:"bytes,14,rep,name=block_filters,json=blockFilters,proto3" json:"block_filters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *Package) Reset() { @@ -145,6 +146,13 @@ func (x *Package) GetNetworks() map[string]*NetworkParams { return nil } +func (x *Package) GetBlockFilters() map[string]string { + if x != nil { + return x.BlockFilters + } + return nil +} + type NetworkParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -339,7 +347,7 @@ var file_sf_substreams_v1_package_proto_rawDesc = []byte{ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xd9, 0x04, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x70, + 0xec, 0x05, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, @@ -370,48 +378,57 @@ var file_sf_substreams_v1_package_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x1a, 0x5c, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x66, 0x2e, 0x73, - 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x05, 0x22, 0xab, 0x02, 0x0a, 0x0d, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x58, 0x0a, - 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x5c, 0x0a, 0x0d, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x66, + 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x05, 0x22, 0xab, + 0x02, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x58, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x40, 0x0a, 0x12, - 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, - 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x63, 0x0a, 0x0f, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x64, 0x6f, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x22, 0x47, - 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, - 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, - 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x66, 0x2e, + 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, + 0x40, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x63, 0x0a, 0x0f, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, + 0x63, 0x22, 0x47, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x66, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -426,34 +443,36 @@ func file_sf_substreams_v1_package_proto_rawDescGZIP() []byte { return file_sf_substreams_v1_package_proto_rawDescData } -var file_sf_substreams_v1_package_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_sf_substreams_v1_package_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_sf_substreams_v1_package_proto_goTypes = []interface{}{ (*Package)(nil), // 0: sf.substreams.v1.Package (*NetworkParams)(nil), // 1: sf.substreams.v1.NetworkParams (*PackageMetadata)(nil), // 2: sf.substreams.v1.PackageMetadata (*ModuleMetadata)(nil), // 3: sf.substreams.v1.ModuleMetadata nil, // 4: sf.substreams.v1.Package.NetworksEntry - nil, // 5: sf.substreams.v1.NetworkParams.InitialBlocksEntry - nil, // 6: sf.substreams.v1.NetworkParams.ParamsEntry - (*descriptorpb.FileDescriptorProto)(nil), // 7: google.protobuf.FileDescriptorProto - (*Modules)(nil), // 8: sf.substreams.v1.Modules - (*anypb.Any)(nil), // 9: google.protobuf.Any + nil, // 5: sf.substreams.v1.Package.BlockFiltersEntry + nil, // 6: sf.substreams.v1.NetworkParams.InitialBlocksEntry + nil, // 7: sf.substreams.v1.NetworkParams.ParamsEntry + (*descriptorpb.FileDescriptorProto)(nil), // 8: google.protobuf.FileDescriptorProto + (*Modules)(nil), // 9: sf.substreams.v1.Modules + (*anypb.Any)(nil), // 10: google.protobuf.Any } var file_sf_substreams_v1_package_proto_depIdxs = []int32{ - 7, // 0: sf.substreams.v1.Package.proto_files:type_name -> google.protobuf.FileDescriptorProto - 8, // 1: sf.substreams.v1.Package.modules:type_name -> sf.substreams.v1.Modules - 3, // 2: sf.substreams.v1.Package.module_meta:type_name -> sf.substreams.v1.ModuleMetadata - 2, // 3: sf.substreams.v1.Package.package_meta:type_name -> sf.substreams.v1.PackageMetadata - 9, // 4: sf.substreams.v1.Package.sink_config:type_name -> google.protobuf.Any - 4, // 5: sf.substreams.v1.Package.networks:type_name -> sf.substreams.v1.Package.NetworksEntry - 5, // 6: sf.substreams.v1.NetworkParams.initialBlocks:type_name -> sf.substreams.v1.NetworkParams.InitialBlocksEntry - 6, // 7: sf.substreams.v1.NetworkParams.params:type_name -> sf.substreams.v1.NetworkParams.ParamsEntry - 1, // 8: sf.substreams.v1.Package.NetworksEntry.value:type_name -> sf.substreams.v1.NetworkParams - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 8, // 0: sf.substreams.v1.Package.proto_files:type_name -> google.protobuf.FileDescriptorProto + 9, // 1: sf.substreams.v1.Package.modules:type_name -> sf.substreams.v1.Modules + 3, // 2: sf.substreams.v1.Package.module_meta:type_name -> sf.substreams.v1.ModuleMetadata + 2, // 3: sf.substreams.v1.Package.package_meta:type_name -> sf.substreams.v1.PackageMetadata + 10, // 4: sf.substreams.v1.Package.sink_config:type_name -> google.protobuf.Any + 4, // 5: sf.substreams.v1.Package.networks:type_name -> sf.substreams.v1.Package.NetworksEntry + 5, // 6: sf.substreams.v1.Package.block_filters:type_name -> sf.substreams.v1.Package.BlockFiltersEntry + 6, // 7: sf.substreams.v1.NetworkParams.initialBlocks:type_name -> sf.substreams.v1.NetworkParams.InitialBlocksEntry + 7, // 8: sf.substreams.v1.NetworkParams.params:type_name -> sf.substreams.v1.NetworkParams.ParamsEntry + 1, // 9: sf.substreams.v1.Package.NetworksEntry.value:type_name -> sf.substreams.v1.NetworkParams + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_sf_substreams_v1_package_proto_init() } @@ -518,7 +537,7 @@ func file_sf_substreams_v1_package_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sf_substreams_v1_package_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/pipeline/exec/storeexec.go b/pipeline/exec/storeexec.go index 4fa4f99ab..d89bd0877 100644 --- a/pipeline/exec/storeexec.go +++ b/pipeline/exec/storeexec.go @@ -3,10 +3,11 @@ package exec import ( "context" "fmt" + pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" "google.golang.org/protobuf/proto" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" + pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" "github.com/streamingfast/substreams/reqctx" "github.com/streamingfast/substreams/storage/execout" "github.com/streamingfast/substreams/storage/store" @@ -27,7 +28,7 @@ func (e *StoreModuleExecutor) Name() string { return e.moduleName } func (e *StoreModuleExecutor) String() string { return e.Name() } func (e *StoreModuleExecutor) applyCachedOutput(value []byte) error { - deltas := &pbssinternal.StoreDeltas{} + deltas := &pbsubstreams.StoreDeltas{} err := proto.Unmarshal(value, deltas) if err != nil { return fmt.Errorf("unmarshalling output deltas: %w", err) @@ -53,7 +54,7 @@ func (e *StoreModuleExecutor) HasValidOutput() bool { } func (e *StoreModuleExecutor) wrapDeltas() ([]byte, *pbssinternal.ModuleOutput, error) { - deltas := &pbssinternal.StoreDeltas{ + deltas := &pbsubstreams.StoreDeltas{ StoreDeltas: e.outputStore.GetDeltas(), } @@ -71,7 +72,7 @@ func (e *StoreModuleExecutor) wrapDeltas() ([]byte, *pbssinternal.ModuleOutput, } func (e *StoreModuleExecutor) toModuleOutput(data []byte) (*pbssinternal.ModuleOutput, error) { - deltas := &pbssinternal.StoreDeltas{} + deltas := &pbsubstreams.StoreDeltas{} err := proto.Unmarshal(data, deltas) if err != nil { return nil, fmt.Errorf("unmarshalling output deltas: %w", err) diff --git a/pipeline/outputmodules/validate.go b/pipeline/outputmodules/validate.go index a278b4dcd..deee365ea 100644 --- a/pipeline/outputmodules/validate.go +++ b/pipeline/outputmodules/validate.go @@ -51,6 +51,22 @@ func validateRequest(binaries []*pbsubstreams.Binary, modules *pbsubstreams.Modu if err := validateModuleGraph(modules.Modules, outputModule, blockType); err != nil { return err } + + if err := checkNotImplemented(modules.Modules); err != nil { + return fmt.Errorf("checking feature not implemented: %w", err) + } + return nil +} + +func checkNotImplemented(mods []*pbsubstreams.Module) error { + for _, mod := range mods { + if mod.ModuleKind() == pbsubstreams.ModuleKindBlockIndex { + return fmt.Errorf("block index module is not implemented") + } + if mod.GetBlockFilter() != nil { + return fmt.Errorf("block filter module is not implemented") + } + } return nil } diff --git a/pipeline/pipeline.go b/pipeline/pipeline.go index 813ddf71f..cd3fb911c 100644 --- a/pipeline/pipeline.go +++ b/pipeline/pipeline.go @@ -336,7 +336,7 @@ func toRPCStoreModuleOutputs(in *pbssinternal.ModuleOutput) (out *pbsubstreamsrp } } -func toRPCDeltas(in *pbssinternal.StoreDeltas) (out []*pbsubstreamsrpc.StoreDelta) { +func toRPCDeltas(in *pbsubstreams.StoreDeltas) (out []*pbsubstreamsrpc.StoreDelta) { if len(in.StoreDeltas) == 0 { return nil } @@ -354,13 +354,13 @@ func toRPCDeltas(in *pbssinternal.StoreDeltas) (out []*pbsubstreamsrpc.StoreDelt return } -func toRPCOperation(in pbssinternal.StoreDelta_Operation) (out pbsubstreamsrpc.StoreDelta_Operation) { +func toRPCOperation(in pbsubstreams.StoreDelta_Operation) (out pbsubstreamsrpc.StoreDelta_Operation) { switch in { - case pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_UPDATE: return pbsubstreamsrpc.StoreDelta_UPDATE - case pbssinternal.StoreDelta_CREATE: + case pbsubstreams.StoreDelta_CREATE: return pbsubstreamsrpc.StoreDelta_CREATE - case pbssinternal.StoreDelta_DELETE: + case pbsubstreams.StoreDelta_DELETE: return pbsubstreamsrpc.StoreDelta_DELETE } return pbsubstreamsrpc.StoreDelta_UNSET diff --git a/proto/sf/substreams/v1/modules.proto b/proto/sf/substreams/v1/modules.proto index f93e9c924..2f154ba7b 100644 --- a/proto/sf/substreams/v1/modules.proto +++ b/proto/sf/substreams/v1/modules.proto @@ -20,6 +20,7 @@ message Module { oneof kind { KindMap kind_map = 2; KindStore kind_store = 3; + KindBlockIndex kind_block_index = 10; }; uint32 binary_index = 4; @@ -30,6 +31,13 @@ message Module { uint64 initial_block = 8; + BlockFilter block_filter = 9; + + + message BlockFilter { + string module = 1; + string query = 2; + } message KindMap { string output_type = 1; } @@ -63,6 +71,10 @@ message Module { } } + message KindBlockIndex { + string output_type = 1; + } + message Input { oneof input { Source source = 1; diff --git a/proto/sf/substreams/v1/package.proto b/proto/sf/substreams/v1/package.proto index c2b4a1979..564fd7244 100644 --- a/proto/sf/substreams/v1/package.proto +++ b/proto/sf/substreams/v1/package.proto @@ -28,6 +28,8 @@ message Package { bytes image = 12; map networks = 13; + + map block_filters = 14; } message NetworkParams { diff --git a/storage/store/base_store.go b/storage/store/base_store.go index da9c64f3a..0228fd433 100644 --- a/storage/store/base_store.go +++ b/storage/store/base_store.go @@ -3,7 +3,6 @@ package store import ( "fmt" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" "github.com/streamingfast/substreams/storage/store/marshaller" "go.uber.org/zap" @@ -14,7 +13,7 @@ type baseStore struct { *Config kv map[string][]byte // kv is the state, and assumes all deltas were already applied to it. - deltas []*pbssinternal.StoreDelta // deltas are always deltas for the given block. + deltas []*pbsubstreams.StoreDelta // deltas are always deltas for the given block. lastOrdinal uint64 marshaller marshaller.Marshaller totalSizeBytes uint64 diff --git a/storage/store/delta.go b/storage/store/delta.go index c53c782a7..f901354be 100644 --- a/storage/store/delta.go +++ b/storage/store/delta.go @@ -4,10 +4,10 @@ import ( "fmt" "regexp" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" + pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" ) -func (b *baseStore) ApplyDelta(delta *pbssinternal.StoreDelta) { +func (b *baseStore) ApplyDelta(delta *pbsubstreams.StoreDelta) { // Keys need to have at least one character, and mustn't start with 0xFF is reserved for internal use. if len(delta.Key) == 0 { panic(fmt.Sprintf("key invalid, must be at least 1 character for module %q", b.name)) @@ -20,7 +20,7 @@ func (b *baseStore) ApplyDelta(delta *pbssinternal.StoreDelta) { oldSize := uint64(len(delta.OldValue)) keySize := uint64(len(delta.Key)) switch delta.Operation { - case pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_UPDATE: b.kv[delta.Key] = delta.NewValue switch { case newSize > oldSize: @@ -29,12 +29,12 @@ func (b *baseStore) ApplyDelta(delta *pbssinternal.StoreDelta) { b.totalSizeBytes -= (oldSize - newSize) } - case pbssinternal.StoreDelta_CREATE: + case pbsubstreams.StoreDelta_CREATE: b.kv[delta.Key] = delta.NewValue b.totalSizeBytes += newSize b.totalSizeBytes += keySize - case pbssinternal.StoreDelta_DELETE: + case pbsubstreams.StoreDelta_DELETE: delete(b.kv, delta.Key) b.totalSizeBytes -= oldSize b.totalSizeBytes -= keySize @@ -52,7 +52,7 @@ func storeTooBigError(storeName string, size, limit uint64) error { return fmt.Errorf("store %q became too big at %d, maximum size: %d", storeName, size, limit) } -func (b *baseStore) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta) { +func (b *baseStore) ApplyDeltasReverse(deltas []*pbsubstreams.StoreDelta) { for i := len(deltas) - 1; i >= 0; i-- { delta := deltas[i] @@ -60,7 +60,7 @@ func (b *baseStore) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta) { oldSize := uint64(len(delta.OldValue)) keySize := uint64(len(delta.Key)) switch delta.Operation { - case pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_UPDATE: b.kv[delta.Key] = delta.OldValue switch { case newSize > oldSize: @@ -69,12 +69,12 @@ func (b *baseStore) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta) { b.totalSizeBytes += (oldSize - newSize) } - case pbssinternal.StoreDelta_CREATE: + case pbsubstreams.StoreDelta_CREATE: delete(b.kv, delta.Key) b.totalSizeBytes -= newSize b.totalSizeBytes -= keySize - case pbssinternal.StoreDelta_DELETE: + case pbsubstreams.StoreDelta_DELETE: b.kv[delta.Key] = delta.OldValue b.totalSizeBytes += oldSize b.totalSizeBytes += keySize @@ -83,11 +83,11 @@ func (b *baseStore) ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta) { } } -func (b *baseStore) GetDeltas() []*pbssinternal.StoreDelta { +func (b *baseStore) GetDeltas() []*pbsubstreams.StoreDelta { return b.deltas } -func (b *baseStore) SetDeltas(deltas []*pbssinternal.StoreDelta) { +func (b *baseStore) SetDeltas(deltas []*pbsubstreams.StoreDelta) { b.deltas = deltas for _, delta := range deltas { b.ApplyDelta(delta) diff --git a/storage/store/delta_test.go b/storage/store/delta_test.go index dc32c209e..7700fc662 100644 --- a/storage/store/delta_test.go +++ b/storage/store/delta_test.go @@ -3,7 +3,7 @@ package store import ( "testing" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" + pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" "github.com/stretchr/testify/assert" ) @@ -14,19 +14,19 @@ var baseStoreConfig = &Config{ func TestApplyDelta(t *testing.T) { tests := []struct { name string - deltas []*pbssinternal.StoreDelta + deltas []*pbsubstreams.StoreDelta expectedKV map[string][]byte }{ { name: "creates", - deltas: []*pbssinternal.StoreDelta{ + deltas: []*pbsubstreams.StoreDelta{ { - Operation: pbssinternal.StoreDelta_CREATE, + Operation: pbsubstreams.StoreDelta_CREATE, Key: "k1", NewValue: []byte("v1"), }, { - Operation: pbssinternal.StoreDelta_CREATE, + Operation: pbsubstreams.StoreDelta_CREATE, Key: "k2", NewValue: []byte("v2"), }, @@ -38,14 +38,14 @@ func TestApplyDelta(t *testing.T) { }, { name: "update", - deltas: []*pbssinternal.StoreDelta{ + deltas: []*pbsubstreams.StoreDelta{ { - Operation: pbssinternal.StoreDelta_CREATE, + Operation: pbsubstreams.StoreDelta_CREATE, Key: "k1", NewValue: []byte("v1"), }, { - Operation: pbssinternal.StoreDelta_UPDATE, + Operation: pbsubstreams.StoreDelta_UPDATE, Key: "k1", OldValue: []byte("v1"), NewValue: []byte("v2"), @@ -57,19 +57,19 @@ func TestApplyDelta(t *testing.T) { }, { name: "delete", - deltas: []*pbssinternal.StoreDelta{ + deltas: []*pbsubstreams.StoreDelta{ { - Operation: pbssinternal.StoreDelta_CREATE, + Operation: pbsubstreams.StoreDelta_CREATE, Key: "k1", NewValue: []byte("v1"), }, { - Operation: pbssinternal.StoreDelta_CREATE, + Operation: pbsubstreams.StoreDelta_CREATE, Key: "k2", NewValue: []byte("v2"), }, { - Operation: pbssinternal.StoreDelta_DELETE, + Operation: pbsubstreams.StoreDelta_DELETE, Key: "k1", OldValue: []byte("v1"), }, @@ -100,25 +100,25 @@ func Test_baseStore_SetDeltas(t *testing.T) { kv: map[string][]byte{"A": []byte("a")}, totalSizeBytes: 2, } - s.SetDeltas([]*pbssinternal.StoreDelta{ + s.SetDeltas([]*pbsubstreams.StoreDelta{ { Key: "A", - Operation: pbssinternal.StoreDelta_DELETE, + Operation: pbsubstreams.StoreDelta_DELETE, OldValue: []byte("a"), }, { Key: "B", - Operation: pbssinternal.StoreDelta_CREATE, + Operation: pbsubstreams.StoreDelta_CREATE, NewValue: []byte("b"), }, { Key: "C", - Operation: pbssinternal.StoreDelta_CREATE, + Operation: pbsubstreams.StoreDelta_CREATE, NewValue: []byte("c"), }, { Key: "C", - Operation: pbssinternal.StoreDelta_UPDATE, + Operation: pbsubstreams.StoreDelta_UPDATE, OldValue: []byte("c"), NewValue: []byte("d"), }, diff --git a/storage/store/interface.go b/storage/store/interface.go index 4c9422bdf..508143d09 100644 --- a/storage/store/interface.go +++ b/storage/store/interface.go @@ -6,7 +6,6 @@ import ( "math/big" "github.com/shopspring/decimal" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" ) @@ -74,10 +73,10 @@ type Iterable interface { } type DeltaAccessor interface { - SetDeltas([]*pbssinternal.StoreDelta) - GetDeltas() []*pbssinternal.StoreDelta - ApplyDeltasReverse(deltas []*pbssinternal.StoreDelta) - ApplyDelta(delta *pbssinternal.StoreDelta) + SetDeltas([]*pbsubstreams.StoreDelta) + GetDeltas() []*pbsubstreams.StoreDelta + ApplyDeltasReverse(deltas []*pbsubstreams.StoreDelta) + ApplyDelta(delta *pbsubstreams.StoreDelta) } type Reader interface { diff --git a/storage/store/value_delete.go b/storage/store/value_delete.go index af478b05d..bdf0b75d1 100644 --- a/storage/store/value_delete.go +++ b/storage/store/value_delete.go @@ -4,7 +4,7 @@ import ( "sort" "strings" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" + pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" ) //func (s *baseStore) Del(ord uint64, key string) { @@ -27,13 +27,13 @@ import ( func (b *baseStore) DeletePrefix(ord uint64, prefix string) { b.bumpOrdinal(ord) - var deltas []*pbssinternal.StoreDelta + var deltas []*pbsubstreams.StoreDelta for key, val := range b.kv { if !strings.HasPrefix(key, prefix) { continue } - delta := &pbssinternal.StoreDelta{ - Operation: pbssinternal.StoreDelta_DELETE, + delta := &pbsubstreams.StoreDelta{ + Operation: pbsubstreams.StoreDelta_DELETE, Ordinal: ord, Key: key, OldValue: val, diff --git a/storage/store/value_get.go b/storage/store/value_get.go index d6e009041..91ee38c95 100644 --- a/storage/store/value_get.go +++ b/storage/store/value_get.go @@ -3,7 +3,7 @@ package store import ( "fmt" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" + pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" ) func (b *baseStore) GetFirst(key string) ([]byte, bool) { @@ -13,9 +13,9 @@ func (b *baseStore) GetFirst(key string) ([]byte, bool) { } switch delta.Operation { - case pbssinternal.StoreDelta_DELETE, pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_DELETE, pbsubstreams.StoreDelta_UPDATE: return delta.OldValue, true - case pbssinternal.StoreDelta_CREATE: + case pbsubstreams.StoreDelta_CREATE: return nil, false default: // WARN: is that legit? what if some upstream stream is broken? can we trust all those streams? @@ -35,9 +35,9 @@ func (b *baseStore) HasFirst(key string) bool { } switch delta.Operation { - case pbssinternal.StoreDelta_DELETE, pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_DELETE, pbsubstreams.StoreDelta_UPDATE: return true - case pbssinternal.StoreDelta_CREATE: + case pbsubstreams.StoreDelta_CREATE: return false default: // WARN: is that legit? what if some upstream stream is broken? can we trust all those streams? @@ -58,9 +58,9 @@ func (b *baseStore) GetLast(key string) ([]byte, bool) { } switch delta.Operation { - case pbssinternal.StoreDelta_DELETE: + case pbsubstreams.StoreDelta_DELETE: return nil, false - case pbssinternal.StoreDelta_CREATE, pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_CREATE, pbsubstreams.StoreDelta_UPDATE: return delta.NewValue, true default: panic(fmt.Sprintf("invalid value %q for pbssinternal.StoreDelta::Op for key %q", delta.Operation.String(), delta.Key)) @@ -79,9 +79,9 @@ func (b *baseStore) HasLast(key string) bool { } switch delta.Operation { - case pbssinternal.StoreDelta_DELETE: + case pbsubstreams.StoreDelta_DELETE: return false - case pbssinternal.StoreDelta_CREATE, pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_CREATE, pbsubstreams.StoreDelta_UPDATE: return true default: panic(fmt.Sprintf("invalid value %q for pbssinternal.StoreDelta::Op for key %q", delta.Operation.String(), delta.Key)) @@ -106,10 +106,10 @@ func (b *baseStore) GetAt(ord uint64, key string) (out []byte, found bool) { } switch delta.Operation { - case pbssinternal.StoreDelta_DELETE, pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_DELETE, pbsubstreams.StoreDelta_UPDATE: out = delta.OldValue found = true - case pbssinternal.StoreDelta_CREATE: + case pbsubstreams.StoreDelta_CREATE: out = nil found = false default: @@ -135,9 +135,9 @@ func (b *baseStore) HasAt(ord uint64, key string) bool { } switch delta.Operation { - case pbssinternal.StoreDelta_DELETE, pbssinternal.StoreDelta_UPDATE: + case pbsubstreams.StoreDelta_DELETE, pbsubstreams.StoreDelta_UPDATE: found = true - case pbssinternal.StoreDelta_CREATE: + case pbsubstreams.StoreDelta_CREATE: found = false default: // WARN: is that legit? what if some upstream stream is broken? can we trust all those streams? diff --git a/storage/store/value_set.go b/storage/store/value_set.go index 582fa63af..b74747887 100644 --- a/storage/store/value_set.go +++ b/storage/store/value_set.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - pbssinternal "github.com/streamingfast/substreams/pb/sf/substreams/intern/v2" + pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" ) func (b *baseStore) SetBytesIfNotExists(ord uint64, key string, value []byte) { @@ -43,18 +43,18 @@ func (b *baseStore) set(ord uint64, key string, value []byte) { copy(cpValue, value) val, found := b.GetLast(key) - var delta *pbssinternal.StoreDelta + var delta *pbsubstreams.StoreDelta if found { - delta = &pbssinternal.StoreDelta{ - Operation: pbssinternal.StoreDelta_UPDATE, + delta = &pbsubstreams.StoreDelta{ + Operation: pbsubstreams.StoreDelta_UPDATE, Ordinal: ord, Key: key, OldValue: val, NewValue: cpValue, } } else { - delta = &pbssinternal.StoreDelta{ - Operation: pbssinternal.StoreDelta_CREATE, + delta = &pbsubstreams.StoreDelta{ + Operation: pbsubstreams.StoreDelta_CREATE, Ordinal: ord, Key: key, OldValue: nil, @@ -77,8 +77,8 @@ func (b *baseStore) setIfNotExists(ord uint64, key string, value []byte) { cpValue := make([]byte, len(value)) copy(cpValue, value) - delta := &pbssinternal.StoreDelta{ - Operation: pbssinternal.StoreDelta_CREATE, + delta := &pbsubstreams.StoreDelta{ + Operation: pbsubstreams.StoreDelta_CREATE, Ordinal: ord, Key: key, OldValue: nil, From d2397aa5871a6cc62fb8d534db6ea5b0d835eb45 Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Wed, 13 Mar 2024 17:23:52 -0400 Subject: [PATCH 2/7] Add validate manifest test --- manifest/package_test.go | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/manifest/package_test.go b/manifest/package_test.go index 2e7aff2fb..6cf10cb55 100644 --- a/manifest/package_test.go +++ b/manifest/package_test.go @@ -173,6 +173,7 @@ func TestHandleUseModules(t *testing.T) { } func TestValidateManifest(t *testing.T) { + var initialBlock uint64 = 123 cases := []struct { name string manifest *Manifest @@ -181,6 +182,7 @@ func TestValidateManifest(t *testing.T) { { name: "sunny path", manifest: &Manifest{ + SpecVersion: "v0.1.0", Modules: []*Module{ {Name: "basic_index", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, }, @@ -188,26 +190,48 @@ func TestValidateManifest(t *testing.T) { expectedError: "", }, { - name: "incorrect block filter module", + name: "block index with different output", manifest: &Manifest{ + SpecVersion: "v0.1.0", Modules: []*Module{ - {Name: "bd_module", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.test"}, BlockFilter: BlockFilter{Module: "basic", Query: "this is my query"}}, + {Name: "basic_index", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.test"}}, }, }, - expectedError: "", + expectedError: "stream \"basic_index\": block index module must have output type 'proto:sf.substreams.index.v1.Keys'", + }, + { + name: "block index with inputs", + manifest: &Manifest{ + SpecVersion: "v0.1.0", + Modules: []*Module{ + {Name: "basic_index", Kind: "blockIndex", Inputs: []*Input{{Source: "proto:sf.database.v1.changes"}}, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + }, + }, + expectedError: "stream \"basic_index\": block index module cannot have inputs", + }, + { + name: "block index with initialBlock", + manifest: &Manifest{ + SpecVersion: "v0.1.0", + Modules: []*Module{ + {Name: "basic_index", Kind: "blockIndex", InitialBlock: &initialBlock, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + }, + }, + expectedError: "stream \"basic_index\": block index module cannot have initial block", }, } - manifestConverter := newManifestConverter("test", true) + manifestConv := newManifestConverter("test", true) for _, c := range cases { t.Run(c.name, func(t *testing.T) { fmt.Println("Modules", c.manifest.Modules) - err := manifestConverter.validateManifest(c.manifest) - if c.expectedError != "" { + err := manifestConv.validateManifest(c.manifest) + if c.expectedError == "" { require.NoError(t, err) return } require.Error(t, err) + require.Equal(t, c.expectedError, err.Error()) }) } } From 7b31afe5cf580f589ab1e59ee891ca15c4d50238 Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Wed, 13 Mar 2024 17:56:59 -0400 Subject: [PATCH 3/7] Add test for validat modules --- manifest/package_test.go | 139 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/manifest/package_test.go b/manifest/package_test.go index 6cf10cb55..b0cc3b218 100644 --- a/manifest/package_test.go +++ b/manifest/package_test.go @@ -235,3 +235,142 @@ func TestValidateManifest(t *testing.T) { }) } } + +func TestValidateModules(t *testing.T) { + cases := []struct { + name string + modules *pbsubstreams.Modules + expectedError string + }{ + { + name: "sunny path", + modules: &pbsubstreams.Modules{ + Modules: []*pbsubstreams.Module{ + { + Name: "test_module", + BinaryEntrypoint: "test_module", + InitialBlock: uint64(62), + Kind: &pbsubstreams.Module_KindMap_{ + KindMap: &pbsubstreams.Module_KindMap{ + OutputType: "sf.database.v1.changes", + }, + }, + Inputs: []*pbsubstreams.Module_Input{ + {Input: &pbsubstreams.Module_Input_Source_{Source: &pbsubstreams.Module_Input_Source{Type: "sf.database.v1.changes"}}}, + }, + Output: &pbsubstreams.Module_Output{ + Type: "sf.entity.v1.changes", + }, + BlockFilter: &pbsubstreams.Module_BlockFilter{ + Module: "block_index", + Query: "This is my query", + }, + }, + + { + Name: "block_index", + BinaryEntrypoint: "block_index", + Kind: &pbsubstreams.Module_KindBlockIndex_{KindBlockIndex: &pbsubstreams.Module_KindBlockIndex{OutputType: "sf.substreams.index.v1.Keys"}}, + Output: &pbsubstreams.Module_Output{ + Type: "sf.substreams.index.v1.Keys", + }, + }, + }, + }, + expectedError: "", + }, + { + name: "wrong blockfilter module", + modules: &pbsubstreams.Modules{ + Modules: []*pbsubstreams.Module{ + { + Name: "test_module", + BinaryEntrypoint: "test_module", + InitialBlock: uint64(62), + Kind: &pbsubstreams.Module_KindMap_{ + KindMap: &pbsubstreams.Module_KindMap{ + OutputType: "sf.database.v1.changes", + }, + }, + Inputs: []*pbsubstreams.Module_Input{ + {Input: &pbsubstreams.Module_Input_Source_{Source: &pbsubstreams.Module_Input_Source{Type: "sf.database.v1.changes"}}}, + }, + Output: &pbsubstreams.Module_Output{ + Type: "sf.entity.v1.changes", + }, + BlockFilter: &pbsubstreams.Module_BlockFilter{ + Module: "wrong_module", + Query: "This is my query", + }, + }, + + { + Name: "block_index", + BinaryEntrypoint: "block_index", + Kind: &pbsubstreams.Module_KindBlockIndex_{KindBlockIndex: &pbsubstreams.Module_KindBlockIndex{OutputType: "sf.substreams.index.v1.Keys"}}, + Output: &pbsubstreams.Module_Output{ + Type: "sf.substreams.index.v1.Keys", + }, + }, + }, + }, + expectedError: "checking block filter for module \"test_module\": block filter module \"wrong_module\" not found", + }, + { + name: "wrong blockfilter module output type", + modules: &pbsubstreams.Modules{ + Modules: []*pbsubstreams.Module{ + { + Name: "test_module", + BinaryEntrypoint: "test_module", + InitialBlock: uint64(62), + Kind: &pbsubstreams.Module_KindMap_{ + KindMap: &pbsubstreams.Module_KindMap{ + OutputType: "sf.database.v1.changes", + }, + }, + Inputs: []*pbsubstreams.Module_Input{ + {Input: &pbsubstreams.Module_Input_Source_{Source: &pbsubstreams.Module_Input_Source{Type: "sf.database.v1.changes"}}}, + }, + Output: &pbsubstreams.Module_Output{ + Type: "sf.entity.v1.changes", + }, + BlockFilter: &pbsubstreams.Module_BlockFilter{ + Module: "map_module", + Query: "This is my query", + }, + }, + { + Name: "map_module", + BinaryEntrypoint: "0", + InitialBlock: uint64(1), + Kind: &pbsubstreams.Module_KindMap_{ + KindMap: &pbsubstreams.Module_KindMap{ + OutputType: "sf.streamingfast.test.v1", + }, + }, + Inputs: []*pbsubstreams.Module_Input{ + {Input: &pbsubstreams.Module_Input_Source_{Source: &pbsubstreams.Module_Input_Source{Type: "sf.database.v1.changes"}}}, + }, + Output: &pbsubstreams.Module_Output{ + Type: "sf.streamingfast.test.v1", + }, + }, + }, + }, + expectedError: "checking block filter for module \"test_module\": block filter module \"map_module\" not of 'block_index' kind", + }, + } + + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + err := ValidateModules(c.modules) + if c.expectedError == "" { + require.NoError(t, err) + return + } + require.Error(t, err) + require.Equal(t, c.expectedError, err.Error()) + }) + } +} From 5f7f96a811c6c056e2b419bd1bcacddeea77e649 Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Thu, 14 Mar 2024 09:29:58 -0400 Subject: [PATCH 4/7] Add test for validate manifest --- manifest/manifest.go | 15 +++++++-------- manifest/manifest_test.go | 2 +- manifest/package.go | 5 ++++- manifest/package_test.go | 13 +++++++++++++ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/manifest/manifest.go b/manifest/manifest.go index ed74ee21c..da7e4376e 100644 --- a/manifest/manifest.go +++ b/manifest/manifest.go @@ -10,9 +10,8 @@ import ( "regexp" "strings" - "gopkg.in/yaml.v3" - pbsubstreams "github.com/streamingfast/substreams/pb/sf/substreams/v1" + "gopkg.in/yaml.v3" ) const UNSET = math.MaxUint64 @@ -84,11 +83,11 @@ type Protobuf struct { } type Module struct { - Name string `yaml:"name"` - Doc string `yaml:"doc"` - Kind string `yaml:"kind"` - InitialBlock *uint64 `yaml:"initialBlock"` - BlockFilter BlockFilter `yaml:"blockFilter"` + Name string `yaml:"name"` + Doc string `yaml:"doc"` + Kind string `yaml:"kind"` + InitialBlock *uint64 `yaml:"initialBlock"` + BlockFilter *BlockFilter `yaml:"blockFilter"` UpdatePolicy string `yaml:"updatePolicy"` ValueType string `yaml:"valueType"` @@ -302,7 +301,7 @@ func (m *Module) ToProtoWASM(codeIndex uint32) (*pbsubstreams.Module, error) { } func (m *Module) setBlockFilterToProto(pbModule *pbsubstreams.Module) { - if m.BlockFilter.Module != "" { + if m.BlockFilter != nil { pbModule.BlockFilter = &pbsubstreams.Module_BlockFilter{ Module: m.BlockFilter.Module, Query: m.BlockFilter.Query, diff --git a/manifest/manifest_test.go b/manifest/manifest_test.go index eed0b4cca..64b2b2152 100644 --- a/manifest/manifest_test.go +++ b/manifest/manifest_test.go @@ -107,7 +107,7 @@ output: Kind: ModuleKindMap, Name: "bf_module", Output: StreamOutput{Type: "proto:sf.substreams.database.changes.v1"}, - BlockFilter: BlockFilter{ + BlockFilter: &BlockFilter{ Module: "basic_index", Query: "this is my query", }, diff --git a/manifest/package.go b/manifest/package.go index ad954ffa5..fdeeb6160 100644 --- a/manifest/package.go +++ b/manifest/package.go @@ -89,7 +89,10 @@ func (r *manifestConverter) validateManifest(manif *Manifest) error { return fmt.Errorf("stream %q: block index module cannot have initial block", s.Name) } - //TODO: Validate the output type + if s.BlockFilter != nil { + return fmt.Errorf("stream %q: block index module cannot have block filter", s.Name) + } + if s.Output.Type != "proto:sf.substreams.index.v1.Keys" { return fmt.Errorf("stream %q: block index module must have output type 'proto:sf.substreams.index.v1.Keys'", s.Name) } diff --git a/manifest/package_test.go b/manifest/package_test.go index b0cc3b218..ae88b9a6f 100644 --- a/manifest/package_test.go +++ b/manifest/package_test.go @@ -219,6 +219,19 @@ func TestValidateManifest(t *testing.T) { }, expectedError: "stream \"basic_index\": block index module cannot have initial block", }, + { + name: "block index with block filter", + manifest: &Manifest{ + SpecVersion: "v0.1.0", + Modules: []*Module{ + {Name: "basic_index", Kind: "blockIndex", BlockFilter: &BlockFilter{ + Module: "my_module", + Query: "test query", + }, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + }, + }, + expectedError: "stream \"basic_index\": block index module cannot have block filter", + }, } manifestConv := newManifestConverter("test", true) From bcff1374be16d962ec2b5d73e09fe790a0209d78 Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Thu, 14 Mar 2024 10:05:17 -0400 Subject: [PATCH 5/7] generate keys into systems proto files --- pb/generate.sh | 1 + pb/last_generate.txt | 4 +- pb/sf/substreams/index/v1/keys.pb.go | 147 ++++++++++++++++++++++++ pb/system/system.pb | Bin 94843 -> 96930 bytes proto/sf/substreams/index/v1/keys.proto | 0 5 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 pb/sf/substreams/index/v1/keys.pb.go create mode 100644 proto/sf/substreams/index/v1/keys.proto diff --git a/pb/generate.sh b/pb/generate.sh index 089715d89..f1f6bbb65 100755 --- a/pb/generate.sh +++ b/pb/generate.sh @@ -52,6 +52,7 @@ function generate_system() { "$PROTO/sf/substreams/v1/modules.proto" \ "$PROTO/sf/substreams/v1/package.proto" \ "$PROTO/sf/substreams/v1/clock.proto" \ + "$PROTO/sf/substreams/index/v1/keys.proto" \ "$PROTO/sf/substreams/rpc/v2/service.proto" \ "$PROTO/sf/substreams/sink/service/v1/service.proto" \ "$PROTO/google/protobuf/any.proto" \ diff --git a/pb/last_generate.txt b/pb/last_generate.txt index 72e5631c0..ca8ca49df 100644 --- a/pb/last_generate.txt +++ b/pb/last_generate.txt @@ -1,2 +1,2 @@ -generate.sh - Fri Nov 17 08:55:04 EST 2023 - colindickson -streamingfast/proto revision: 59be7da856634f7315174ca87828760bafe2a9af +generate.sh - Thu 14 Mar 2024 10:02:19 EDT - arnaudberger +streamingfast/proto revision: 2999cd42d71a82c4adf739557f9520f0609f7b10 diff --git a/pb/sf/substreams/index/v1/keys.pb.go b/pb/sf/substreams/index/v1/keys.pb.go new file mode 100644 index 000000000..5eceed6be --- /dev/null +++ b/pb/sf/substreams/index/v1/keys.pb.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: sf/substreams/index/v1/keys.proto + +package pbsubstreams + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Keys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` +} + +func (x *Keys) Reset() { + *x = Keys{} + if protoimpl.UnsafeEnabled { + mi := &file_sf_substreams_index_v1_keys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Keys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Keys) ProtoMessage() {} + +func (x *Keys) ProtoReflect() protoreflect.Message { + mi := &file_sf_substreams_index_v1_keys_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Keys.ProtoReflect.Descriptor instead. +func (*Keys) Descriptor() ([]byte, []int) { + return file_sf_substreams_index_v1_keys_proto_rawDescGZIP(), []int{0} +} + +func (x *Keys) GetKeys() []string { + if x != nil { + return x.Keys + } + return nil +} + +var File_sf_substreams_index_v1_keys_proto protoreflect.FileDescriptor + +var file_sf_substreams_index_v1_keys_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x73, 0x66, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x04, 0x4b, + 0x65, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x66, + 0x61, 0x73, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, + 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sf_substreams_index_v1_keys_proto_rawDescOnce sync.Once + file_sf_substreams_index_v1_keys_proto_rawDescData = file_sf_substreams_index_v1_keys_proto_rawDesc +) + +func file_sf_substreams_index_v1_keys_proto_rawDescGZIP() []byte { + file_sf_substreams_index_v1_keys_proto_rawDescOnce.Do(func() { + file_sf_substreams_index_v1_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_sf_substreams_index_v1_keys_proto_rawDescData) + }) + return file_sf_substreams_index_v1_keys_proto_rawDescData +} + +var file_sf_substreams_index_v1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sf_substreams_index_v1_keys_proto_goTypes = []interface{}{ + (*Keys)(nil), // 0: sf.substreams.index.v1.Keys +} +var file_sf_substreams_index_v1_keys_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_sf_substreams_index_v1_keys_proto_init() } +func file_sf_substreams_index_v1_keys_proto_init() { + if File_sf_substreams_index_v1_keys_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sf_substreams_index_v1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Keys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sf_substreams_index_v1_keys_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sf_substreams_index_v1_keys_proto_goTypes, + DependencyIndexes: file_sf_substreams_index_v1_keys_proto_depIdxs, + MessageInfos: file_sf_substreams_index_v1_keys_proto_msgTypes, + }.Build() + File_sf_substreams_index_v1_keys_proto = out.File + file_sf_substreams_index_v1_keys_proto_rawDesc = nil + file_sf_substreams_index_v1_keys_proto_goTypes = nil + file_sf_substreams_index_v1_keys_proto_depIdxs = nil +} diff --git a/pb/system/system.pb b/pb/system/system.pb index 39c698badeb7e7264629807f3f86994c90639474..99a9abb338ef00d039e6bca8b74d143246c775e1 100644 GIT binary patch delta 7402 zcmai2TWnO<6}{))Gk0dr%=mGQ&Dhu&Kkx$^gAGPFly`t&V;**}F>f2&U~DkhKmxS6 zRY(hM9*R1xrc%|P_A^qN)F1SxRsO1krYNeKqz|?EsQOV=m0Bffsq z?z(%gefHkx?0xsSpZ_WLgHK{_RJ`r|u}kG&uNL*W-nZXUZ>E($I6rxFZYn3d%G`=~ zURX7(%4TP-PM({Xo4+u74o_3hX4M+emg;HEbw8@k?RrPn?jhMh5yGjlhl7P84)_-_4it+ijj8A@rn0X5rHsz?@8DgTQ0Dl4#Za)?o|LdCA% zoLab@b@gilmcH`nrYP@LB?HU-c<`uk=^wwi?k4|Lulztd&XuLP$KMs=N-p-^QL!>N z^4|ThO17)Cib>b?{J^V{L4*WQMN@=4pq4h3QWBan@T%P!7ReZ)M1(-APF6+;wCZd% z)1X-6*0U(4Q6h{Wcs0q$W(>TVy4B2sU$t&6EBaWx)>RQAS*k2TFj8B-GD0v?TeFId z!~?I+UBRL_Xm#4>kRp$RSC=e}gy7W$70gQnUcI}DMF}`vZ(~h>R-dejWT4eo*Dx&^ zcnvnzB$jJ%Gpv{dt)YZN4c#Po4Tv>Osr8&dHoL8!QS}_CHmgdNQ9j9BC-BzFDpjK5 z2Ev`SQWY@N*QUw~7^c^*D9|Bpk(E{~Ko47r_<|IW&B(q0zomkbMy`oKwz=yf*GRWb zm9uMtTx*xBm%cJGj%>9X+ioB`-2;(r7s{QgLOt?y+%6gKUAq0N zpNkOBNM^5$oCJn)Z~1Co85ov(8yeX$muzj3HC9YPZ?TR+O!8Ee6kyP|;K-Jkr6o3G ztK1)B{-7&qy{$Omr7D4>0F!rp{%TdGlFN zo4>M%AVAoL!#imSc(L7IS2LU|d%rpN=KEVTk)qq~uPq|Fq}SH2<}DEc?euGF&VtyG z+xo$inuy)R+u{{H5O-q5Tb77Q+YREBCcgW@fF?>1cP}GK5O*&lBE@?xapuE;PKq%G z;@)M%7>Ij8e9o?jt=*UV=)-42BKRQe^J|J?^Fi2WOT`Q1L3bcJGZfH4mE~>sXjA&_ zc?5({{dU`dq26!LBQUbmkMn4bV<-bT=w6C!Q_O?daC0VP0%zi|9FEQeFyx0JH)Sem z?IV7cj|?EfI^w4b80tqd6$Om7k5sL+bP18-ue$bI@Q3>CRgnI0-~-veO??sImi zg&mipHaohB9Zv_UM{lz``>n+)c`v)0`sPP^cyTNk|{5KgC$1bVzdNW(Fu97 zumsi5iFB!IvmdV;BOhX!5Rcn_(M>-`Z3rkSeP9bZi z?4_rh(rLfWn!pQ0a=K_4>P;bD6|H01(`l?zumi(q{1ruZXur?+s`w4*q)Ln5AR}k+ zkt*YeQ80l#=U<2ybabZ*&w*C16t)#Un`U)B5vV|=3a?=Od?K^_9S+fXoT*|e)W#EK z%hV|GyLV^qzvas^zX zk1il~dDeCkV5rX`$ySb?nGGr?{A&yIH|CezKb)=dewtPJ&xiEH8RWkG@mcq;v89hc zenYGX_Nv6ysTh7+?{C3~f8wzcBPby?~!bD)(Sj(QiM=zOjK%n zy74u+ZJGlBdrhvH#!b^}s%na4u-DYm$~4$$b{kkk4XD}DsK%SC%=|6%$ELY{jdlY) zveoGfjUQCbt%;R9|DtHx*n(+{ZFX#?f@w=eGdq2F+c0CAn*~JeZn<^?qZlf!-O|X7 z_GCJef!1DHMzj#0Ftm+zZgh2V!CPl}RifpN)J~@W{Vz zb^-uSbXyw5+|5ov1}D0gw*RNP_RP;*)v!3dp-`$D^fh(Et?mu8Q@0npbngkOmRGY@ zK}|Q-C^-PFAW)LDamB=j4C&`RhfenARzL0yBYWGfO%zt?e?^!QNC=fsA{}^+6VMa# z?>hDLg!_``jH{$_6DjjZIm5@vcR->8OZ)F9(s~Q@@Eqs+6#z!gxW3%AQWa6FjpIIJ zYKnMqT#OkZ8S(0xhlADPT%Y@w-TBvt#5ct+^L@kO>y=L_rF+B_F5Zh-Pxpzo{F`S) zeWR{vdOuX8(zr<_tsvj=v}jjvxvJ#JscUodxAW&m#Zdl@r^Rz5VCdRtdiAnR>i;Y@bf zx}u)Y<@&q;C88^CdI=^u(7L#|G5B{oTeziBkliS5Y8HB`?{Vp#9wPwvdpI{hQ0%Fw zj%2XcgUgTR?KSTzMg*iIQeGw>0^6l z^6BH`1HoP&l22yz)8c{L=NvFeraxHwILUEJ@_uO=0s!po$Gl4C76^*_Q>Fy~!QB4F zCcS3~T&JDG##~6hwhrJ1n6g?}XbOIrWQ9cPk&>V#|mcibr z8GxV((Fraq0Jw32&l3>IxHkcTc7m%aMX4U+@&LeUV`jAwCduX)*9Q=IW4yB|0w=jV z0I=LiE)O8kPI7qwktUZ%ipt{@mj?i7r?@pBF9eKc&I*3+oVu= zoaXX?B50>gdBo^G?9A#U$0&8@VtPc5>5=2SS(pGs=iMY_l@Ky=KAj0^I{+aYx0;m5 zajQuq&v-h+iU1QCf6lYcY<$7MH9^>MfV7$v8AG zS(BLdW~?GLjTx($fZ~i*M4er>id1Qrtzr_2m!U`>j&vZeIP)UZ1(}B06`mf_R2o><14NJ-19rh0Z{@r2!fS`GY-2;NXJ8+MhXDJ=MyRPvZ0JOW7M(6i#h3TD;fp%B- zPFI!%vFDtx3gbr^)WYYu_m`0$A;$%PxI&H#h%`AaAQ%i0R~p+`9{A4-=WDQ-!oXjS z>+16YnWDcf<*+F4351qGj|0N202o9Ny7xqg=va)~);)pn3>VTD1mZJ7#78jVB0xYy z$Wl;W5D1Yx3IhMWaK6DF1<<@NkZiIVkVg*$f+QYLEC>lFA`ImR0&%h!W*-O+v?B0d z6wWJbwgQ?j3LG&qTR~=DiUI|Kvw+4~Kb5 QM}a~L?#l?2e>rXXFEVfRh5!Hn delta 5624 zcmZu#O-x+Z6@K@=H*aR%%mDKSFff>z!GG8Wf*}rdFeWiJ7!qO}1IE}47=tUj24WK9 zG_L$y#jTSpT(u*07OfPi-Bqm=)oRJA>aI%CR#qgdiK|FmG`qIyru8CO^gH*ScW00) zZ}{#x-*hF;cG9TIh+V7P=%!^#<@JGM*e(rhh#QO5h>nkN;H zzE}F^$6r32{o_sX>p$O+@gMK>T;H**OXWv7QUCD4qkBSJDrG*M6pf|jPwxj!vc*e! z5l2cp;@eF!79s%@ZwQeM)YR-HJO`eRZ#T;vn;g)Z4b1_qIUY(npf&GoV;UT@vXyBO zh-9S~gwO>{)P)Et+4PPOK_%OgWfeHK%6c}r3WYhlptZ(pLmOzVeuimL-)@sxHbs$2 zo60$$%A?@5#T!E-cx}y80&2A_-^t5%Tia|4o_R0rr978x((>(sll5x6sD{ujI9>(A zy^v_EU`Q8?wD6tXIXM(+3pnrgGTtY)5*H-i_3#Ie{~!YVjY7MeI#vRPb62{pf}z}1 zXy?R)gt^;kF=m0px=ms*lReQ;v4h@?{jJfV9aP=p9E-61jBqGk55}R^i=k3r%I=Wc z=GA%eZ~-od+~(>PiIvu!-Z?{pOP|}?GEyo&DU?P(>+B>YN~X`1D4G{~6 zOYeVH>>&bGci7!iMUZ6g*zc_y0t)I!q@s%S%I7CkBpby3ZINsc`w?l=5HXiWO27O3 zHASFtKC+GAfN*3R0j(VXVQ=Z~lW~<^1f+p&qzFg@Al)%hu$_Z$u4PrFm;LM6fa;?8 z9dui&>T*FG!~xQ?D1GNec`=+9>cWfI5WQzIhCMs(jD~v#4Eu4|^{h(Tuwl1}w-gX5 z47*9j0T$ptoXS)j(8A%y9fl9{3D-Af0saX$UcqFCvpx&hBhXLOg-1ow4xMzvqW}o{ zNjDL?BR=>ilj(2)_YrV?g9#5fQkA|9{)kB*-k^_EWp9%|vghv5IUaLfGTl)pc`WIB zy=qHjR3GN?(!>{?MRl^Vt>e(w^Q~48VLX+tUO|j;q!`A)fqvO}r4oY%`{iVo2_@{4^shIEiUZS!D^{H5D`x>Tb3PV**h1+zjZkro5ema)ez6R=a z4Mz<)EY@aXnQea5(V1Ay_BHZL)9ll=FELxrdFMi97ijp-W0=D3*>u?E%oPBF+J!l@ z3)p`wfi;)%O>3}%_RTfWhloBsh*Fe`;c=%JMfmFDtRgHp^+<_6Jz9Uk-0)g_0Zle` zNH6%ACHJ+B^*7cZzW%pjqy1&tD@W$kL&7gbo)+bA?T0H*KM?M?6O(n3Qt;K&_)io1 z{jguXA4(4%?I``?>jR?o;p4CG+kxjvT#-(jwM%%OXFJsRw%88!%~jK$lllpvr#;8- z1U>1wxc=VjDbHosLG6Y{J#RPR=t^lvG%6bBaF4aWNmotkdt!~=xOyF7>-Uwf zNHH>}&)zr_6Vdm1t)k{m) zS6;35ZXfhA|Hr4CyCC+9UzW!%h<}$SE{ezEetFlt_=NsGR(_!*zpLal7= zT@o==nRH#wJi8)|(YbV;f1F;6xUUgay%3h@l zfSc?fzkBsbIhgGVZHRfW=MdAN(aEnyTkT3G?+Osvcr$@$6gzo0aSP)$#=8lC-RzPs z2cTi;is})D4YV$vDF=@(>sg&WJv@3aQZyWndTUADBLHN7i02##j)yYMUO){5gdRP) zG!M33xl09hB;DV=d>nzu));Ei$GR8KM@>Waef-46>loShan(Se_3;xM2(&(2_c##& zeg`Mp<(-Y`9T&$!Qq4fK?ivZB;XFVV|_H!43px2Kk(h0+_mglV(v>ZK*o{#DK z!6mr??gjv=8bCKx{ebWsKs%@#K+qfDZn%{CQSJr+ct^P#KxE@?0D*RtyW!Ga4stgD zko_QM4+Pqv?nZ!c)Q&;^#o-b-#=nvP5bl`N7Z4D5$7=MiBp~wSUr8?gxEkVLNdTY? z$r>()hGM8z|15$Hv>`kysaa7!aE@Cibhqf|%yI5kl)5$S>{bc@NPie#32F}z9ETJ7 zha3>}hTC^3y_oNeSTAY07`#S!FJmM(iq8%S06=b3%LN4CIf`!%8=*JK-H1`APB}Vt z0Ps$68bD-A=!+W&v{U#7(&)sf`D0EyD^l~v42>km5`@s6K-juTshbOg zt()ZL0)aP~Kd4-R5OlKp8Ks`U1IaqC)f4bK8*5cHBuIUVFA)ILFvWuh1ji|eQKx|* z7fkVYFhPBp=JNr7G^Y8s03sV74JK55b}^ZvwgSO4Zyc#1^Tv^Wcg`C}fTD3ETG2RCvx>$M z2`&V>Xy{YX3%YfL;JJ`Ua%>d6Xe6o3MI%W+EEkO=+P@^#NrDF5rb~LT2*GhFRl|yC z++|V>RHbxLUN(~S>+!OY#Q%US8%eq&mW^Z-j>|?e=G!aAkxu`Lag4!n#W>=;TnQZm zNk`_2@r=Xs3OwlmC4J|r^({T(NqAl5&vKGR{2G5508sQbo;e^mUgIwV5PE!#zYHng zS+&-+Tnb*R^qmZFU8G2FP3}|20sy^P1}X&KycjP^nh&qqT1m6YJKOX^`_RVh1*Rox0duaIXwWRx5?=N!Euw* z144S6NRKYTS{l7uQfCeT+ATw)`Ms6FC5ZhePw;NxHlwcB`OaI`cXS$caC?jI@H$H4 zHkSo}vTk!(KybXxWdT9%wtCb^C+$b>Sl<;|FAcXl+@>_?1p(IugaiXl5D1 Date: Thu, 14 Mar 2024 10:05:45 -0400 Subject: [PATCH 6/7] Add keys into proto directory --- proto/sf/substreams/index/v1/keys.proto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/proto/sf/substreams/index/v1/keys.proto b/proto/sf/substreams/index/v1/keys.proto index e69de29bb..44655fdf1 100644 --- a/proto/sf/substreams/index/v1/keys.proto +++ b/proto/sf/substreams/index/v1/keys.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package sf.substreams.index.v1; +option go_package = "github.com/streamingfast/substreams/pb/sf/substreams/index/v1;pbsubstreams"; + + +message Keys { + repeated string keys = 1; +} + From 58d6fee5dd47ba46e76979fb0062b96f0cdf37bc Mon Sep 17 00:00:00 2001 From: arnaudberger Date: Thu, 14 Mar 2024 15:17:12 -0400 Subject: [PATCH 7/7] Accept inputs for index module --- manifest/package.go | 10 ++++++++-- manifest/package_test.go | 24 +++++++++++++++++------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/manifest/package.go b/manifest/package.go index fdeeb6160..72f434c69 100644 --- a/manifest/package.go +++ b/manifest/package.go @@ -81,8 +81,14 @@ func (r *manifestConverter) validateManifest(manif *Manifest) error { return fmt.Errorf("stream %q: 'use' is not allowed for kind 'store'", s.Name) } case ModuleKindBlockIndex: - if s.Inputs != nil { - return fmt.Errorf("stream %q: block index module cannot have inputs", s.Name) + if s.Inputs == nil { + return fmt.Errorf("stream %q: block index module should have inputs", s.Name) + } + + for _, input := range s.Inputs { + if input.IsParams() { + return fmt.Errorf("stream %q: block index module cannot have params input", s.Name) + } } if s.InitialBlock != nil { diff --git a/manifest/package_test.go b/manifest/package_test.go index ae88b9a6f..3a1b2969f 100644 --- a/manifest/package_test.go +++ b/manifest/package_test.go @@ -184,7 +184,7 @@ func TestValidateManifest(t *testing.T) { manifest: &Manifest{ SpecVersion: "v0.1.0", Modules: []*Module{ - {Name: "basic_index", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + {Name: "basic_index", Kind: "blockIndex", Inputs: []*Input{{Map: "proto:sf.database.v1.changes"}}, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, }, }, expectedError: "", @@ -194,27 +194,37 @@ func TestValidateManifest(t *testing.T) { manifest: &Manifest{ SpecVersion: "v0.1.0", Modules: []*Module{ - {Name: "basic_index", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.test"}}, + {Name: "basic_index", Kind: "blockIndex", Inputs: []*Input{{Map: "proto:sf.database.v1.changes"}}, Output: StreamOutput{"proto:sf.substreams.test"}}, }, }, expectedError: "stream \"basic_index\": block index module must have output type 'proto:sf.substreams.index.v1.Keys'", }, { - name: "block index with inputs", + name: "block index with params input", manifest: &Manifest{ SpecVersion: "v0.1.0", Modules: []*Module{ - {Name: "basic_index", Kind: "blockIndex", Inputs: []*Input{{Source: "proto:sf.database.v1.changes"}}, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + {Name: "basic_index", Kind: "blockIndex", Inputs: []*Input{{Params: "proto:sf.database.v1.changes"}}, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + }, + }, + expectedError: "stream \"basic_index\": block index module cannot have params input", + }, + { + name: "block index without input", + manifest: &Manifest{ + SpecVersion: "v0.1.0", + Modules: []*Module{ + {Name: "basic_index", Kind: "blockIndex", Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, }, }, - expectedError: "stream \"basic_index\": block index module cannot have inputs", + expectedError: "stream \"basic_index\": block index module should have inputs", }, { name: "block index with initialBlock", manifest: &Manifest{ SpecVersion: "v0.1.0", Modules: []*Module{ - {Name: "basic_index", Kind: "blockIndex", InitialBlock: &initialBlock, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + {Name: "basic_index", Kind: "blockIndex", Inputs: []*Input{{Map: "proto:sf.database.v1.changes"}}, InitialBlock: &initialBlock, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, }, }, expectedError: "stream \"basic_index\": block index module cannot have initial block", @@ -227,7 +237,7 @@ func TestValidateManifest(t *testing.T) { {Name: "basic_index", Kind: "blockIndex", BlockFilter: &BlockFilter{ Module: "my_module", Query: "test query", - }, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, + }, Inputs: []*Input{{Map: "proto:sf.database.v1.changes"}}, Output: StreamOutput{"proto:sf.substreams.index.v1.Keys"}}, }, }, expectedError: "stream \"basic_index\": block index module cannot have block filter",