Skip to content

Feature Request: Raw Block gRPC API Endpoint #14

@ownyrd

Description

@ownyrd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions