Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Raw Block gRPC API Endpoint #14

Open
ownyrd opened this issue Jun 14, 2024 · 0 comments
Open

Feature Request: Raw Block gRPC API Endpoint #14

ownyrd opened this issue Jun 14, 2024 · 0 comments

Comments

@ownyrd
Copy link

ownyrd commented Jun 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant