diff --git a/devel/stdin/start.sh b/devel/stdin/start.sh index ffe72a6..26a226e 100755 --- a/devel/stdin/start.sh +++ b/devel/stdin/start.sh @@ -34,7 +34,7 @@ main() { # fi # exec go run github.com/streamingfast/dummy-blockchain@v1.2.0 start --tracer=firehose --block-rate=60 --store-dir "$chain_data" | $fireacme -c $(basename $ROOT).yaml start "$@" - forest --chain calibnet --encrypt-keystore=false | $fireacme -c $(basename $ROOT).yaml start "$@" + forest --chain calibnet --encrypt-keystore=false | $firefil -c $(basename $ROOT).yaml start "$@" } usage_error() { diff --git a/pb/last_generate.txt b/pb/last_generate.txt index 088f53f..1d34874 100644 --- a/pb/last_generate.txt +++ b/pb/last_generate.txt @@ -1,2 +1,2 @@ -generate.sh - Wed Nov 6 00:50:26 EST 2024 - d -streamingfast/firehose-filecoin/proto revision: ada6ee7 +generate.sh - Wed Nov 6 15:20:13 +07 2024 - rumcajs +streamingfast/firehose-filecoin/proto revision: edddbaf diff --git a/pb/sf/filecoin/type/v1/type.pb.go b/pb/sf/filecoin/type/v1/type.pb.go index 3ee61ec..720809b 100644 --- a/pb/sf/filecoin/type/v1/type.pb.go +++ b/pb/sf/filecoin/type/v1/type.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v5.27.1 +// protoc v5.28.3 // source: sf/filecoin/type/v1/type.proto package pbfilecoin @@ -25,22 +25,20 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -type BlockHeader struct { +type Tipset struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` - PreviousNum *uint64 `protobuf:"varint,3,opt,name=previous_num,json=previousNum,proto3,oneof" json:"previous_num,omitempty"` - PreviousHash *string `protobuf:"bytes,4,opt,name=previous_hash,json=previousHash,proto3,oneof" json:"previous_hash,omitempty"` - FinalNum uint64 `protobuf:"varint,5,opt,name=final_num,json=finalNum,proto3" json:"final_num,omitempty"` - FinalHash string `protobuf:"bytes,6,opt,name=final_hash,json=finalHash,proto3" json:"final_hash,omitempty"` - Timestamp uint64 `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + BlockCount uint64 `protobuf:"varint,2,opt,name=block_count,json=blockCount,proto3" json:"block_count,omitempty"` + Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TipsetKey string `protobuf:"bytes,4,opt,name=tipset_key,json=tipsetKey,proto3" json:"tipset_key,omitempty"` + ParentTipsetKey string `protobuf:"bytes,5,opt,name=parent_tipset_key,json=parentTipsetKey,proto3" json:"parent_tipset_key,omitempty"` } -func (x *BlockHeader) Reset() { - *x = BlockHeader{} +func (x *Tipset) Reset() { + *x = Tipset{} if protoimpl.UnsafeEnabled { mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -48,13 +46,13 @@ func (x *BlockHeader) Reset() { } } -func (x *BlockHeader) String() string { +func (x *Tipset) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BlockHeader) ProtoMessage() {} +func (*Tipset) ProtoMessage() {} -func (x *BlockHeader) ProtoReflect() protoreflect.Message { +func (x *Tipset) ProtoReflect() protoreflect.Message { mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -66,441 +64,69 @@ func (x *BlockHeader) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead. -func (*BlockHeader) Descriptor() ([]byte, []int) { +// Deprecated: Use Tipset.ProtoReflect.Descriptor instead. +func (*Tipset) Descriptor() ([]byte, []int) { return file_sf_filecoin_type_v1_type_proto_rawDescGZIP(), []int{0} } -func (x *BlockHeader) GetHeight() uint64 { +func (x *Tipset) GetHeight() uint64 { if x != nil { return x.Height } return 0 } -func (x *BlockHeader) GetHash() string { +func (x *Tipset) GetBlockCount() uint64 { if x != nil { - return x.Hash - } - return "" -} - -func (x *BlockHeader) GetPreviousNum() uint64 { - if x != nil && x.PreviousNum != nil { - return *x.PreviousNum + return x.BlockCount } return 0 } -func (x *BlockHeader) GetPreviousHash() string { - if x != nil && x.PreviousHash != nil { - return *x.PreviousHash - } - return "" -} - -func (x *BlockHeader) GetFinalNum() uint64 { - if x != nil { - return x.FinalNum - } - return 0 -} - -func (x *BlockHeader) GetFinalHash() string { - if x != nil { - return x.FinalHash - } - return "" -} - -func (x *BlockHeader) GetTimestamp() uint64 { +func (x *Tipset) GetTimestamp() uint64 { if x != nil { return x.Timestamp } return 0 } -type Block struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Transactions []*Transaction `protobuf:"bytes,2,rep,name=transactions,proto3" json:"transactions,omitempty"` -} - -func (x *Block) Reset() { - *x = Block{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Block) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Block) ProtoMessage() {} - -func (x *Block) ProtoReflect() protoreflect.Message { - mi := &file_sf_filecoin_type_v1_type_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 Block.ProtoReflect.Descriptor instead. -func (*Block) Descriptor() ([]byte, []int) { - return file_sf_filecoin_type_v1_type_proto_rawDescGZIP(), []int{1} -} - -func (x *Block) GetHeader() *BlockHeader { - if x != nil { - return x.Header - } - return nil -} - -func (x *Block) GetTransactions() []*Transaction { +func (x *Tipset) GetTipsetKey() string { if x != nil { - return x.Transactions - } - return nil -} - -type Transaction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` - Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` - Amount *BigInt `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` - Fee *BigInt `protobuf:"bytes,6,opt,name=fee,proto3" json:"fee,omitempty"` - Success bool `protobuf:"varint,7,opt,name=success,proto3" json:"success,omitempty"` - Events []*Event `protobuf:"bytes,8,rep,name=events,proto3" json:"events,omitempty"` -} - -func (x *Transaction) Reset() { - *x = Transaction{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction) ProtoMessage() {} - -func (x *Transaction) ProtoReflect() protoreflect.Message { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[2] - 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 Transaction.ProtoReflect.Descriptor instead. -func (*Transaction) Descriptor() ([]byte, []int) { - return file_sf_filecoin_type_v1_type_proto_rawDescGZIP(), []int{2} -} - -func (x *Transaction) GetType() string { - if x != nil { - return x.Type + return x.TipsetKey } return "" } -func (x *Transaction) GetHash() string { +func (x *Tipset) GetParentTipsetKey() string { if x != nil { - return x.Hash + return x.ParentTipsetKey } return "" } -func (x *Transaction) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *Transaction) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *Transaction) GetAmount() *BigInt { - if x != nil { - return x.Amount - } - return nil -} - -func (x *Transaction) GetFee() *BigInt { - if x != nil { - return x.Fee - } - return nil -} - -func (x *Transaction) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *Transaction) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_sf_filecoin_type_v1_type_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 Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_sf_filecoin_type_v1_type_proto_rawDescGZIP(), []int{3} -} - -func (x *Event) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Event) GetAttributes() []*Attribute { - if x != nil { - return x.Attributes - } - return nil -} - -type Attribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Attribute) Reset() { - *x = Attribute{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Attribute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Attribute) ProtoMessage() {} - -func (x *Attribute) ProtoReflect() protoreflect.Message { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[4] - 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 Attribute.ProtoReflect.Descriptor instead. -func (*Attribute) Descriptor() ([]byte, []int) { - return file_sf_filecoin_type_v1_type_proto_rawDescGZIP(), []int{4} -} - -func (x *Attribute) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Attribute) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type BigInt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` -} - -func (x *BigInt) Reset() { - *x = BigInt{} - if protoimpl.UnsafeEnabled { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BigInt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BigInt) ProtoMessage() {} - -func (x *BigInt) ProtoReflect() protoreflect.Message { - mi := &file_sf_filecoin_type_v1_type_proto_msgTypes[5] - 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 BigInt.ProtoReflect.Descriptor instead. -func (*BigInt) Descriptor() ([]byte, []int) { - return file_sf_filecoin_type_v1_type_proto_rawDescGZIP(), []int{5} -} - -func (x *BigInt) GetBytes() []byte { - if x != nil { - return x.Bytes - } - return nil -} - var File_sf_filecoin_type_v1_type_proto protoreflect.FileDescriptor var file_sf_filecoin_type_v1_type_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x73, 0x66, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x73, 0x66, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x88, 0x02, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6e, 0x75, - 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x69, - 0x6f, 0x75, 0x73, 0x4e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x61, 0x73, 0x68, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x75, 0x6d, - 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x22, 0x87, 0x01, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, - 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x66, 0x2e, - 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9b, 0x02, 0x0a, 0x0b, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x67, - 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x66, - 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x66, 0x2e, 0x66, 0x69, - 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x66, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, - 0x69, 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x5b, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x66, 0x2e, 0x66, - 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x33, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 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, 0x22, 0x1e, 0x0a, 0x06, 0x42, 0x69, - 0x67, 0x49, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x61, - 0x66, 0x65, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, 0x6f, 0x73, 0x65, 0x2d, 0x66, 0x69, 0x6c, 0x65, - 0x63, 0x6f, 0x69, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x66, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, - 0x6f, 0x69, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x62, 0x66, 0x69, - 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xaa, 0x01, 0x0a, 0x06, 0x54, 0x69, 0x70, 0x73, 0x65, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x70, 0x73, 0x65, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x70, + 0x73, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x69, 0x70, 0x73, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x70, 0x73, 0x65, 0x74, 0x4b, + 0x65, 0x79, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x68, + 0x6f, 0x73, 0x65, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2f, 0x70, 0x62, 0x2f, + 0x73, 0x66, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x62, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -515,27 +141,16 @@ func file_sf_filecoin_type_v1_type_proto_rawDescGZIP() []byte { return file_sf_filecoin_type_v1_type_proto_rawDescData } -var file_sf_filecoin_type_v1_type_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_sf_filecoin_type_v1_type_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_sf_filecoin_type_v1_type_proto_goTypes = []interface{}{ - (*BlockHeader)(nil), // 0: sf.filecoin.type.v1.BlockHeader - (*Block)(nil), // 1: sf.filecoin.type.v1.Block - (*Transaction)(nil), // 2: sf.filecoin.type.v1.Transaction - (*Event)(nil), // 3: sf.filecoin.type.v1.Event - (*Attribute)(nil), // 4: sf.filecoin.type.v1.Attribute - (*BigInt)(nil), // 5: sf.filecoin.type.v1.BigInt + (*Tipset)(nil), // 0: sf.filecoin.type.v1.Tipset } var file_sf_filecoin_type_v1_type_proto_depIdxs = []int32{ - 0, // 0: sf.filecoin.type.v1.Block.header:type_name -> sf.filecoin.type.v1.BlockHeader - 2, // 1: sf.filecoin.type.v1.Block.transactions:type_name -> sf.filecoin.type.v1.Transaction - 5, // 2: sf.filecoin.type.v1.Transaction.amount:type_name -> sf.filecoin.type.v1.BigInt - 5, // 3: sf.filecoin.type.v1.Transaction.fee:type_name -> sf.filecoin.type.v1.BigInt - 3, // 4: sf.filecoin.type.v1.Transaction.events:type_name -> sf.filecoin.type.v1.Event - 4, // 5: sf.filecoin.type.v1.Event.attributes:type_name -> sf.filecoin.type.v1.Attribute - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 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_filecoin_type_v1_type_proto_init() } @@ -545,67 +160,7 @@ func file_sf_filecoin_type_v1_type_proto_init() { } if !protoimpl.UnsafeEnabled { file_sf_filecoin_type_v1_type_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_filecoin_type_v1_type_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_filecoin_type_v1_type_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_filecoin_type_v1_type_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_filecoin_type_v1_type_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Attribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sf_filecoin_type_v1_type_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BigInt); i { + switch v := v.(*Tipset); i { case 0: return &v.state case 1: @@ -617,14 +172,13 @@ func file_sf_filecoin_type_v1_type_proto_init() { } } } - file_sf_filecoin_type_v1_type_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sf_filecoin_type_v1_type_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/sf/acme/type/v1/type.proto b/proto/sf/acme/type/v1/type.proto deleted file mode 100644 index aded26c..0000000 --- a/proto/sf/acme/type/v1/type.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package sf.acme.type.v1; - -option go_package = "github.com/streamingfast/firehose-acme/pb/sf/acme/type/v1;pbacme"; - -message Tipset { - uint64 height = 1; - uint64 block_count = 2; - uint64 timestamp = 3; -} diff --git a/proto/sf/filecoin/type/v1/type.proto b/proto/sf/filecoin/type/v1/type.proto index 0801914..48b260e 100644 --- a/proto/sf/filecoin/type/v1/type.proto +++ b/proto/sf/filecoin/type/v1/type.proto @@ -4,42 +4,10 @@ package sf.filecoin.type.v1; option go_package = "github.com/chainsafe/firehose-filecoin/pb/sf/filecoin/type/v1;pbfilecoin"; -message BlockHeader { +message Tipset { uint64 height = 1; - string hash = 2; - optional uint64 previous_num = 3; - optional string previous_hash = 4; - uint64 final_num = 5; - string final_hash = 6; - uint64 timestamp = 7; -} - -message Block { - BlockHeader header = 1; - repeated Transaction transactions = 2; -} - -message Transaction { - string type = 1; - string hash = 2; - string sender = 3; - string receiver = 4; - BigInt amount = 5; - BigInt fee = 6; - bool success = 7; - repeated Event events = 8; -} - -message Event { - string type = 1; - repeated Attribute attributes = 2; -} - -message Attribute { - string key = 1; - string value = 2; -} - -message BigInt { - bytes bytes = 1; + uint64 block_count = 2; + uint64 timestamp = 3; + string tipset_key = 4; + string parent_tipset_key = 5; }