Code Reference
|
service FullnodeData { |
|
rpc GetTransactionsFromNode(GetTransactionsFromNodeRequest) returns (stream TransactionsFromNodeResponse); |
|
} |
Issue/Question
Would it be possible to expose the "message Block" from
|
message Block { |
|
// Timestamp represents the timestamp of the `BlockMetadataTransaction` (or `GenesisTransaction` for the genesis block) |
|
// and every transaction in the `transactions` will have the same `timestamp` as the block. |
|
diem.util.timestamp.Timestamp timestamp = 1; |
|
|
|
// Height represents the block number and ultimately, is the count of `BlockMetadataTransaction` that happened on the chain. |
|
uint64 height = 2 [jstype = JS_STRING]; |
|
|
|
// Transactions holds all transactions that happened in the Block, which is transactions that happened starting with (and including) |
|
// a `BlockMetadataTransaction`, and every other transaction up to (but excluding) the next `BlockMetadataTransaction`. |
|
repeated Transaction transactions = 3; |
|
|
|
// Chain ID informs us which chain we're trying to index, this is important to ensure that we're not mixing chains within a single pipeline. |
|
uint32 chain_id = 4; |
|
} |
as gRPC Endpoint (as proto service)?
Background
I wanna combine the two approaches of pulling data from the chain (REST API + gRPC). The plan is to store all raw blocks in a postgresdb. If it would be possible to receive the same data structure from rest api and from grpc it would reduce dev time since only 1 extracting algo would be required.
Code Reference
diem/crates/diem-protos/proto/diem/internal/fullnode/v1/fullnode_data.proto
Lines 55 to 57 in 668b495
Issue/Question
Would it be possible to expose the "message Block" from
diem/crates/diem-protos/proto/diem/transaction/v1/transaction.proto
Lines 19 to 33 in 668b495
as gRPC Endpoint (as proto service)?
Background
I wanna combine the two approaches of pulling data from the chain (REST API + gRPC). The plan is to store all raw blocks in a postgresdb. If it would be possible to receive the same data structure from rest api and from grpc it would reduce dev time since only 1 extracting algo would be required.