From fb0f2e28d4a765cd6ca088a652d6cf0bc525065e Mon Sep 17 00:00:00 2001 From: gagliardetto Date: Thu, 6 Jun 2024 21:33:10 +0200 Subject: [PATCH] Implement feedback --- grpc-server.go | 10 +- .../old-faithful-grpc/old-faithful.pb.go | 108 +++++++----------- old-faithful-proto/proto/old-faithful.proto | 10 +- 3 files changed, 52 insertions(+), 76 deletions(-) diff --git a/grpc-server.go b/grpc-server.go index 45d2d4ee..153c2b10 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -55,8 +55,6 @@ func (me *MultiEpoch) GetVersion(context.Context, *old_faithful_grpc.VersionRequ } return GitTag }(), - Commit: GitCommit, - Epochs: me.GetEpochNumbers(), } return resp, nil } @@ -292,7 +290,7 @@ func (multi *MultiEpoch) GetBlock(ctx context.Context, params *old_faithful_grpc { pos, ok := transactionNode.GetPositionIndex() if ok { - txResp.Position = ptrToUint64(uint64(pos)) + txResp.Index = ptrToUint64(uint64(pos)) } txResp.Transaction, txResp.Meta, err = getTransactionAndMetaFromNode(transactionNode, epochHandler.GetDataFrameByCid) if err != nil { @@ -305,10 +303,10 @@ func (multi *MultiEpoch) GetBlock(ctx context.Context, params *old_faithful_grpc } sort.Slice(allTransactions, func(i, j int) bool { - if allTransactions[i].Position == nil || allTransactions[j].Position == nil { + if allTransactions[i].Index == nil || allTransactions[j].Index == nil { return false } - return *allTransactions[i].Position < *allTransactions[j].Position + return *allTransactions[i].Index < *allTransactions[j].Index }) tim.time("get transactions") resp.Transactions = allTransactions @@ -421,7 +419,7 @@ func (multi *MultiEpoch) GetTransaction(ctx context.Context, params *old_faithfu { pos, ok := transactionNode.GetPositionIndex() if ok { - response.Position = ptrToUint64(uint64(pos)) + response.Index = ptrToUint64(uint64(pos)) } response.Transaction.Transaction, response.Transaction.Meta, err = getTransactionAndMetaFromNode(transactionNode, epochHandler.GetDataFrameByCid) if err != nil { diff --git a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go index 6ace2a56..7582fa9e 100644 --- a/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go +++ b/old-faithful-proto/old-faithful-grpc/old-faithful.pb.go @@ -63,9 +63,7 @@ type VersionResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Commit string `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` - Epochs []uint64 `protobuf:"varint,3,rep,packed,name=epochs,proto3" json:"epochs,omitempty"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` } func (x *VersionResponse) Reset() { @@ -107,20 +105,6 @@ func (x *VersionResponse) GetVersion() string { return "" } -func (x *VersionResponse) GetCommit() string { - if x != nil { - return x.Commit - } - return "" -} - -func (x *VersionResponse) GetEpochs() []uint64 { - if x != nil { - return x.Epochs - } - return nil -} - type BlockRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -326,7 +310,7 @@ type TransactionResponse struct { Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"` BlockTime int64 `protobuf:"varint,3,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - Position *uint64 `protobuf:"varint,4,opt,name=position,proto3,oneof" json:"position,omitempty"` // position in the block + Index *uint64 `protobuf:"varint,4,opt,name=index,proto3,oneof" json:"index,omitempty"` // position in the block } func (x *TransactionResponse) Reset() { @@ -382,9 +366,9 @@ func (x *TransactionResponse) GetBlockTime() int64 { return 0 } -func (x *TransactionResponse) GetPosition() uint64 { - if x != nil && x.Position != nil { - return *x.Position +func (x *TransactionResponse) GetIndex() uint64 { + if x != nil && x.Index != nil { + return *x.Index } return 0 } @@ -394,9 +378,9 @@ type Transaction struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // solana native transaction - Meta []byte `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` // bincode or protobuf - Position *uint64 `protobuf:"varint,4,opt,name=position,proto3,oneof" json:"position,omitempty"` // position in the block + Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // solana native transaction + Meta []byte `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` // bincode or protobuf + Index *uint64 `protobuf:"varint,4,opt,name=index,proto3,oneof" json:"index,omitempty"` // position in the block } func (x *Transaction) Reset() { @@ -445,9 +429,9 @@ func (x *Transaction) GetMeta() []byte { return nil } -func (x *Transaction) GetPosition() uint64 { - if x != nil && x.Position != nil { - return *x.Position +func (x *Transaction) GetIndex() uint64 { + if x != nil && x.Index != nil { + return *x.Index } return 0 } @@ -458,12 +442,9 @@ var file_old_faithful_proto_rawDesc = []byte{ 0x0a, 0x12, 0x6f, 0x6c, 0x64, 0x2d, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x22, 0x22, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, @@ -488,7 +469,7 @@ var file_old_faithful_proto_rawDesc = []byte{ 0x64, 0x73, 0x22, 0x32, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, @@ -496,38 +477,37 @@ var file_old_faithful_proto_rawDesc = []byte{ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x00, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x71, 0x0a, 0x0b, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xee, - 0x01, 0x0a, 0x0b, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x12, 0x47, - 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x4f, - 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x4f, 0x6c, 0x64, 0x46, - 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, - 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, - 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x4f, - 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x4e, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x70, - 0x63, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x74, 0x6f, 0x6e, - 0x65, 0x2d, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2f, 0x6f, 0x6c, 0x64, 0x2d, 0x66, - 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6f, 0x6c, - 0x64, 0x5f, 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x22, 0x68, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x32, 0xee, 0x01, 0x0a, + 0x0b, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x12, 0x47, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x4f, 0x6c, 0x64, + 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, + 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x19, 0x2e, 0x4f, 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x4f, + 0x6c, 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x4f, 0x6c, 0x64, + 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x4f, 0x6c, + 0x64, 0x46, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4e, 0x5a, + 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x70, 0x63, 0x70, + 0x6f, 0x6f, 0x6c, 0x2f, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2d, + 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2f, 0x6f, 0x6c, 0x64, 0x2d, 0x66, 0x61, 0x69, + 0x74, 0x68, 0x66, 0x75, 0x6c, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6f, 0x6c, 0x64, 0x5f, + 0x66, 0x61, 0x69, 0x74, 0x68, 0x66, 0x75, 0x6c, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/old-faithful-proto/proto/old-faithful.proto b/old-faithful-proto/proto/old-faithful.proto index f6db448b..efd1c8ee 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -14,8 +14,6 @@ message VersionRequest {} message VersionResponse { string version = 1; - string commit = 2; - repeated uint64 epochs = 3; } message BlockRequest { @@ -41,11 +39,11 @@ message TransactionResponse { Transaction transaction = 1; uint64 slot = 2; int64 block_time = 3; - optional uint64 position = 4; // position in the block + optional uint64 index = 4; // position in the block } message Transaction { - bytes transaction = 1; // solana native transaction - bytes meta = 2; // bincode or protobuf - optional uint64 position = 4; // position in the block + bytes transaction = 1; // solana native transaction + bytes meta = 2; // bincode or protobuf + optional uint64 index = 4; // position in the block }